Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(android): --skip-build module parameter to run example/app.js project #14161

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 23 additions & 17 deletions android/cli/commands/_buildModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ AndroidModuleBuilder.prototype.validate = function validate(logger, config, cli)
this.buildOnly = cli.argv['build-only'];
this.target = cli.argv['target'];
this.deviceId = cli.argv['device-id'];
this.skipBuild = cli.argv['$_'].includes('--skip-build');

this.cli = cli;
this.logger = logger;
Expand Down Expand Up @@ -301,28 +302,33 @@ AndroidModuleBuilder.prototype.run = async function run(logger, config, cli, fin

// Initialize build variables and directory.
await this.initialize();
await this.loginfo();
await this.cleanup();

// Notify plugins that we're prepping to compile.
await new Promise((resolve) => {
cli.emit('build.module.pre.compile', this, resolve);
});
const outputPath = path.join(this.buildModuleDir, 'build', 'outputs', 'm2repository');
if (this.skipBuild && fs.existsSync(outputPath)) {
// skip building module
} else {
await this.loginfo();
await this.cleanup();

// Update module files such as "manifest" if needed.
await this.updateModuleFiles();
// Notify plugins that we're prepping to compile.
await new Promise((resolve) => {
cli.emit('build.module.pre.compile', this, resolve);
});

// Generate all gradle project files.
await this.generateRootProjectFiles();
await this.generateModuleProject();
// Update module files such as "manifest" if needed.
await this.updateModuleFiles();

// Build the library and output it to "dist" directory.
await this.buildModuleProject();
// Notify plugins that the build is done.
await new Promise((resolve) => {
cli.emit('build.module.post.compile', this, resolve);
});
// Generate all gradle project files.
await this.generateRootProjectFiles();
await this.generateModuleProject();

// Build the library and output it to "dist" directory.
await this.buildModuleProject();
// Notify plugins that the build is done.
await new Promise((resolve) => {
cli.emit('build.module.post.compile', this, resolve);
});
}
await this.packageZip();

await new Promise((resolve) => {
Expand Down
Loading