mirror of
https://github.com/apache/cordova-android.git
synced 2026-05-11 00:00:05 +08:00
feat: allow appcompat version to be configurable (#1208)
This commit is contained in:
Vendored
+5
@@ -61,6 +61,7 @@ module.exports.prepare = function (cordovaProject, options) {
|
||||
const targetSdkVersion = this._config.getPreference('android-targetSdkVersion', 'android');
|
||||
const isGradlePluginKotlinEnabled = this._config.getPreference('GradlePluginKotlinEnabled', 'android');
|
||||
const gradlePluginKotlinCodeStyle = this._config.getPreference('GradlePluginKotlinCodeStyle', 'android');
|
||||
const androidXAppCompatVersion = this._config.getPreference('AndroidXAppCompatVersion', 'android');
|
||||
|
||||
const gradlePropertiesUserConfig = {};
|
||||
if (minSdkVersion) gradlePropertiesUserConfig.cdvMinSdkVersion = minSdkVersion;
|
||||
@@ -71,6 +72,10 @@ module.exports.prepare = function (cordovaProject, options) {
|
||||
gradlePropertiesUserConfig['kotlin.code.style'] = gradlePluginKotlinCodeStyle || 'official';
|
||||
}
|
||||
|
||||
if (androidXAppCompatVersion) {
|
||||
gradlePropertiesUserConfig.cdvAndroidXAppCompatVersion = androidXAppCompatVersion;
|
||||
}
|
||||
|
||||
const gradlePropertiesParser = new GradlePropertiesParser(this.locations.root);
|
||||
gradlePropertiesParser.configure(gradlePropertiesUserConfig);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user