Skip to content

Commit 189a1fb

Browse files
Fix the build for android gradle plugin 9.0.1 (#181)
* Bump com.android.tools.build:gradle from 8.13.2 to 9.0.1 Bumps com.android.tools.build:gradle from 8.13.2 to 9.0.1. --- updated-dependencies: - dependency-name: com.android.tools.build:gradle dependency-version: 9.0.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * temporary fix for building with AGP 9.0.1 * fix PdTest progard build error with AGP 9.0.1 * fix CI on gradle update * bump version 1.4.2-SNAPSHOT --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 77f327b commit 189a1fb

6 files changed

Lines changed: 20 additions & 8 deletions

File tree

.github/workflows/android.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ jobs:
2525
- run: |
2626
git submodule sync --recursive
2727
git submodule update --init --recursive
28-
- run: ./gradlew androidDependencies
2928
- run: ./gradlew clean
3029
- run: ./gradlew PdCore:pd-core:build
3130
env:

PdCore/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ buildscript {
44
mavenCentral()
55
}
66
dependencies {
7-
classpath 'com.android.tools.build:gradle:8.13.2'
7+
classpath 'com.android.tools.build:gradle:9.0.1'
88
}
99
}
1010

@@ -23,7 +23,7 @@ allprojects {
2323
// These are specific to PdCore, but nexusPublishing needs them here:
2424
// https://github.com/gradle-nexus/publish-plugin/issues/84
2525
group = 'io.github.libpd.android'
26-
version = '1.4.1-SNAPSHOT'
26+
version = '1.4.2-SNAPSHOT'
2727

2828
// Create a Sonatype user token for these environment variables:
2929
// export ORG_GRADLE_PROJECT_sonatypeUsername="<tokenUsername>"

PdCore/gradle.properties

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,14 @@
1-
android.useAndroidX=true
1+
android.useAndroidX=true
2+
3+
# Bumping android gradle plugin from 8.13.2 to 9.0.1 breaks pd-core/build.gradle at 2 places:
4+
#
5+
# - android.libraryVariants cannot be resolved (used to rename the output aar).
6+
# It should be replaced with androidComponents{onVariants} but I couldn't get it to work...
7+
#
8+
# - android.compileSdk cannot be resolved either (needed to locate the android.jar for building javadoc)
9+
# I couldn't find a replacement.
10+
#
11+
# Using 'android.newDsl=false' is a temporary fix, until a solution is found for these 2 problems:
12+
13+
android.newDsl=false
14+

PdTest/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ android {
3131
buildTypes {
3232
release {
3333
minifyEnabled true
34-
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
34+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
3535
}
3636
}
3737

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ allprojects {
4545

4646
```gradle
4747
dependencies {
48-
implementation 'io.github.libpd.android:pd-core:1.4.1-SNAPSHOT'
48+
implementation 'io.github.libpd.android:pd-core:1.4.2-SNAPSHOT'
4949
}
5050
```
5151

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ buildscript {
44
mavenCentral()
55
}
66
dependencies {
7-
classpath 'com.android.tools.build:gradle:8.13.2'
7+
classpath 'com.android.tools.build:gradle:9.0.1'
88
}
99
}
1010

@@ -20,5 +20,5 @@ ext {
2020
compileSdk = 34
2121
androidxLegacySupportVersion = '1.0.0'
2222
ndkVersion = libs.versions.ndk.get()
23-
pdCoreVersion = '1.4.1-SNAPSHOT' // Must match version in PdCore/build.gradle
23+
pdCoreVersion = '1.4.2-SNAPSHOT' // Must match version in PdCore/build.gradle
2424
}

0 commit comments

Comments
 (0)