Skip to content

Commit

Permalink
Update to Gradle 8.0.2 (uber#743)
Browse files Browse the repository at this point in the history
We had to update a couple other plugins and fix a couple of things in our Gradle build scripts to be compatible with Gradle 8.
  • Loading branch information
msridhar committed Mar 9, 2023
1 parent ad1aab1 commit 00adeaf
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 13 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.0.4'
classpath 'com.android.tools.build:gradle:7.3.0'
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.14.2'
// This restriction is needed due to our mix of Android and Java modules;
// without it, the build fails with a weird error.
Expand All @@ -37,7 +37,7 @@ buildscript {
plugins {
id "com.github.sherter.google-java-format" version "0.9"
id "net.ltgt.errorprone" version "3.0.1" apply false
id "com.github.johnrengelman.shadow" version "6.1.0" apply false
id "com.github.johnrengelman.shadow" version "8.1.0" apply false
id "com.github.kt3k.coveralls" version "2.12.0" apply false
id "me.champeau.jmh" version "0.6.8" apply false
id "com.github.ben-manes.versions" version "0.42.0"
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 2 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down
10 changes: 3 additions & 7 deletions jar-infer/jar-infer-cli/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jar {
shadowJar {
mergeServiceFiles()
configurations = [project.configurations.runtimeClasspath]
classifier = null
archiveClassifier = ""
}
shadowJar.dependsOn jar
assemble.dependsOn shadowJar
Expand Down Expand Up @@ -67,12 +67,8 @@ publishing {
// Since we are skipping the default maven publication, we append the `:sources` and
// `:javadoc` artifacts here. They are also required for Maven Central validation.
afterEvaluate {
artifact project.sourcesJar {
classifier "sources"
}
artifact project.javadocsJar {
classifier "javadoc"
}
artifact project.sourcesJar
artifact project.javadocsJar
}
// The shadow publication does not auto-configure the pom.xml file for us, so we need to
// set it up manually. We use the opportunity to change the name and description from
Expand Down
2 changes: 1 addition & 1 deletion jar-infer/test-java-lib-jarinfer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jar.doLast {
javaexec {
classpath = files("${rootProject.projectDir}/jar-infer/jar-infer-cli/build/libs/jar-infer-cli-${VERSION_NAME}.jar")
main = "com.uber.nullaway.jarinfer.JarInfer"
args = ["-i", jar.archivePath, "-o", "${jar.destinationDir}/${astubxPath}"]
args = ["-i", jar.archiveFile.get(), "-o", "${jar.destinationDirectory.get()}/${astubxPath}"]
}
exec {
workingDir "./build/libs"
Expand Down

0 comments on commit 00adeaf

Please sign in to comment.