Skip to content

Commit

Permalink
Revert #762 (Grade upgrade) and add CI checking of publishing flows (#…
Browse files Browse the repository at this point in the history
…767)

A recent upgrade to our gradle version (#762) silently broke our
publishing flows.

In particular, `publish` and `publishToMavenLocal` are broken on Java 8,
resulting in the following error:

```
Execution failed for task ':annotations:publishMavenPublicationToMavenLocal'.
> Failed to publish publication 'maven' to repository 'mavenLocal'
   > Invalid publication 'maven': artifact file does not exist: '/home/runner/work/NullAway/NullAway/annotations/build/publications/maven/module.json.asc'
```

See this [CI job
run](https://github.com/uber/NullAway/actions/runs/5261437721/jobs/9509542067?pr=767).
There are further errors when the release is signed.

Below, we revert the gradle upgrade, and also add a CI job running
`publishToMavenLocal` to prevent
future regressions (We can't trivially test signing these publications
in a secure manner, unfortunately,
so we skip that for now. If that specifically breaks in the future, we
could provide a test gpg key for signing
in CI).
  • Loading branch information
lazaroclapp committed Jun 14, 2023
1 parent d09ff9b commit 1ff88b6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ jobs:
arguments: coveralls
continue-on-error: true
if: runner.os == 'Linux' && matrix.java == '11' && matrix.epVersion == '2.19.1' && github.repository == 'uber/NullAway'
- name: Test publishToMavenLocal flow
env:
ORG_GRADLE_PROJECT_epApiVersion: ${{ matrix.epVersion }}
ORG_GRADLE_PROJECT_VERSION_NAME: '0.0.0.1-LOCAL'
uses: gradle/gradle-build-action@v2
with:
arguments: publishToMavenLocal -x signMavenPublication -x signShadowPublication
if: matrix.java == '8'
- name: Check that Git tree is clean after build and test
run: ./.buildscript/check_git_clean.sh
publish_snapshot:
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=e111cb9948407e26351227dabce49822fb88c37ee72f1d1582a69c68af2e702f
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionSha256Sum=ff7bf6a86f09b9b2c40bb8f48b25fc19cf2b2664fd1d220cd7ab833ec758d0d7
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
7 changes: 3 additions & 4 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ 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

Expand Down Expand Up @@ -194,10 +197,6 @@ 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
Expand Down

0 comments on commit 1ff88b6

Please sign in to comment.