Skip to content

Commit

Permalink
Make dagger annotation processing incremental
Browse files Browse the repository at this point in the history
  • Loading branch information
emartynov authored and nickbutcher committed Jul 4, 2019
1 parent 7d83d9b commit 1a0d5fd
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 5 deletions.
11 changes: 10 additions & 1 deletion about/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ android {
targetSdkVersion versions.targetSdk

testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'

javaCompileOptions {
annotationProcessorOptions {
arguments << ['dagger.gradle.incremental': 'true']
}
}
}

dataBinding {
Expand All @@ -40,7 +46,6 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

}

dependencies {
Expand All @@ -54,3 +59,7 @@ dependencies {

kapt "com.google.dagger:dagger-compiler:${versions.dagger}"
}

kapt {
useBuildCache = true
}
10 changes: 10 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ android {
manifestPlaceholders += [
crashlyticsEnabled: false
]

javaCompileOptions {
annotationProcessorOptions {
arguments << ['dagger.gradle.incremental': 'true']
}
}
}

dataBinding {
Expand Down Expand Up @@ -79,5 +85,9 @@ dependencies {
kapt "com.google.dagger:dagger-compiler:${versions.dagger}"
}

kapt {
useBuildCache = true
}

// Must be applied after dependencies. See https://stackoverflow.com/a/38018985
apply plugin: 'com.google.gms.google-services'
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ buildscript { scriptHandler ->
'coreKtx' : '1.0.0',
'coroutines' : '1.1.1',
'crashlytics' : '2.9.8',
'dagger' : '2.16',
'dagger' : '2.23.2',
'espresso' : '3.1.0-beta02',
'extJunit' : '1.1.0',
'fabric' : '1.25.4',
Expand Down
10 changes: 9 additions & 1 deletion core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ android {
buildConfigField 'String',
'PRODUCT_HUNT_DEVELOPER_TOKEN', "\"${product_hunt_developer_token}\""

javaCompileOptions {
annotationProcessorOptions {
arguments << ['dagger.gradle.incremental': 'true']
}
}
}

dataBinding {
Expand All @@ -59,7 +64,6 @@ android {
packagingOptions {
exclude 'META-INF/core_debug.kotlin_module'
}

}

dependencies {
Expand All @@ -80,6 +84,10 @@ dependencies {
kapt "com.google.dagger:dagger-compiler:${versions.dagger}"
}

kapt {
useBuildCache = true
}

androidExtensions {
experimental = true
}
10 changes: 9 additions & 1 deletion designernews/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ android {

testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'

javaCompileOptions {
annotationProcessorOptions {
arguments << ['dagger.gradle.incremental': 'true']
}
}
}

dataBinding {
Expand All @@ -55,7 +60,10 @@ dependencies {
implementation "com.github.bumptech.glide:glide:${versions.glide}"

kapt "com.google.dagger:dagger-compiler:${versions.dagger}"
kapt "androidx.room:room-compiler:${versions.room}"
}

kapt {
useBuildCache = true
}

// enabling experimental for Kotlin parcelize supports
Expand Down
10 changes: 10 additions & 0 deletions dribbble/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ android {
def filesAuthorityValue = names.applicationId + '.shareprovider'
buildConfigField 'String', 'FILES_AUTHORITY', "\"${filesAuthorityValue}\""
manifestPlaceholders = [filesAuthority: filesAuthorityValue]

javaCompileOptions {
annotationProcessorOptions {
arguments << ['dagger.gradle.incremental': 'true']
}
}
}

dataBinding {
Expand All @@ -53,3 +59,7 @@ dependencies {

kapt "com.google.dagger:dagger-compiler:${versions.dagger}"
}

kapt {
useBuildCache = true
}
7 changes: 6 additions & 1 deletion search/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,17 @@ android {
defaultConfig {
minSdkVersion versions.minSdk
targetSdkVersion versions.targetSdk

javaCompileOptions {
annotationProcessorOptions {
arguments << ['dagger.gradle.incremental': 'true']
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

}

dependencies {
Expand Down

0 comments on commit 1a0d5fd

Please sign in to comment.