build: build cordova.js during npm prepare (#1271)

This commit is contained in:
Raphael von der Grün
2021-07-14 10:25:34 +02:00
committed by GitHub
parent b94409ffe0
commit 35f0d07521
8 changed files with 92 additions and 4114 deletions
+5
View File
@@ -50,7 +50,12 @@ class AndroidTestRunner {
return Promise.resolve()
.then(_ => console.log(`[${this.testTitle}] Preparing Gradle wrapper for Java unit tests.`))
.then(_ => {
// TODO we should probably not only copy these files, but instead create a new project from scratch
fs.copyFileSync(path.resolve(this.projectDir, '../../framework/cdv-gradle-config-defaults.json'), path.resolve(this.projectDir, 'cdv-gradle-config.json'));
fs.copyFileSync(
path.join(__dirname, '../templates/project/assets/www/cordova.js'),
path.join(this.projectDir, 'app/src/main/assets/www/cordova.js')
);
})
.then(_ => this._createProjectBuilder())
.then(_ => this._gradlew('--version'))