Upgrade Android build tooling for 0.5.20
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -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 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 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', () => {
|
||||
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 \$\{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