Skip to content

Commit 0121738

Browse files
committed
Gradle Android plugin 3.0.0 & Gradle 4.1
1 parent 5d9aa7b commit 0121738

File tree

3 files changed

+26
-23
lines changed

3 files changed

+26
-23
lines changed

app/build.gradle

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
apply plugin: 'com.android.application'
2-
apply plugin: 'com.neenbedankt.android-apt'
32
apply plugin: 'io.fabric'
43
apply plugin: 'me.tatarka.retrolambda'
54
apply plugin: 'com.jakewharton.butterknife'
@@ -20,6 +19,16 @@ android {
2019
buildConfigField 'String', 'VCS_COMMIT', "\"${project.vcsCommit}\""
2120
multiDexEnabled true
2221
testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
22+
23+
javaCompileOptions {
24+
annotationProcessorOptions {
25+
//className 'com.example.MyProcessor'
26+
27+
// Arguments are optional.
28+
arguments = [ androidManifestFile : 'app/src/main/AndroidManifest.xml' ]
29+
}
30+
}
31+
2332
}
2433

2534
compileOptions {
@@ -53,13 +62,17 @@ android {
5362

5463
}
5564

65+
flavorDimensions 'impl'
66+
5667
productFlavors {
5768

5869
dummy {
5970
applicationIdSuffix '.dummy'
71+
dimension 'impl'
6072
}
6173

6274
production {
75+
dimension 'impl'
6376
}
6477

6578
}
@@ -70,12 +83,12 @@ android {
7083
}
7184

7285
applicationVariants.all { variant ->
73-
variant.outputs.each { output ->
74-
def name = output.outputFile.name
86+
variant.outputs.all {
87+
def name = outputFileName
7588
.replace('app-', 'FourPDA-')
7689
.replace('.apk', "-${variant.versionName}-b${variant.versionCode}.apk")
7790
.replace('-release', '')
78-
output.outputFile = new File(output.outputFile.parent, name)
91+
outputFileName = new File(name)
7992
}
8093
}
8194

@@ -85,18 +98,6 @@ play {
8598
jsonFile = file(project.fourpda_playPublisher_jsonFile)
8699
}
87100

88-
configurations {
89-
apt
90-
}
91-
92-
apt {
93-
arguments {
94-
logLevel 'warn'
95-
logAppenderConsole true
96-
androidManifestFile 'app/src/main/AndroidManifest.xml'
97-
}
98-
}
99-
100101
def supportVersion = '25.0.1'
101102

102103
dependencies {
@@ -105,10 +106,10 @@ dependencies {
105106
compile project(':client')
106107
compile project(':html_templates')
107108

108-
apt 'org.androidannotations:androidannotations:4.1.0'
109+
annotationProcessor 'org.androidannotations:androidannotations:4.1.0'
109110
compile 'org.androidannotations:androidannotations-api:4.1.0'
110111

111-
apt 'com.google.dagger:dagger-compiler:2.7'
112+
annotationProcessor 'com.google.dagger:dagger-compiler:2.7'
112113
compile 'com.google.dagger:dagger:2.7'
113114
compile 'javax.annotation:javax.annotation-api:1.2'
114115

@@ -123,15 +124,15 @@ dependencies {
123124
compile 'com.github.swapii:PersistentCookieJar:1.0.0'
124125

125126
compile 'com.jakewharton:butterknife:8.4.0'
126-
apt 'com.jakewharton:butterknife-compiler:8.4.0'
127+
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
127128

128129
compile 'de.greenrobot:eventbus:2.4.0'
129130

130131
provided 'frankiesardo:auto-parcel:1.0.3'
131-
apt 'frankiesardo:auto-parcel:1.0.3'
132+
annotationProcessor 'frankiesardo:auto-parcel:1.0.3'
132133

133134
compile('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') {
134-
transitive = true;
135+
transitive = true
135136
}
136137

137138
compile 'org.slf4j:slf4j-api:1.7.21'

build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
buildscript {
22

33
repositories {
4+
google()
45
jcenter()
56
maven { url 'https://maven.fabric.io/public' }
67
maven { url "https://clojars.org/repo/" }
78
}
89

910
dependencies {
10-
classpath 'com.android.tools.build:gradle:2.3.0'
11+
classpath 'com.android.tools.build:gradle:3.0.0'
1112
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
1213
classpath 'io.fabric.tools:gradle:1.21.5'
1314
classpath 'me.tatarka:gradle-retrolambda:3.3.0'
@@ -20,6 +21,7 @@ buildscript {
2021
allprojects {
2122

2223
repositories {
24+
google()
2325
jcenter()
2426
maven { url 'https://maven.fabric.io/public' }
2527
maven { url 'https://jitpack.io' }

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

0 commit comments

Comments
 (0)