File tree 5 files changed +44
-27
lines changed
5 files changed +44
-27
lines changed Original file line number Diff line number Diff line change 29
29
# Ignore gradle files
30
30
.gradle /
31
31
build /
32
+
33
+ # Private
34
+ signing.properties
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ buildscript {
6
6
}
7
7
dependencies {
8
8
classpath ' com.android.tools.build:gradle:1.2.3'
9
- classpath ' com.github.dcendents:android-maven-gradle-plugin:1.3'
10
9
}
11
10
}
12
11
Original file line number Diff line number Diff line change @@ -108,9 +108,9 @@ afterEvaluate { project ->
108
108
109
109
task androidJavadocs(type : Javadoc ) {
110
110
source = android. sourceSets. main. java. srcDirs
111
- options {
112
- encoding = " UTF-8"
113
- }
111
+ options {
112
+ encoding = " UTF-8"
113
+ }
114
114
classpath + = project. files(android. getBootClasspath(). join(File . pathSeparator))
115
115
}
116
116
Original file line number Diff line number Diff line change 1
1
apply plugin : ' com.android.library'
2
- apply plugin : ' com.github.dcendents.android-maven'
2
+
3
+ dependencies {
4
+ testCompile ' junit:junit:4.12'
5
+ testCompile ' org.robolectric:robolectric:3.0-rc3'
6
+ testCompile ' com.squareup.assertj:assertj-android:1.0.0'
7
+ }
3
8
4
9
android {
5
10
compileSdkVersion 22
@@ -9,20 +14,12 @@ android {
9
14
minSdkVersion 5
10
15
targetSdkVersion 22
11
16
}
12
- buildTypes {
13
- sourceSets {
14
- main {
15
- manifest. srcFile ' AndroidManifest.xml'
16
- java. srcDirs = [' src' ]
17
- resources. srcDirs = [' src' ]
18
- aidl. srcDirs = [' src' ]
19
- renderscript. srcDirs = [' src' ]
20
- res. srcDirs = [' res' ]
21
- }
22
- }
23
- release {
24
- minifyEnabled false
25
- proguardFiles getDefaultProguardFile(' proguard-android.txt' ), ' proguard-rules.pro'
17
+
18
+ sourceSets {
19
+ main {
20
+ manifest. srcFile ' AndroidManifest.xml'
21
+ java. srcDirs = [' src' ]
22
+ res. srcDirs = [' res' ]
26
23
}
27
24
}
28
25
@@ -32,13 +29,6 @@ android {
32
29
}
33
30
}
34
31
35
- dependencies {
36
- testCompile ' com.squareup.assertj:assertj-android:1.0.0'
37
- testCompile ' org.robolectric:robolectric:2.4'
38
- testCompile ' junit:junit:4.12'
39
- compile ' com.android.support:support-v4:22.1.1'
40
- }
41
-
42
32
// build a jar with source files
43
33
task sourcesJar (type : Jar ) {
44
34
from android. sourceSets. main. java. srcDirs
Original file line number Diff line number Diff line change @@ -2,13 +2,19 @@ apply plugin: 'com.android.application'
2
2
3
3
dependencies {
4
4
compile project(' :library' )
5
+ compile ' com.android.support:support-v4:22.2.0'
5
6
compile ' com.squareup.okhttp:okhttp:2.4.0'
6
7
}
7
8
8
9
android {
9
10
compileSdkVersion 22
10
11
buildToolsVersion " 22.0.1"
11
12
13
+ defaultConfig {
14
+ minSdkVersion 5
15
+ targetSdkVersion 22
16
+ }
17
+
12
18
sourceSets {
13
19
main {
14
20
manifest. srcFile ' AndroidManifest.xml'
@@ -19,6 +25,25 @@ android {
19
25
}
20
26
21
27
lintOptions {
22
- abortOnError false
28
+ abortOnError false
23
29
}
24
30
}
31
+
32
+
33
+ File propFile = file(' signing.properties' );
34
+ if (propFile. exists()) {
35
+ def Properties props = new Properties ()
36
+ props. load(new FileInputStream (propFile))
37
+
38
+ if (props. containsKey(' STORE_FILE' ) && props. containsKey(' STORE_PASSWORD' ) &&
39
+ props. containsKey(' KEY_ALIAS' ) && props. containsKey(' KEY_PASSWORD' )) {
40
+ android. signingConfigs. release. storeFile = file(props[' STORE_FILE' ])
41
+ android. signingConfigs. release. storePassword = props[' STORE_PASSWORD' ]
42
+ android. signingConfigs. release. keyAlias = props[' KEY_ALIAS' ]
43
+ android. signingConfigs. release. keyPassword = props[' KEY_PASSWORD' ]
44
+ } else {
45
+ android. buildTypes. release. signingConfig = null
46
+ }
47
+ } else {
48
+ android. buildTypes. release. signingConfig = null
49
+ }
You can’t perform that action at this time.
0 commit comments