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 7, 2024
1 parent e7c8e04 commit 2fc8f03
Show file tree
Hide file tree
Showing 1,344 changed files with 5,090 additions and 7,602 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
76 changes: 76 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
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: "${{ 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 --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
39 changes: 4 additions & 35 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,35 +1,4 @@
# 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/
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.

46 changes: 46 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
Loading

0 comments on commit 2fc8f03

Please sign in to comment.