diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index aeb938f2ce..a7d278d86e 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -66,9 +66,10 @@ jobs: env: ORG_GRADLE_PROJECT_epApiVersion: ${{ matrix.epVersion }} ORG_GRADLE_PROJECT_VERSION_NAME: '0.0.0.1-LOCAL' + ORG_GRADLE_PROJECT_RELEASE_SIGNING_ENABLED: 'false' uses: gradle/gradle-build-action@v2 with: - arguments: publishToMavenLocal -x signMavenPublication -x signShadowPublication + arguments: publishToMavenLocal if: matrix.java == '11' - name: Check that Git tree is clean after build and test run: ./.buildscript/check_git_clean.sh diff --git a/RELEASING.md b/RELEASING.md index 198a83b0dd..5ed5d44719 100755 --- a/RELEASING.md +++ b/RELEASING.md @@ -1,7 +1,13 @@ -IMPORTANT: Make sure you are using a JDK 8 JVM by checking `java -version` before any -of the steps below. If you run the steps below on a JDK 11+ JVM, that will break Java -8 support, as the released jars will only run on JDK 11. We do not target Java 8 when -building on JDK 11 since Error Prone has required Java 11 since version 2.11.0. +(For testing only) Publishing an unsigned LOCAL build +===================================================== +By default, we set `RELEASE_SIGNING_ENABLED=true` in `gradle.properties`, which means +published builds must be signed unless they are for a `SNAPSHOT` version. To publish +a non-`SNAPSHOT` build locally without signing (e.g., a `LOCAL` version), use the +following command: + +```bash +ORG_GRADLE_PROJECT_RELEASE_SIGNING_ENABLED=false ./gradlew publishToMavenLocal +``` (Recommended, but optional) Update JarInfer Android SDK Models ============================================================== diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index ccebba7710..033e24c4cd 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 19acfb4ef2..c2447881d4 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,8 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=ff7bf6a86f09b9b2c40bb8f48b25fc19cf2b2664fd1d220cd7ab833ec758d0d7 -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionSha256Sum=03ec176d388f2aa99defcadc3ac6adf8dd2bce5145a129659537c0874dea5ad1 +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 79a61d421c..fcb6fca147 100755 --- a/gradlew +++ b/gradlew @@ -85,9 +85,6 @@ done APP_BASE_NAME=${0##*/} APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,10 +130,13 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. @@ -197,6 +197,10 @@ if "$cygwin" || "$msys" ; then done fi + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + # Collect all arguments for the java command; # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # shell script including quotes and variable substitutions, so put them in diff --git a/jar-infer/jar-infer-cli/build.gradle b/jar-infer/jar-infer-cli/build.gradle index ac05e287a2..2d737e22b8 100644 --- a/jar-infer/jar-infer-cli/build.gradle +++ b/jar-infer/jar-infer-cli/build.gradle @@ -5,8 +5,10 @@ plugins { } // JarInfer requires JDK 11+, due to its dependence on WALA -sourceCompatibility JavaVersion.VERSION_11 -targetCompatibility JavaVersion.VERSION_11 +tasks.withType(JavaCompile) { + java.sourceCompatibility = JavaVersion.VERSION_11 + java.targetCompatibility = JavaVersion.VERSION_11 +} repositories { mavenCentral() @@ -119,17 +121,23 @@ publishing { dependsOn 'javaSourcesJar' dependsOn 'simpleJavadocJar' } - project.tasks.named('signShadowPublication').configure { - dependsOn 'sourcesJar' - dependsOn 'simpleJavadocJar' + if (project.tasks.findByName('signShadowPublication')) { + project.tasks.named('signShadowPublication').configure { + dependsOn 'sourcesJar' + dependsOn 'simpleJavadocJar' + } } project.tasks.named('publishShadowPublicationToMavenCentralRepository').configure { - dependsOn 'signMavenPublication' + if (project.tasks.findByName('signMavenPublication')) { + dependsOn 'signMavenPublication' + } } project.tasks.named('publishShadowPublicationToMavenLocal').configure { dependsOn 'sourcesJar' dependsOn 'simpleJavadocJar' - dependsOn 'signMavenPublication' + if (project.tasks.findByName('signMavenPublication')) { + dependsOn 'signMavenPublication' + } } } } diff --git a/jar-infer/jar-infer-lib/build.gradle b/jar-infer/jar-infer-lib/build.gradle index 70b00ecced..9327cc5152 100644 --- a/jar-infer/jar-infer-lib/build.gradle +++ b/jar-infer/jar-infer-lib/build.gradle @@ -19,8 +19,10 @@ plugins { } // JarInfer requires JDK 11+, due to its dependence on WALA -sourceCompatibility JavaVersion.VERSION_11 -targetCompatibility JavaVersion.VERSION_11 +tasks.withType(JavaCompile) { + java.sourceCompatibility = JavaVersion.VERSION_11 + java.targetCompatibility = JavaVersion.VERSION_11 +} repositories { mavenCentral()