LucasFebatis commented on issue #1288:
URL:
https://github.com/apache/cordova-android/issues/1288#issuecomment-887819881
I'm working with Ionic and it's forcing me to use cordova-android 9.1.0 and
I'm getting the same error build tools 31.0.0
I found out that in the cordovaLib module that is generated, in build.gradle
it generates with this snippet
```
ext {
apply from: 'cordova.gradle'
cdvCompileSdkVersion = privateHelpers.getProjectTarget()
cdvBuildToolsVersion = privateHelpers.findLatestInstalledBuildTools()
if (project.hasProperty('cdvMinSdkVersion') &&
cdvMinSdkVersion.isInteger()) {
cdvMinSdkVersion = cdvMinSdkVersion as int
println '[Cordova] cdvMinSdkVersion is overridden, try it at your
own risk.'
} else {
cdvMinSdkVersion = 22; // current Cordova's default
}
}
```
Which makes any attempt to change buildtools by environment variable or
arguments impossible, because it will always use the most current version
installed on the machine.
What is simple to be solved in a local development, boring but simple.
But now to update on my CI/CDs that already come with all versions available
to me, what do I do?
I only see two work around
- Create a vm image with the version of BuildTools I need (Too much work)
- Create a step to replace the generated build.gradle with a template (Which
is really annoying, since one day Android or Cordova or Ionic will fix these
problems, and then I'll have to discard this step)
--
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]