Skip to content

Commit

Permalink
Switch from Maven to Gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieucarbou committed Dec 19, 2024
1 parent e7c8e04 commit b5f2a39
Show file tree
Hide file tree
Showing 1,348 changed files with 5,272 additions and 8,506 deletions.
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]

# Change these settings to your own preference
indent_style = space
indent_size = 2

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Set the default behavior to LF, because checkstyle enforces it
* text eol=lf

*.bat eol=crlf

*.jar binary
*.jpg binary
*.png binary
*.ttf binary
23 changes: 23 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

<!--
If this is your first time contributing to the project (or it's been a while), please consider reviewing https://github.com/Terracotta-OSS/terracotta-platform/blob/master/CONTRIBUTING.md
-->


This PR...

Fixes issue #

## Changes
-

-----------------
## Checklist
- [ ] tested locally
- [ ] updated the docs
- [ ] added appropriate test
- [ ] signed-off on the DCO referenced in the CONTRIBUTING link below via `git commit -s` on my commits, and submit this code under terms of the Apache 2.0 license and assign copyright to this project owners
(If you're not using command-line, you can use a [browser extension](https://github.com/scottrigby/dco-gh-ui) )
-----------------
In submitting this contribution, I agree to the terms of contributing as referred to here:
https://github.com/Terracotta-OSS/terracotta-platform/blob/master/CONTRIBUTING.md
141 changes: 141 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
name: Build

on:
workflow_dispatch:
push:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:

build:
name: "build:${{ matrix.os }}:jdk-${{ matrix.jdk }}:jvm-${{ matrix.jvm }}"

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
jdk: [8]
jvm: [8, 11, 17, 21]

runs-on: ${{ matrix.os }}

env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 10

steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: recursive

- uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-gradle

- name: "Setup JDK ${{ matrix.jdk }}"
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: ${{ matrix.jdk }}

- name: "Setup JVM ${{ matrix.jvm }}"
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: ${{ matrix.jvm }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Build with Gradle
run: ./gradlew build check -x dependencyCheckAggregate -x spotbugsMain -x spotbugsTest -x checkstyleMain -x checkstyleTest -x :management:integration-tests:test --no-daemon -PcompileVM=${{ matrix.jdk }} -PtestVM=${{ matrix.jvm }}

- name: Upload Test Results
if: failure()
uses: actions/upload-artifact@v4
with:
name: junit-test-results
retention-days: 5
path: |
**/build/reports/
**/build/test-results/
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
env:
NODE_OPTIONS: "--max_old_space_size=4096"
with:
report_paths: "**/build/test-results/test/TEST-*.xml"

system_tests_management:
name: "integration-tests:management:${{ matrix.os }}:jdk-${{ matrix.jdk }}:jvm-${{ matrix.jvm }}"

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
jdk: [8]
jvm: [8, 11, 17, 21]

runs-on: ${{ matrix.os }}

env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 10

steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: recursive

- uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-gradle

- name: "Setup JDK ${{ matrix.jdk }}"
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: ${{ matrix.jdk }}

- name: "Setup JVM ${{ matrix.jvm }}"
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: ${{ matrix.jvm }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Build with Gradle
run: ./gradlew :management:integration-tests:test -x dependencyCheckAggregate -x spotbugsMain -x spotbugsTest -x checkstyleMain -x checkstyleTest --no-daemon -PcompileVM=${{ matrix.jdk }} -PtestVM=${{ matrix.jvm }}

- name: Upload Test Results
if: failure()
uses: actions/upload-artifact@v4
with:
name: junit-test-results
retention-days: 5
path: |
**/build/reports/
**/build/test-results/
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
env:
NODE_OPTIONS: "--max_old_space_size=4096"
with:
report_paths: "**/build/test-results/test/TEST-*.xml"

43 changes: 43 additions & 0 deletions .github/workflows/checkstyle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Checkstyle

on:
workflow_dispatch:
push:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
checkstyle:
name: "Checkstyle"
runs-on: ubuntu-latest
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 10

steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: recursive

- uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-gradle

- name: "Setup JDK 8"
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 8

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Checkstyle
run: ./gradlew checkstyleMain checkstyleTest
27 changes: 27 additions & 0 deletions .github/workflows/dependency-submission.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Dependency Submission

on:
workflow_dispatch:
push:
branches: ["main", "master"]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions:
contents: write

jobs:
dependency-submission:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 17
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v4
43 changes: 43 additions & 0 deletions .github/workflows/spotbugs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: SpotBugs

on:
workflow_dispatch:
push:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
spotBugs:
name: "SpotBugs"
runs-on: ubuntu-latest
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 10

steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: recursive

- uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-gradle

- name: "Setup JDK 8"
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 8

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: SpotBugs
run: ./gradlew spotbugsMain spotbugsTest --no-daemon
17 changes: 17 additions & 0 deletions .github/workflows/wrapper-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "Validate Gradle Wrapper"

on:
workflow_dispatch:
push:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
validation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v4
45 changes: 10 additions & 35 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,35 +1,10 @@
# IntelliJ exclusions
.idea/
*.iml
out/

# Eclipse exclusions
.project
.classpath/
.classpath
.settings/
*.prefs

# Netbeans exclusions
nb-configuration.xml
nbactions.xml
.nb-gradle/
.nb-gradle-properties

# MacOS exclusions
.DS_Store

# Maven exclusions
target/
dependency-reduced-pom.xml
.fbExcludeFilterFile

.checkstyle
*~

/.gradletasknamecache
/classes
/healthchecker-entity/api/nbproject/

# vim
*.swp
# Gradle
.gradle/
**/build/
!**/src/**/build/

# Vscode
/.vscode/*
**/bin/main/**
**/bin/test/**
**/bin/xml/**
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "build-logic/terracotta-gradle-plugins"]
path = build-logic/terracotta-gradle-plugins
url = https://github.com/Terracotta-OSS/terracotta-gradle-plugins.git
Binary file removed .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
18 changes: 0 additions & 18 deletions .mvn/wrapper/maven-wrapper.properties

This file was deleted.

Loading

0 comments on commit b5f2a39

Please sign in to comment.