File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
src/main/groovy/org/quanqi/gradle/signing Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,9 @@ apply plugin: 'groovy'
22apply plugin : ' maven'
33apply plugin : ' signing'
44
5+ sourceCompatibility = 1.6
56group = ' org.quanqi'
6- version = " 0.1.1 "
7+ version = " 0.1.2 "
78
89repositories {
910 mavenCentral()
Original file line number Diff line number Diff line change @@ -11,6 +11,20 @@ class AndroidApplicationSigning implements Plugin<Project> {
1111
1212 public static final String KEY_ANDROID_KEY_STORE_CONFIG = " ANDROID_KEY_STORE_CONFIG"
1313
14+ def String adjustPath (String path ) {
15+ if (path. startsWith(' ~/' )) {
16+ // todo check this.
17+ path = path. replaceFirst(' ~' , System . getProperty(' user.home' ))
18+ return path
19+ } else {
20+ def file = new File (path)
21+ if (file. absolute) {
22+ return path
23+ } else {
24+ return new File (System . getProperty(' user.home' , ' .android_keys/' + path)). absolutePath
25+ }
26+ }
27+ }
1428
1529 @Override
1630 void apply (Project project ) {
@@ -36,6 +50,7 @@ class AndroidApplicationSigning implements Plugin<Project> {
3650 for (def keyStore : keyStores. children()) {
3751 def keyStoreName = keyStore. getProperty(' store-name' ). text()
3852 def keyStorePath = keyStore. getProperty(' store-path' ). text()
53+ keyStorePath = adjustPath(keyStorePath)
3954 def keyStorePassword = keyStore. getProperty(' store-password' ). text()
4055
4156 for (def alias : keyStore. getProperty(' aliases' ). children()) {
You can’t perform that action at this time.
0 commit comments