Skip to content

Commit c489328

Browse files
committed
Merge pull request #115 from NativeScript/fatme/release-build-for-ant
Release build for android
2 parents 5e91471 + 984c78d commit c489328

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

lib/options.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ var knownOpts:any = {
1616
"device": Boolean,
1717
"emulator": Boolean,
1818
"version": Boolean,
19-
"help": Boolean
19+
"help": Boolean,
20+
"keyStorePath": String,
21+
"keyStorePassword": String,
22+
"keyStoreAlias": String,
23+
"keyStoreAliasPassword": String
2024
},
2125
shorthands = {
2226
"v" : "verbose",

lib/services/android-project-service.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,12 @@ class AndroidProjectService implements IPlatformProjectService {
135135

136136
private getAntArgs(configuration: string, projectRoot: string): string[] {
137137
var args = [configuration, "-f", path.join(projectRoot, "build.xml")];
138+
if(configuration === "release") {
139+
args = args.concat(["-Dkey.store", options.keyStorePath,
140+
"-Dkey.store.password", options.keyStorePassword,
141+
"-Dkey.alias", options.keyStoreAlias,
142+
"-Dkey.alias.password", options.keyStoreAliasPassword]);
143+
}
138144

139145
return args;
140146
}

0 commit comments

Comments
 (0)