Skip to content

Commit

Permalink
feat: add support for cordova-android 10
Browse files Browse the repository at this point in the history
  • Loading branch information
sinedied committed Dec 10, 2021
1 parent e601890 commit edb0454
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,17 +229,24 @@ class NgxScriptsCli {
fs.ensureDirSync(options.copy);
let copied = false;

let androidApkPath = `platforms/android/app/build/outputs/apk/${
let androidApkPath = `platforms/android/app/build/outputs/bundle/${
options.release ? 'release' : 'debug'
}`;
if (fs.existsSync(androidApkPath)) {
// For cordova-android < 10 compatibility
androidApkPath = `platforms/android/app/build/outputs/apk/${
options.release ? 'release' : 'debug'
}`;
}

if (!fs.existsSync('platforms/android/app/build')) {
// For cordova-android < 7 compatibility
androidApkPath = 'platforms/android/build/outputs/apk';
}

const androidPath = `${androidApkPath}/*-${
options.release ? 'release' : 'debug'
}*.apk`;
}*.*`;
copied = copied || this._copy(androidPath, options.copy);
copied =
copied ||
Expand Down

0 comments on commit edb0454

Please sign in to comment.