Skip to content

Commit 3bd2167

Browse files
committed
Get signing properties file from command line
1 parent 1114d58 commit 3bd2167

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

app/build.gradle

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,27 @@ android {
1212
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1313
}
1414

15+
signingConfigs {
16+
release {
17+
//get signing properties file from command line
18+
if (project.hasProperty('signPropsFile')) {
19+
def propsFilePath = project.getProperty('signPropsFile')
20+
21+
def propsFile = new File(propsFilePath)
22+
23+
if (propsFile.canRead()) {
24+
def props = new Properties()
25+
props.load(new FileInputStream(propsFile))
26+
27+
storeFile = file(props['storeFile'])
28+
storePassword = props['storePassword']
29+
keyAlias = props['keyAlias']
30+
keyPassword = props['keyPassword']
31+
}
32+
}
33+
}
34+
}
35+
1536
buildTypes {
1637
release {
1738
minifyEnabled false

0 commit comments

Comments
 (0)