erisu commented on a change in pull request #1212:
URL: https://github.com/apache/cordova-android/pull/1212#discussion_r663651848
##########
File path: framework/cordova.gradle
##########
@@ -151,12 +150,44 @@ def doGetConfigPreference(name, defaultValue) {
return ret
}
+def doApplyCordovaConfigCustomization() {
+ // Apply user overide properties that comes from the "--gradleArg=-P"
parameters
+ if (project.hasProperty('cdvMinSdkVersion')) {
+ cordovaConfig.MIN_SDK_VERSION = Integer.parseInt('' + cdvMinSdkVersion)
+ }
+ if (project.hasProperty('cdvSdkVersion')) {
+ cordovaConfig.SDK_VERSION = Integer.parseInt('' + cdvSdkVersion)
+ }
+ if (project.hasProperty('cdvMaxSdkVersion')) {
+ cordovaConfig.MAX_SDK_VERSION = Integer.parseInt('' + cdvMaxSdkVersion)
+ }
+ if (project.hasProperty('cdvBuildToolsVersion')) {
+ cordovaConfig.BUILD_TOOLS_VERSION = cdvBuildToolsVersion
+ }
+ if (project.hasProperty('cdvAndroidXAppCompatVersion')) {
+ cordovaConfig.ANDROIDX_APP_COMPAT_VERSION = cdvAndroidXAppCompatVersion
+ }
+
+ // Ensure the latest installed build tools is selected, with or without
defined override
+ cordovaConfig.LATEST_INSTALLED_BUILD_TOOLS =
doFindLatestInstalledBuildTools(
+ cordovaConfig.BUILD_TOOLS_VERSION
+ )
+}
+
// Properties exported here are visible to all plugins.
ext {
+ def jsonFile = new File("$rootDir/config.json")
+ def parsedJson = new groovy.json.JsonSlurper().parseText(jsonFile.text)
+
+ cordovaConfig = parsedJson
Review comment:
Was combined.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]