Skip to content
Permalink
Browse files

fix(build): android release

  • Loading branch information...
cmgustavo committed Jun 24, 2019
1 parent afc10ab commit 109f6fa693a466c0ea57a91b7a7f0faeeb64333d
Showing with 33 additions and 12 deletions.
  1. +1 −1 app-template/apply.js
  2. +3 −2 app-template/config-template.xml
  3. +8 −0 build-extras.gradle
  4. +12 −0 copy-build-extras-gradle.js
  5. +6 −6 package-lock.json
  6. +3 −3 package.json
@@ -138,7 +138,7 @@ package.title = config.userVisibleName;
package.homepage = config.url;
package.repository.url = config.gitHubRepoUrl;
package.bugs.url = config.gitHubRepoBugs;
package.cordova.plugins['cordova-plugin-customurlscheme'].SECOND_URL_SCHEME =
package.cordova.plugins['cordova-plugin-customurlscheme-ng'].SECOND_URL_SCHEME =
config.packageName;
package.build.appId = config.packageNameIdDesktop;
package.build.productName = config.userVisibleName;
@@ -84,15 +84,15 @@
<plugin name="cordova-plugin-vibration" spec="3.1.0" />
<plugin name="cordova-plugin-file" spec="6.0.1" />
<plugin name="cordova-custom-config" spec="https://github.com/cmgustavo/cordova-custom-config.git#3a1902fb700dc8c1e9ac9db592aa48d7d900cde0" />
<plugin name="cordova-plugin-customurlscheme-ng" spec="5.0.0">
<plugin name="cordova-plugin-customurlscheme-ng" spec="5.0.1">
<variable name="URL_SCHEME" value="bitcoin" />
<variable name="SECOND_URL_SCHEME" value="*APPURI*" />
<variable name="THIRD_URL_SCHEME" value="bitcoincash" />
<variable name="ANDROID_SCHEME" value="" />
<variable name="ANDROID_HOST" value="" />
<variable name="ANDROID_PATHPREFIX" value="" />
</plugin>
<plugin name="cordova-plugin-fcm-ng" spec="3.0.2" />
<plugin name="cordova-plugin-fcm-ng" spec="3.0.4" />

<plugin name="cordova-plugin-wkwebview-engine" spec="1.1.4" />

@@ -134,6 +134,7 @@
</platform>

<platform name="android">
<hook src="copy-build-extras-gradle.js" type="before_build" />
<preference name="android-manifest/application/@android:allowBackup" value="false" />

<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
@@ -0,0 +1,8 @@
ext.postBuildExtras =
{
android {
defaultConfig { multiDexEnabled true }
lintOptions { disable 'MissingTranslation', 'ExtraTranslation' }
compileSdkVersion 28
}
}
@@ -0,0 +1,12 @@
var fs = require('fs');
var path = require('path');
var rootdir = process.env.PWD;
var platformAndroidPath = '/platforms/android/app/';
var srcFile = path.join(rootdir, 'build-extras.gradle');
var destFile = path.join(rootdir, platformAndroidPath, 'build-extras.gradle');
var destDir = path.dirname(destFile);
if (fs.existsSync(srcFile) && fs.existsSync(destDir)) {
fs.createReadStream(srcFile).pipe(fs.createWriteStream(destFile));
} else {
throw new Error('Unable to copy build-extras.gradle');
}

Some generated files are not rendered by default. Learn more.

@@ -191,10 +191,10 @@
"cordova-plugin-advanced-http": "2.0.8",
"cordova-plugin-android-fingerprint-auth": "1.4.3",
"cordova-plugin-compat": "1.2.0",
"cordova-plugin-customurlscheme-ng": "5.0.0",
"cordova-plugin-customurlscheme-ng": "5.0.1",
"cordova-plugin-device": "2.0.1",
"cordova-plugin-dialogs": "2.0.1",
"cordova-plugin-fcm-ng": "3.0.2",
"cordova-plugin-fcm-ng": "3.0.4",
"cordova-plugin-file": "6.0.1",
"cordova-plugin-globalization": "1.0.9",
"cordova-plugin-inappbrowser": "2.0.2",
@@ -288,7 +288,7 @@
"cordova-plugin-uniquedeviceid": {},
"cordova-plugin-file": {},
"cordova-custom-config": {},
"cordova-plugin-customurlscheme": {
"cordova-plugin-customurlscheme-ng": {
"URL_SCHEME": "bitcoin",
"SECOND_URL_SCHEME": "copay",
"THIRD_URL_SCHEME": "bitcoincash",

0 comments on commit 109f6fa

Please sign in to comment.
You can’t perform that action at this time.