Skip to content

Commit 8f9c273

Browse files
Pass Android release options for build/deploy/run (#2585)
The commands build, deploy and run should pass Android specific options: `keyStorePath, keyStoreAlias, keyStorePassword, keyStoreAliasPassword` to the services. This will fix building of projects for Android in release config.
1 parent a008db1 commit 8f9c273

File tree

5 files changed

+21
-5
lines changed

5 files changed

+21
-5
lines changed

lib/commands/build.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ export class BuildCommandBase {
1818
teamId: this.$options.teamId,
1919
device: this.$options.device,
2020
provision: this.$options.provision,
21-
release: this.$options.release
21+
release: this.$options.release,
22+
keyStoreAlias: this.$options.keyStoreAlias,
23+
keyStorePath: this.$options.keyStorePath,
24+
keyStoreAliasPassword: this.$options.keyStoreAliasPassword,
25+
keyStorePassword: this.$options.keyStorePassword
2226
};
2327
await this.$platformService.buildPlatform(platform, buildConfig, this.$projectData);
2428
if (this.$options.copyTo) {

lib/commands/deploy.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ export class DeployOnDeviceCommand implements ICommand {
2121
release: this.$options.release,
2222
forceInstall: true,
2323
provision: this.$options.provision,
24-
teamId: this.$options.teamId
24+
teamId: this.$options.teamId,
25+
keyStoreAlias: this.$options.keyStoreAlias,
26+
keyStoreAliasPassword: this.$options.keyStoreAliasPassword,
27+
keyStorePassword: this.$options.keyStorePassword,
28+
keyStorePath: this.$options.keyStorePath
2529
};
2630
return this.$platformService.deployPlatform(args[0], appFilesUpdaterOptions, deployOptions, this.$projectData, this.$options.provision);
2731
}

lib/commands/run.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ export class RunCommandBase {
1616
platformTemplate: this.$options.platformTemplate,
1717
release: this.$options.release,
1818
provision: this.$options.provision,
19-
teamId: this.$options.teamId
19+
teamId: this.$options.teamId,
20+
keyStoreAlias: this.$options.keyStoreAlias,
21+
keyStoreAliasPassword: this.$options.keyStoreAliasPassword,
22+
keyStorePassword: this.$options.keyStorePassword,
23+
keyStorePath: this.$options.keyStorePath
2024
};
2125
await this.$platformService.deployPlatform(args[0], appFilesUpdaterOptions, deployOptions, this.$projectData, this.$options.provision);
2226

lib/declarations.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ interface IDeviceEmulator extends IEmulator, IDeviceIdentifier { }
147147

148148
interface IRunPlatformOptions extends IJustLaunch, IDeviceEmulator { }
149149

150-
interface IDeployPlatformOptions extends IPlatformTemplate, IRelease, IClean, IDeviceEmulator, IProvision, ITeamIdentifier {
150+
interface IDeployPlatformOptions extends IAndroidReleaseOptions, IPlatformTemplate, IRelease, IClean, IDeviceEmulator, IProvision, ITeamIdentifier {
151151
projectDir: string;
152152
forceInstall?: boolean;
153153
}

lib/services/platform-service.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,11 @@ export class PlatformService extends EventEmitter implements IPlatformService {
437437
release: deployOptions.release,
438438
device: deployOptions.device,
439439
provision: deployOptions.provision,
440-
teamId: deployOptions.teamId
440+
teamId: deployOptions.teamId,
441+
keyStoreAlias: deployOptions.keyStoreAlias,
442+
keyStoreAliasPassword: deployOptions.keyStoreAliasPassword,
443+
keyStorePassword: deployOptions.keyStorePassword,
444+
keyStorePath: deployOptions.keyStorePath
441445
};
442446
let shouldBuild = await this.shouldBuild(platform, projectData, buildConfig);
443447
if (shouldBuild) {

0 commit comments

Comments
 (0)