Skip to content

Commit

Permalink
Support AGP 8.0 & 8.1 & 8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
neighbWang committed Mar 1, 2024
1 parent c1fcb57 commit d62ca3a
Show file tree
Hide file tree
Showing 319 changed files with 2,436 additions and 16,815 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dokka.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
java-version: '17'
cache: 'gradle'
- shell: bash
run: ./gradlew reference -S --no-daemon
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
java-version: '17'
cache: 'gradle'
- shell: bash
run: |
echo "Create GPG private key"
echo $GPG_KEY_ARMOR | base64 --decode > $GITHUB_WORKSPACE/secring.gpg
./gradlew publishToSonatype closeAndReleaseStagingRepository -Pversion=${GITHUB_REF/refs\/tags\/v/} -POSSRH_USERNAME=${OSSRH_USERNAME} -POSSRH_PASSWORD=${OSSRH_PASSWORD} -POSSRH_STAGING_PROFILE_ID=${OSSRH_STAGING_PROFILE_ID} -Psigning.keyId=${GPG_KEY_ID} -Psigning.password=${GPG_PASSPHRASE} -Psigning.secretKeyRingFile=${GITHUB_WORKSPACE}/secring.gpg -S --no-daemon
env:
JAVA_OPTS: -Xmx8g -XX:MaxPermSize=1g -XX:MetaspaceSize=1g -Dfile.encoding=UTF-8
JVM_OPTS: -Xmx8g -XX:MaxPermSize=1g -XX:MetaspaceSize=1g -Dfile.encoding=UTF-8
JAVA_OPTS: -Xmx8g -XX:MetaspaceSize=1g -Dfile.encoding=UTF-8
JVM_OPTS: -Xmx8g -XX:MetaspaceSize=1g -Dfile.encoding=UTF-8
GPG_KEY_ARMOR: ${{ secrets.GPG_KEY_ARMOR }}
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
Expand Down
247 changes: 20 additions & 227 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
java-version: '17'
cache: 'gradle'
- uses: actions/cache@v3
with:
Expand All @@ -55,7 +55,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
java-version: '17'
cache: 'gradle'
- uses: actions/cache@v3
with:
Expand All @@ -73,278 +73,71 @@ jobs:
name: unit-test-report
path: '**/build/reports/tests/test'

integration-test-agp-v3_3:
name: AGP 3.3 Integration Test
integration-test-agp-v8_0:
name: AGP 8.0 Integration Test
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
java-version: '17'
cache: 'gradle'
- uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ github.run_number }}
- shell: bash
run: ./gradlew booster-android-gradle-v3_3:integrationTest -S --no-daemon -Pversion=${{ github.run_number }}
run: ./gradlew booster-android-gradle-v8_0:integrationTest -S --no-daemon -Pversion=${{ github.run_number }}
- uses: actions/upload-artifact@v3
if: failure()
with:
name: booster-android-gradle-v3_3
path: booster-android-gradle-v3_3/build/reports/tests/integrationTest
name: booster-android-gradle-v8_0
path: booster-android-gradle-v8_0/build/reports/tests/integrationTest

integration-test-agp-v3_4:
name: AGP 3.4 Integration Test
integration-test-agp-v8_1:
name: AGP 8.1 Integration Test
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
java-version: '17'
cache: 'gradle'
- uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ github.run_number }}
- shell: bash
run: ./gradlew booster-android-gradle-v3_4:integrationTest -S --no-daemon -Pversion=${{ github.run_number }}
run: ./gradlew booster-android-gradle-v8_1:integrationTest -S --no-daemon -Pversion=${{ github.run_number }}
- uses: actions/upload-artifact@v3
if: failure()
with:
name: booster-android-gradle-v3_4
path: booster-android-gradle-v3_4/build/reports/tests/integrationTest
name: booster-android-gradle-v8_1
path: booster-android-gradle-v8_1/build/reports/tests/integrationTest

integration-test-agp-v3_5:
name: AGP 3.5 Integration Test
integration-test-agp-v8_2:
name: AGP 8.2 Integration Test
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
java-version: '17'
cache: 'gradle'
- uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ github.run_number }}
- shell: bash
run: ./gradlew booster-android-gradle-v3_5:integrationTest -S --no-daemon -Pversion=${{ github.run_number }}
run: ./gradlew booster-android-gradle-v8_2:integrationTest -S --no-daemon -Pversion=${{ github.run_number }}
- uses: actions/upload-artifact@v3
if: failure()
with:
name: booster-android-gradle-v3_5
path: booster-android-gradle-v3_5/build/reports/tests/integrationTest

integration-test-agp-v3_6:
name: AGP 3.6 Integration Test
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
cache: 'gradle'
- uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ github.run_number }}
- shell: bash
run: ./gradlew booster-android-gradle-v3_6:integrationTest -S --no-daemon -Pversion=${{ github.run_number }}
- uses: actions/upload-artifact@v3
if: failure()
with:
name: booster-android-gradle-v3_6
path: booster-android-gradle-v3_6/build/reports/tests/integrationTest

integration-test-agp-v4_0:
name: AGP 4.0 Integration Test
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
cache: 'gradle'
- uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ github.run_number }}
- shell: bash
run: ./gradlew booster-android-gradle-v4_0:integrationTest -S --no-daemon -Pversion=${{ github.run_number }}
- uses: actions/upload-artifact@v3
if: failure()
with:
name: booster-android-gradle-v4_0
path: booster-android-gradle-v4_0/build/reports/tests/integrationTest

integration-test-agp-v4_1:
name: AGP 4.1 Integration Test
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
cache: 'gradle'
- uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ github.run_number }}
- shell: bash
run: ./gradlew booster-android-gradle-v4_1:integrationTest -S --no-daemon -Pversion=${{ github.run_number }}
- uses: actions/upload-artifact@v3
if: failure()
with:
name: booster-android-gradle-v4_1
path: booster-android-gradle-v4_1/build/reports/tests/integrationTest

integration-test-agp-v4_2:
name: AGP 4.2 Integration Test
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
cache: 'gradle'
- uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ github.run_number }}
- shell: bash
run: ./gradlew booster-android-gradle-v4_2:integrationTest -S --no-daemon -Pversion=${{ github.run_number }}
- uses: actions/upload-artifact@v3
if: failure()
with:
name: booster-android-gradle-v4_2
path: booster-android-gradle-v4_2/build/reports/tests/integrationTest

integration-test-agp-v7_0:
name: AGP 7.0 Integration Test
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
cache: 'gradle'
- uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ github.run_number }}
- shell: bash
run: ./gradlew booster-android-gradle-v7_0:integrationTest -S --no-daemon -Pversion=${{ github.run_number }}
- uses: actions/upload-artifact@v3
if: failure()
with:
name: booster-android-gradle-v7_0
path: booster-android-gradle-v7_0/build/reports/tests/integrationTest

integration-test-agp-v7_1:
name: AGP 7.1 Integration Test
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
cache: 'gradle'
- uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ github.run_number }}
- shell: bash
run: ./gradlew booster-android-gradle-v7_1:integrationTest -S --no-daemon -Pversion=${{ github.run_number }}
- uses: actions/upload-artifact@v3
if: failure()
with:
name: booster-android-gradle-v7_1
path: booster-android-gradle-v7_1/build/reports/tests/integrationTest

integration-test-agp-v7_2:
name: AGP 7.2 Integration Test
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
cache: 'gradle'
- uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ github.run_number }}
- shell: bash
run: ./gradlew booster-android-gradle-v7_2:integrationTest -S --no-daemon -Pversion=${{ github.run_number }}
- uses: actions/upload-artifact@v3
if: failure()
with:
name: booster-android-gradle-v7_2
path: booster-android-gradle-v7_2/build/reports/tests/integrationTest

integration-test-agp-v7_3:
name: AGP 7.3 Integration Test
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
cache: 'gradle'
- uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ github.run_number }}
- shell: bash
run: ./gradlew booster-android-gradle-v7_3:integrationTest -S --no-daemon -Pversion=${{ github.run_number }}
- uses: actions/upload-artifact@v3
if: failure()
with:
name: booster-android-gradle-v7_3
path: booster-android-gradle-v7_3/build/reports/tests/integrationTest

integration-test-agp-v7_4:
name: AGP 7.4 Integration Test
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
cache: 'gradle'
- uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ github.run_number }}
- shell: bash
run: ./gradlew booster-android-gradle-v7_4:integrationTest -S --no-daemon -Pversion=${{ github.run_number }}
- uses: actions/upload-artifact@v3
if: failure()
with:
name: booster-android-gradle-v7_4
path: booster-android-gradle-v7_4/build/reports/tests/integrationTest
name: booster-android-gradle-v8_2
path: booster-android-gradle-v8_2/build/reports/tests/integrationTest
4 changes: 2 additions & 2 deletions booster-aapt2/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apply from: "$rootDir/gradle/booster.gradle"

dependencies {
api 'com.google.protobuf:protobuf-java:3.10.0'
testImplementation 'com.android.tools.build:gradle:4.0.0'
api 'com.google.protobuf:protobuf-java:3.19.3'
testImplementation 'com.android.tools.build:gradle:8.0.0'
}
2 changes: 0 additions & 2 deletions booster-android-api/src/main/java/android/os/Build.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ public static class VERSION {
private static final String[] ALL_CODENAMES = getStringList("ro.build.version.all_codenames", ",");

/**
* @hide
*/
public static final String[] ACTIVE_CODENAMES = "REL".equals(ALL_CODENAMES[0])
? new String[0] : ALL_CODENAMES;
Expand All @@ -161,7 +160,6 @@ public static class VERSION {
* Use the current SDK version code. For every active development codename
* we are operating under, we bump the assumed resource platform version by 1.
*
* @hide
*/
public static final int RESOURCES_SDK_INT = SDK_INT + ACTIVE_CODENAMES.length;

Expand Down
5 changes: 2 additions & 3 deletions booster-android-api/src/main/java/android/util/Log.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@
* into an application except during development. Debug logs are compiled
* in but stripped at runtime. Error, warning and info logs are always kept.
*
* <p><b>Tip:</b> A good convention is to declare a <code>TAG</code> constant
* <b>Tip:</b> A good convention is to declare a <code>TAG</code> constant
* in your class:
*
* <pre>private static final String TAG = "MyActivity";</pre>
*
* and use that in subsequent calls to the log methods.
* </p>
*
* <p><b>Tip:</b> Don't forget that when you make a call like
* <b>Tip:</b> Don't forget that when you make a call like
* <pre>Log.v(TAG, "index=" + i);</pre>
* that when you're building the string to pass into Log.d, the compiler uses a
* StringBuilder and at least three allocations occur: the StringBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ public interface OnScrollChangedListener {
* This is only used for non-Activity windows. Activity windows can use
* Activity.onEnterAnimationComplete() to get the same signal.
*
* @hide
*/
public interface OnWindowShownListener {
/**
Expand Down
Loading

0 comments on commit d62ca3a

Please sign in to comment.