Skip to content

Commit 6a7b844

Browse files
committed
Merge branch 'release/0.1.2'
2 parents 79513e1 + 30834fe commit 6a7b844

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ apply plugin: 'groovy'
22
apply plugin: 'maven'
33
apply plugin: 'signing'
44

5+
sourceCompatibility = 1.6
56
group = 'org.quanqi'
6-
version = "0.1.1"
7+
version = "0.1.2"
78

89
repositories {
910
mavenCentral()

src/main/groovy/org/quanqi/gradle/signing/AndroidApplicationSigning.groovy

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff 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()) {

0 commit comments

Comments
 (0)