forked from github/cordova-android
Fix Java tests for older Gradle versions
Before this, Gradle 4.4 was required to build the Gradle wrapper and thus run the Java tests. This was because of all the stuff that had to be configured when running the wrapper task using the build.gradle file. Now we use a config file that only specifies the required Gradle version and nothing else to run the wrapper task. This allows tests to be run with Gradle versions beginning with 2.
This commit is contained in:
parent
0d4b9f4ba6
commit
a254cfc841
@ -26,7 +26,7 @@ var superspawn = require('cordova-common').superspawn;
|
||||
// First we make sure the gradlew helper file is built and ready.
|
||||
var GradleBuilder = require('../bin/templates/cordova/lib/builders/GradleBuilder');
|
||||
var builder = new GradleBuilder(__dirname);
|
||||
var needs_gradlew_built = builder.runGradleWrapper('gradle', 'build.gradle');
|
||||
var needs_gradlew_built = builder.runGradleWrapper('gradle');
|
||||
|
||||
if (!needs_gradlew_built) {
|
||||
// Due to interface of gradle builder, if the gradlew file already exists, `runGradleWrapper` returns undefined.
|
||||
|
3
test/wrapper.gradle
Normal file
3
test/wrapper.gradle
Normal file
@ -0,0 +1,3 @@
|
||||
wrapper {
|
||||
gradleVersion = '4.4.1'
|
||||
}
|
Loading…
Reference in New Issue
Block a user