Upgrade Android build tooling for 0.5.20
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -27,6 +27,8 @@ npm run android:apk
|
|||||||
|
|
||||||
The debug APK is written to `android/app/build/outputs/apk/debug/app-debug.apk` and copied to `release/ep-mail <version>-debug.apk`; install it on a connected test device with `adb install -r android/app/build/outputs/apk/debug/app-debug.apk`. For a signed release, configure `EP_MAIL_ANDROID_STORE_FILE` (an absolute path), `EP_MAIL_ANDROID_STORE_PASSWORD`, `EP_MAIL_ANDROID_KEY_ALIAS`, and `EP_MAIL_ANDROID_KEY_PASSWORD` in the build environment, then run `npm run android:release-apk`. The signed artifact is copied to `release/ep-mail <version>.apk`; keep keystores and passwords out of the repository and logs. The first account enables a visible, ongoing foreground-service notification while IMAP IDLE checks for new mail; Android also runs a network-constrained periodic reconciliation. Notification sender/subject details are hidden by default; enabling them in Settings still keeps lock-screen previews redacted. Android may delay or stop background activity after force-stop, prolonged device restrictions, or vendor battery management.
|
The debug APK is written to `android/app/build/outputs/apk/debug/app-debug.apk` and copied to `release/ep-mail <version>-debug.apk`; install it on a connected test device with `adb install -r android/app/build/outputs/apk/debug/app-debug.apk`. For a signed release, configure `EP_MAIL_ANDROID_STORE_FILE` (an absolute path), `EP_MAIL_ANDROID_STORE_PASSWORD`, `EP_MAIL_ANDROID_KEY_ALIAS`, and `EP_MAIL_ANDROID_KEY_PASSWORD` in the build environment, then run `npm run android:release-apk`. The signed artifact is copied to `release/ep-mail <version>.apk`; keep keystores and passwords out of the repository and logs. The first account enables a visible, ongoing foreground-service notification while IMAP IDLE checks for new mail; Android also runs a network-constrained periodic reconciliation. Notification sender/subject details are hidden by default; enabling them in Settings still keeps lock-screen previews redacted. Android may delay or stop background activity after force-stop, prolonged device restrictions, or vendor battery management.
|
||||||
|
|
||||||
|
Android builds use the Gradle wrapper and Android Gradle Plugin 9.4.0. Capacitor's generated modules are aligned to that plugin version during the build; the legacy Android DSL and external Kotlin plugin remain enabled for compatibility and must be migrated before upgrading to AGP 10.
|
||||||
|
|
||||||
On Android, previously cached folder messages appear while the mailbox refreshes; a folder without cached messages still needs to load from the server. Folder discovery and message actions run separately from cached-folder loading. The app stays in the message list until you select a message; returning to the list does not automatically reopen the newest message.
|
On Android, previously cached folder messages appear while the mailbox refreshes; a folder without cached messages still needs to load from the server. Folder discovery and message actions run separately from cached-folder loading. The app stays in the message list until you select a message; returning to the list does not automatically reopen the newest message.
|
||||||
|
|
||||||
While reading a message on Android, swipe in from the screen edge using the system Back gesture, or use the Back button in the reader, to return to the same position in the message list.
|
While reading a message on Android, swipe in from the screen edge using the system Back gesture, or use the Back button in the reader, to return to the same position in the message list.
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ android {
|
|||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
minifyEnabled false
|
minifyEnabled false
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
if (hasCompleteReleaseSigning) signingConfig signingConfigs.release
|
if (hasCompleteReleaseSigning) signingConfig signingConfigs.release
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ buildscript {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:8.13.0'
|
classpath 'com.android.tools.build:gradle:9.4.0'
|
||||||
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.21'
|
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.21'
|
||||||
classpath 'com.google.gms:google-services:4.4.4'
|
classpath 'com.google.gms:google-services:4.4.4'
|
||||||
|
|
||||||
@@ -19,6 +19,12 @@ buildscript {
|
|||||||
apply from: "variables.gradle"
|
apply from: "variables.gradle"
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
|
// Capacitor-generated modules declare their own AGP version.
|
||||||
|
buildscript {
|
||||||
|
configurations.classpath {
|
||||||
|
resolutionStrategy.force 'com.android.tools.build:gradle:9.4.0'
|
||||||
|
}
|
||||||
|
}
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|||||||
@@ -20,3 +20,6 @@ org.gradle.jvmargs=-Xmx1536m
|
|||||||
# Android operating system, and which are packaged with your app's APK
|
# Android operating system, and which are packaged with your app's APK
|
||||||
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
|
# Capacitor's generated modules and the current Kotlin plugin still use the legacy AGP APIs.
|
||||||
|
android.builtInKotlin=false
|
||||||
|
android.newDsl=false
|
||||||
|
|||||||
+2
-1
@@ -1,6 +1,7 @@
|
|||||||
|
#Mon Nov 09 22:05:03 EET 2026
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.1-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "ep-mail",
|
"name": "ep-mail",
|
||||||
"version": "0.5.19",
|
"version": "0.5.20",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "ep-mail",
|
"name": "ep-mail",
|
||||||
"version": "0.5.19",
|
"version": "0.5.20",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@capacitor/android": "^8.5.2",
|
"@capacitor/android": "^8.5.2",
|
||||||
"@capacitor/core": "^8.5.2",
|
"@capacitor/core": "^8.5.2",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ep-mail",
|
"name": "ep-mail",
|
||||||
"version": "0.5.19",
|
"version": "0.5.20",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "Eternity Project mail client",
|
"description": "Eternity Project mail client",
|
||||||
"homepage": "https://git.eternityproject.fi/thuttu/ep-mail-client",
|
"homepage": "https://git.eternityproject.fi/thuttu/ep-mail-client",
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ const buildAll = fs.readFileSync(path.join(root, 'scripts', 'build-all.ps1'), 'u
|
|||||||
const androidDebugScript = fs.readFileSync(path.join(root, 'scripts', 'build-android-apk.cjs'), 'utf8');
|
const androidDebugScript = fs.readFileSync(path.join(root, 'scripts', 'build-android-apk.cjs'), 'utf8');
|
||||||
const androidReleaseScript = fs.readFileSync(path.join(root, 'scripts', 'build-android-release-apk.cjs'), 'utf8');
|
const androidReleaseScript = fs.readFileSync(path.join(root, 'scripts', 'build-android-release-apk.cjs'), 'utf8');
|
||||||
const desktopWorkflow = fs.readFileSync(path.join(root, '.github', 'workflows', 'desktop-build.yml'), 'utf8');
|
const desktopWorkflow = fs.readFileSync(path.join(root, '.github', 'workflows', 'desktop-build.yml'), 'utf8');
|
||||||
|
const androidRootBuild = fs.readFileSync(path.join(root, 'android', 'build.gradle'), 'utf8');
|
||||||
|
const androidProperties = fs.readFileSync(path.join(root, 'android', 'gradle.properties'), 'utf8');
|
||||||
|
const androidWrapper = fs.readFileSync(path.join(root, 'android', 'gradle', 'wrapper', 'gradle-wrapper.properties'), 'utf8');
|
||||||
|
|
||||||
test('package metadata and lockfile share one release version', () => {
|
test('package metadata and lockfile share one release version', () => {
|
||||||
assert.equal(packageLock.version, packageJson.version);
|
assert.equal(packageLock.version, packageJson.version);
|
||||||
@@ -45,3 +48,15 @@ test('Android debug APK is labeled as debug and release APK requires signing cre
|
|||||||
assert.match(androidReleaseScript, /EP_MAIL_ANDROID_KEY_PASSWORD/);
|
assert.match(androidReleaseScript, /EP_MAIL_ANDROID_KEY_PASSWORD/);
|
||||||
assert.match(androidReleaseScript, /ep-mail \$\{version\}\.apk/);
|
assert.match(androidReleaseScript, /ep-mail \$\{version\}\.apk/);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('Android Gradle and generated Capacitor modules use a compatible plugin version', () => {
|
||||||
|
const plugin = androidRootBuild.match(/classpath 'com\.android\.tools\.build:gradle:([^']+)'/);
|
||||||
|
const forced = androidRootBuild.match(/resolutionStrategy\.force 'com\.android\.tools\.build:gradle:([^']+)'/);
|
||||||
|
assert.ok(plugin && forced);
|
||||||
|
assert.equal(plugin[1], forced[1]);
|
||||||
|
assert.equal(plugin[1], '9.4.0');
|
||||||
|
assert.match(androidWrapper, /gradle-9\.7\.1-bin\.zip/);
|
||||||
|
assert.match(androidProperties, /^android\.builtInKotlin=false$/m);
|
||||||
|
assert.match(androidProperties, /^android\.newDsl=false$/m);
|
||||||
|
assert.match(androidBuild, /getDefaultProguardFile\('proguard-android-optimize\.txt'\)/);
|
||||||
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user