Skip to content

Commit a626406

Browse files
Fix Android samples and CI for AGP 9.1.
Use legacy DSL opt-out, declare r8Version, apply common.gradle to subprojects, drop kotlin.android plugin, and update ProGuard defaults for R8. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 3a2b337 commit a626406

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

‎build.gradle‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
allprojects {
2+
apply from: "$rootDir/gradle/common.gradle"
3+
24
buildscript {
35
apply from: "$rootDir/gradle/common.gradle"
46

‎gradle.properties‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
org.gradle.jvmargs=-Xmx4g -XX:+UseParallelGC -Dfile.encoding=UTF-8
2+
android.newDsl=false
3+
r8Version=9.1.29
24
kotlin.incremental=true
35
android.useAndroidX=true
46
lightsaber.shadow.enabled=false

‎lightsaber/src/functionalTest/java/com/joom/lightsaber/plugin/AndroidLightsaberPluginTest.kt‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,13 @@ internal class AndroidLightsaberPluginTest(private val case: TestCase) {
124124
}
125125
126126
android {
127-
compileSdk $compileSdk
128-
buildToolsVersion "$buildToolsVersion"
127+
compileSdk = $compileSdk
129128
130129
defaultConfig {
131130
applicationId "com.joom.lightsaber.test"
132131
namespace "com.joom.lightsaber.test"
132+
minSdk = 21
133+
targetSdk = $compileSdk
133134
versionCode 1
134135
versionName "1"
135136
}

‎samples/sample-android-kotlin/build.gradle‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
apply plugin: 'com.android.application'
2-
apply plugin: 'org.jetbrains.kotlin.android'
32
apply plugin: 'com.joom.lightsaber.android'
43

54
android {
@@ -19,12 +18,12 @@ android {
1918
buildTypes {
2019
debug {
2120
minifyEnabled false
22-
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.pro'
21+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard.pro'
2322
}
2423

2524
release {
2625
minifyEnabled true
27-
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.pro'
26+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard.pro'
2827
}
2928
}
3029

0 commit comments

Comments
 (0)