xref: /aosp_15_r20/external/nullaway/RELEASING.md (revision f50c306653bc89b8210ce6c9e0b0b44fc134bc03)
1*f50c3066SAndroid Build Coastguard Worker(For testing only) Publishing an unsigned LOCAL build
2*f50c3066SAndroid Build Coastguard Worker=====================================================
3*f50c3066SAndroid Build Coastguard WorkerBy default, we set `RELEASE_SIGNING_ENABLED=true` in `gradle.properties`, which means
4*f50c3066SAndroid Build Coastguard Workerpublished builds must be signed unless they are for a `SNAPSHOT` version.  To publish
5*f50c3066SAndroid Build Coastguard Workera non-`SNAPSHOT` build locally without signing (e.g., a `LOCAL` version), use the
6*f50c3066SAndroid Build Coastguard Workerfollowing command:
7*f50c3066SAndroid Build Coastguard Worker
8*f50c3066SAndroid Build Coastguard Worker```bash
9*f50c3066SAndroid Build Coastguard WorkerORG_GRADLE_PROJECT_RELEASE_SIGNING_ENABLED=false ./gradlew publishToMavenLocal
10*f50c3066SAndroid Build Coastguard Worker```
11*f50c3066SAndroid Build Coastguard Worker
12*f50c3066SAndroid Build Coastguard Worker(Recommended, but optional) Update JarInfer Android SDK Models
13*f50c3066SAndroid Build Coastguard Worker==============================================================
14*f50c3066SAndroid Build Coastguard Worker
15*f50c3066SAndroid Build Coastguard Worker 1. Change the version in `gradle.properties` to a non-SNAPSHOT version and `./gradlew build`.
16*f50c3066SAndroid Build Coastguard Worker 2. Get a copy of the AOSP `framework_intermediates` for the corresponding Android version.
17*f50c3066SAndroid Build Coastguard Worker    2a. At Uber? http://t.uber.com/aosp_framework_intermediate
18*f50c3066SAndroid Build Coastguard Worker    2b. Elsewhere? You can still build the corresponding AOSP version and look for
19*f50c3066SAndroid Build Coastguard Worker        out/target/common/obj/JAVA_LIBRARIES/**
20*f50c3066SAndroid Build Coastguard Worker 3. (first time) `cp jar-infer/scripts/android-jar.conf.template jar-infer/scripts/android-jar.conf`
21*f50c3066SAndroid Build Coastguard Worker 4. Set the correct paths and versions in `android-jar.conf`
22*f50c3066SAndroid Build Coastguard Worker 5. `rm jar-infer/android-jarinfer-models-sdk28/src/main/resources/jarinfer.astubx` (for SDK 28)
23*f50c3066SAndroid Build Coastguard Worker 6. `python jar-infer/scripts/android-jar.py`
24*f50c3066SAndroid Build Coastguard Worker 7. Continue to release instructions below
25*f50c3066SAndroid Build Coastguard Worker
26*f50c3066SAndroid Build Coastguard Worker
27*f50c3066SAndroid Build Coastguard WorkerReleasing
28*f50c3066SAndroid Build Coastguard Worker=========
29*f50c3066SAndroid Build Coastguard Worker
30*f50c3066SAndroid Build Coastguard Worker 1. Change the version in `gradle.properties` to a non-SNAPSHOT version.
31*f50c3066SAndroid Build Coastguard Worker 2. Update the `CHANGELOG.md` for the impending release.
32*f50c3066SAndroid Build Coastguard Worker 3. `git commit -am "Prepare for release X.Y.Z."` (where X.Y.Z is the new version)
33*f50c3066SAndroid Build Coastguard Worker 4. `git tag -a vX.Y.Z -m "Version X.Y.Z"` (where X.Y.Z is the new version)
34*f50c3066SAndroid Build Coastguard Worker 5. `./gradlew clean publish`
35*f50c3066SAndroid Build Coastguard Worker 6. Update the `gradle.properties` to the next SNAPSHOT version.
36*f50c3066SAndroid Build Coastguard Worker 7. `git commit -am "Prepare next development version."`
37*f50c3066SAndroid Build Coastguard Worker 8. `git push && git push --tags`
38*f50c3066SAndroid Build Coastguard Worker 9. Visit [Sonatype Nexus](https://oss.sonatype.org/) and promote the artifact.
39*f50c3066SAndroid Build Coastguard Worker 10. Go to [this page](https://github.com/uber/NullAway/releases/new) to create a new release on GitHub, using the release notes from `CHANGELOG.md`.
40