Skip to content
Open
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
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
plugins {
alias(libs.plugins.buildconfig) apply false
alias(libs.plugins.equo.ide)
alias(libs.plugins.test.logger) apply false
alias(libs.plugins.spotless.changelog) apply false
Expand Down
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ rewrite-recipe-third-party = "org.openrewrite.recipe:rewrite-third-party:0.40.1"
errorprone-core = "com.google.errorprone:error_prone_core:2.42.0"

[plugins]
buildconfig = "com.github.gmazzo.buildconfig:6.0.10"
test-logger = "com.adarshr.test-logger:4.0.0"
spotless = "com.diffplug.spotless:8.10.0"
spotless-changelog = "com.diffplug.spotless-changelog:3.1.2"
Expand Down
11 changes: 11 additions & 0 deletions lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,24 @@ import org.gradle.util.GradleVersion

plugins {
id 'java-library'
id 'com.github.gmazzo.buildconfig'
id 'io.github.davidburstrom.version-compatibility'
}
ext.artifactId = project.artifactIdLib
version = rootProject.spotlessChangelog.versionNext
apply from: rootProject.file('gradle/java-setup.gradle')
apply from: rootProject.file('gradle/java-publish.gradle')

buildConfig {
packageName('com.diffplug.spotless.java')
useJavaOutput {
defaultVisibility = true
}
buildConfigField(String, 'VERSION_GJF', libs.google.java.format.map {
it.versionConstraint.requiredVersion
})
}

def NEEDS_GLUE = [
// (alphabetic order please)
'cleanthat',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ private static FormatterStep createInternally(String name, String groupArtifact,
.addMin(21, "1.17.0") // java 21 requires at least 1.17.0 due to https://github.com/google/google-java-format/issues/898
.addMin(25, "1.30.0") // import module (JEP 511) requires google-java-format >= 1.30.0 (https://github.com/google/google-java-format/issues/1213)
.add(17, "1.28.0") // last version compatible with JDK 17 (1.30.0 references JCAnyPattern, JDK 21+ only)
.add(21, "1.30.0"); // default on JVM 21+ (1.30.0+ handles `import module` in RemoveUnusedImports on JVM 25+)
.add(21, BuildConfig.VERSION_GJF); // default on JVM 21+ (1.30.0+ handles `import module` in RemoveUnusedImports on JVM 25+)

public static String defaultGroupArtifact() {
return MAVEN_COORDINATE;
Expand Down
Loading