diff --git a/build.gradle b/build.gradle index df01f2361c..db827fa246 100644 --- a/build.gradle +++ b/build.gradle @@ -35,18 +35,18 @@ buildscript { } } plugins { - id "com.diffplug.spotless" version "6.20.0" - id "net.ltgt.errorprone" version "3.1.0" apply false - id "com.github.johnrengelman.shadow" version "8.1.1" apply false - id "com.github.kt3k.coveralls" version "2.12.0" apply false - id "me.champeau.jmh" version "0.7.1" apply false - id "com.github.ben-manes.versions" version "0.47.0" - id "com.felipefzdz.gradle.shellcheck" version "1.4.6" + id "com.diffplug.spotless" version "6.20.0" + id "net.ltgt.errorprone" version "3.1.0" apply false + id "com.github.johnrengelman.shadow" version "8.1.1" apply false + id "com.github.kt3k.coveralls" version "2.12.0" apply false + id "me.champeau.jmh" version "0.7.1" apply false + id "com.github.ben-manes.versions" version "0.47.0" + id "com.felipefzdz.gradle.shellcheck" version "1.4.6" } repositories { - // to get the google-java-format jar and dependencies - mavenCentral() + // to get the google-java-format jar and dependencies + mavenCentral() } apply from: "gradle/dependencies.gradle" @@ -59,10 +59,10 @@ subprojects { project -> project.tasks.withType(JavaCompile) { dependsOn(installGitHooks) options.compilerArgs += [ - "-Xlint:deprecation", - "-Xlint:rawtypes", - "-Xlint:unchecked", - "-Werror" + "-Xlint:deprecation", + "-Xlint:rawtypes", + "-Xlint:unchecked", + "-Werror" ] options.errorprone { // disable warnings in generated code; AutoValue code fails UnnecessaryParentheses check @@ -84,7 +84,7 @@ subprojects { project -> // To enable auto-patching, uncomment the line below, replace [CheckerName] with // the checker(s) you want to apply patches for (comma-separated), and above, disable // "-Werror" -// errorproneArgs.addAll("-XepPatchChecks:[CheckerName]", "-XepPatchLocation:IN_PLACE") + // errorproneArgs.addAll("-XepPatchChecks:[CheckerName]", "-XepPatchLocation:IN_PLACE") } } @@ -112,19 +112,19 @@ subprojects { project -> java { googleJavaFormat() } - groovyGradle { - target '**/*.gradle' - greclipse() - indentWithSpaces(4) - trimTrailingWhitespace() - endWithNewline() - } } } } spotless { predeclareDeps() + groovyGradle { + target '**/*.gradle' + greclipse() + indentWithSpaces(4) + trimTrailingWhitespace() + endWithNewline() + } } spotlessPredeclare { java { googleJavaFormat('1.17.0') } @@ -148,9 +148,9 @@ shellcheck { // tasks.register('installGitHooks', Copy) { - from(file('config/hooks/pre-commit-stub')) { - rename 'pre-commit-stub', 'pre-commit' - } - into file('.git/hooks') - fileMode 0777 + from(file('config/hooks/pre-commit-stub')) { + rename 'pre-commit-stub', 'pre-commit' + } + into file('.git/hooks') + fileMode 0777 } diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index 481be0dc74..85b515f945 100755 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -32,8 +32,8 @@ if (project.hasProperty("epApiVersion")) { } if (epApiVNum.compareTo(VersionNumber.parse(oldestErrorProneVersion)) < 0) { throw new IllegalArgumentException( - "Error Prone API version " + epApiVersion + " is too old; " - + oldestErrorProneVersion + " is the oldest supported version") + "Error Prone API version " + epApiVersion + " is too old; " + + oldestErrorProneVersion + " is the oldest supported version") } errorProneVersionToCompileAgainst = epApiVersion } @@ -77,9 +77,11 @@ def build = [ jspecify : "org.jspecify:jspecify:0.3.0", jsr305Annotations : "com.google.code.findbugs:jsr305:3.0.2", commonsIO : "commons-io:commons-io:2.11.0", - wala : ["com.ibm.wala:com.ibm.wala.util:${versions.wala}", - "com.ibm.wala:com.ibm.wala.shrike:${versions.wala}", - "com.ibm.wala:com.ibm.wala.core:${versions.wala}"], + wala : [ + "com.ibm.wala:com.ibm.wala.util:${versions.wala}", + "com.ibm.wala:com.ibm.wala.shrike:${versions.wala}", + "com.ibm.wala:com.ibm.wala.core:${versions.wala}" + ], commonscli : "commons-cli:commons-cli:${versions.commonscli}", // android stuff @@ -96,7 +98,10 @@ def support = [ def test = [ junit4 : "junit:junit:4.13.2", - junit5Jupiter : ["org.junit.jupiter:junit-jupiter-api:5.0.2","org.apiguardian:apiguardian-api:1.0.0"], + junit5Jupiter : [ + "org.junit.jupiter:junit-jupiter-api:5.0.2", + "org.apiguardian:apiguardian-api:1.0.0" + ], jetbrainsAnnotations : "org.jetbrains:annotations:13.0", cfQual : "org.checkerframework:checker-qual:${versions.checkerFramework}", // 2.5.5 is the last release to contain this artifact