Skip to content

Commit

Permalink
chore(android): forward --sdk in module build process
Browse files Browse the repository at this point in the history
  • Loading branch information
m1ga committed Sep 14, 2024
1 parent f3676e1 commit 8c6e312
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion android/cli/commands/_buildModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ const androidDetect = require('../lib/detect').detect,
__ = appc.i18n(__dirname).__,
version = appc.version;

let tiSdkVersion = '12.6.0.GA';

function AndroidModuleBuilder() {
Builder.apply(this, arguments);

Expand All @@ -58,6 +60,7 @@ AndroidModuleBuilder.prototype.migrate = async function migrate() {
const manifestModuleAPIVersion = this.manifest.apiversion;
const manifestTemplateFile = path.join(this.platformPath, 'templates', 'module', 'default', 'template', 'android', 'manifest.ejs');
let newVersion = semver.inc(this.manifest.version, 'major');
tiSdkVersion = cliSDKVersion;

// Determine if the "manifest" file's "apiversion" needs updating.
let isApiVersionUpdateRequired = false;
Expand Down Expand Up @@ -873,6 +876,7 @@ AndroidModuleBuilder.prototype.runModule = async function (cli) {
'-u', 'localhost',
'-d', tmpDir,
'-p', 'android',
'--sdk', tiSdkVersion,
'--force'
],
this.logger
Expand Down Expand Up @@ -917,7 +921,7 @@ AndroidModuleBuilder.prototype.runModule = async function (cli) {

// Run the temp app.
this.logger.debug(__('Running example project...', tmpDir.cyan));
let buildArgs = [ process.argv[1], 'build', '-p', 'android', '-d', tmpProjectDir ];
let buildArgs = [ process.argv[1], 'build', '-p', 'android', '-d', tmpProjectDir, '--sdk', tiSdkVersion ];
if (this.target) {
buildArgs.push('-T');
buildArgs.push(this.target);
Expand Down

0 comments on commit 8c6e312

Please sign in to comment.