Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ jobs:
with:
java-version: ${{ matrix.java }}
distribution: 'corretto'
cache: maven
cache: gradle
- name: Verify
run: mvn -B verify --file pom.xml
run: gradle check
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
.gradle/

### IntelliJ IDEA ###
.idea/
Expand Down
Binary file removed .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
2 changes: 0 additions & 2 deletions .mvn/wrapper/maven-wrapper.properties

This file was deleted.

69 changes: 69 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
plugins {
`java-library`
`maven-publish`
pmd
jacoco
alias(libs.plugins.spotless)
}

repositories {
mavenLocal()
maven {
url = uri("https://repo.maven.apache.org/maven2/")
}
}

dependencies {
api(libs.slf4j)
testImplementation(libs.assertj)
testImplementation(libs.jupiter.api)
testImplementation(libs.jupiter.params)
testRuntimeOnly(libs.jupiter.engine)
testRuntimeOnly(libs.junit.launcher)
compileOnly(libs.lombok)
annotationProcessor(libs.lombok)
}

spotless {
java {
removeUnusedImports()
palantirJavaFormat().formatJavadoc(true)
formatAnnotations()
trimTrailingWhitespace()
leadingSpacesToTabs()
leadingTabsToSpaces(2)
}
}

group = "me.atour"
version = "1.0.0-SNAPSHOT"
description = "Baseline project for Java 25 LTS with Gradle"
java.sourceCompatibility = JavaVersion.VERSION_25

publishing {
publications.create<MavenPublication>("maven") {
from(components["java"])
}
}

tasks.test {
useJUnitPlatform()
finalizedBy(tasks.jacocoTestReport)
}

tasks.jacocoTestReport {
dependsOn(tasks.test)
reports {
xml.required = false
csv.required = false
html.outputLocation = layout.buildDirectory.dir("jacocoHtml")
}
}

tasks.withType<JavaCompile>() {
options.encoding = "UTF-8"
}

tasks.withType<Javadoc>() {
options.encoding = "UTF-8"
}
33 changes: 0 additions & 33 deletions config/checkstyle-suppressions.xml

This file was deleted.

440 changes: 0 additions & 440 deletions config/checkstyle.xml

This file was deleted.

1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.gradle.configuration-cache=true
18 changes: 18 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[versions]
assertj = "3.27.6"
junit = "6.1.0-M1"
lombok = "1.18.42"
slf4j = "2.0.17"
spotless = "8.1.0"

[libraries]
assertj = { module = "org.assertj:assertj-core", version.ref = "assertj" }
junit-launcher = { module = "org.junit.platform:junit-platform-launcher", version.ref = "junit" }
jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit" }
jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit" }
jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "junit" }
lombok = { module = "org.projectlombok:lombok", version.ref = "lombok" }
slf4j = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }

[plugins]
spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading