Skip to content
Snippets Groups Projects
Commit 357d4417 authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

[enh] Cordova build: execute copy build files, AFTER...

[enh] Cordova build: execute copy build files, AFTER cordova-plugin-androidx-adapter (inside ths hook before_compile)
parent b0b9ba41
No related branches found
No related tags found
No related merge requests found
Pipeline #9504 failed
<?xml version='1.0' encoding='utf-8'?>
<widget android-versionCode="106070" id="fr.duniter.cesium" ios-CFBundleIdentifier="org.duniter.cesium" version="1.6.7" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget android-versionCode="106080" id="fr.duniter.cesium" ios-CFBundleIdentifier="org.duniter.cesium" version="1.6.8" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Cesium</name>
<description>
An simple App for Duniter wallet
......@@ -15,13 +15,13 @@
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<allow-intent href="june://*/*" />
<allow-intent href="web+june://*/*" />
<allow-intent href="june:*" />
<allow-intent href="web+june:*" />
<allow-navigation href="http://*/*" />
<allow-navigation href="https://*/*" />
<allow-navigation href="data:*" />
<allow-navigation href="june://*/*" />
<allow-navigation href="web+june://*/*" />
<allow-navigation href="june:*" />
<allow-navigation href="web+june:*" />
<icon src="www/img/logo_96px.png" />
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
......@@ -38,7 +38,9 @@
<preference name="StatusBarBackgroundColor" value="#000" />
<preference name="StatusBarStyle" value="lightcontent" />
<preference name="loadUrlTimeoutValue" value="700000" />
<allow-navigation href="*" />
<hook src="scripts/hooks/before_prepare.js" type="before_prepare" />
<hook src="scripts/hooks/after_prepare.js" type="after_prepare" />
<hook src="scripts/hooks/before_compile.js" type="before_compile" />
<feature name="StatusBar">
<param name="ios-package" onload="true" value="CDVStatusBar" />
</feature>
......@@ -58,8 +60,6 @@
<preference name="AndroidLaunchMode" value="singleTask" />
<preference name="android-minSdkVersion" value="16" />
<preference name="android-targetSdkVersion" value="29" />
<hook src="scripts/hooks/before_prepare.js" type="before_prepare" />
<hook src="scripts/hooks/after_prepare.js" type="after_prepare" />
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
<icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
......
......@@ -1439,6 +1439,14 @@ const cdvAfterPrepare = gulp.series(
);
exports.cdvAfterPrepare = cdvAsHook(cdvAfterPrepare);
const cdvBeforeCompile = gulp.series(
cdvCleanUnusedDirectories,
cdvCopyBuildFiles,
cdvAndroidManifest,
cdvAndroidCheckSigning
);
exports.cdvBeforeCompile = cdvAsHook(cdvBeforeCompile);
exports.default = gulp.series(appConfig, build);
exports.serveBefore = gulp.series(build, appAndPluginWatch);
exports['ionic:serve:before'] = exports.serveBefore; // Alias need need by @ionic/cli
#!/usr/bin/env node
const gulp = require('gulp'),
path = require("path"),
log = require('fancy-log'),
colors = require('ansi-colors');
module.exports = function(context) {
const now = Date.now();
log("Executing '" + colors.cyan("before_compile") + "' hook...");
const projectRoot = context && context.opts && context.opts.projectRoot || '.';
const platforms = context && context.opts && context.opts.platforms || ['android'];
const gulpFile = require(path.join(projectRoot, 'gulpfile'));
if (!projectRoot || !platforms || !gulpFile) return; // Skip
return Promise.all(platforms
.map(platform => {
return new Promise(done => gulpFile.cdvBeforeCompile(done, projectRoot, platform.trim().toLowerCase()));
}))
.then(() => {
log(colors.grey("Hook 'before_compile' finished in " + (Date.now() - now) + 'ms'));
});
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment