Skip to content

Commit 144525e

Browse files
RickyNotaroclaude
andcommitted
chore: upgrade Capacitor from v6 to v8.3.0
- Upgrade all @capacitor/* packages to v8 - Bump Android Gradle Plugin to 8.13.0, Gradle wrapper to 8.14.3 - Raise minSdkVersion to 24, compileSdk/targetSdk to 36 - Require JDK 21 and Node 22 in CI - Add navigation|density to AndroidManifest configChanges - Exclude duplicate kotlin-stdlib-jdk7/jdk8 modules - Update google-services plugin to 4.4.4 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 8429914 commit 144525e

8 files changed

Lines changed: 210 additions & 296 deletions

File tree

.github/workflows/build-apk.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ jobs:
3030
- name: Setup Node.js
3131
uses: actions/setup-node@v4
3232
with:
33-
node-version: 20
33+
node-version: 22
3434
cache: npm
3535

3636
- name: Setup Java
3737
uses: actions/setup-java@v4
3838
with:
3939
distribution: temurin
40-
java-version: 17
40+
java-version: 21
4141

4242
- name: Setup Android SDK
4343
uses: android-actions/setup-android@v3

APK/android/app/capacitor.build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
android {
44
compileOptions {
5-
sourceCompatibility JavaVersion.VERSION_17
6-
targetCompatibility JavaVersion.VERSION_17
5+
sourceCompatibility JavaVersion.VERSION_21
6+
targetCompatibility JavaVersion.VERSION_21
77
}
88
}
99

APK/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
android:theme="@style/AppTheme">
1111

1212
<activity
13-
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
13+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode|navigation|density"
1414
android:name=".MainActivity"
1515
android:label="@string/title_activity_main"
1616
android:theme="@style/AppTheme.NoActionBarLaunch"

APK/android/build.gradle

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ buildscript {
77
mavenCentral()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:8.2.1'
11-
classpath 'com.google.gms:google-services:4.4.0'
10+
classpath 'com.android.tools.build:gradle:8.13.0'
11+
classpath 'com.google.gms:google-services:4.4.4'
1212

1313
// NOTE: Do not place your application dependencies here; they belong
1414
// in the individual module build.gradle files
@@ -22,6 +22,13 @@ allprojects {
2222
google()
2323
mavenCentral()
2424
}
25+
configurations.all {
26+
// Kotlin 1.8+ merges jdk7/jdk8 into kotlin-stdlib; exclude the old
27+
// standalone artifacts to avoid duplicate-class errors after the
28+
// Capacitor 8 upgrade.
29+
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk7'
30+
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk8'
31+
}
2532
}
2633

2734
task clean(type: Delete) {

APK/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

APK/android/variables.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
ext {
2-
minSdkVersion = 22
3-
compileSdkVersion = 34
4-
targetSdkVersion = 34
2+
minSdkVersion = 24
3+
compileSdkVersion = 36
4+
targetSdkVersion = 36
55
androidxActivityVersion = '1.8.0'
66
androidxAppCompatVersion = '1.6.1'
77
androidxCoordinatorLayoutVersion = '1.2.0'
8-
androidxCoreVersion = '1.12.0'
8+
androidxCoreVersion = '1.13.0'
99
androidxFragmentVersion = '1.6.2'
1010
coreSplashScreenVersion = '1.0.1'
1111
androidxWebkitVersion = '1.9.0'
1212
junitVersion = '4.13.2'
1313
androidxJunitVersion = '1.1.5'
1414
androidxEspressoCoreVersion = '3.5.1'
1515
cordovaAndroidVersion = '10.1.1'
16-
}
16+
}

0 commit comments

Comments
 (0)