Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

Commit

Permalink
Revert "Migrate to sergei-lapin/napt"
Browse files Browse the repository at this point in the history
This reverts commit 06d365a. Unfortunately it was
causing too many issues with Hilt/Dagger.

See sergei-lapin/napt#11
  • Loading branch information
chrisbanes committed Oct 19, 2022
1 parent 64dcc88 commit 4213050
Show file tree
Hide file tree
Showing 24 changed files with 55 additions and 50 deletions.
4 changes: 2 additions & 2 deletions api/tmdb/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

plugins {
id("kotlin")
alias(libs.plugins.kotlin.napt)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.android.lint)
}

Expand All @@ -31,5 +31,5 @@ dependencies {

implementation(libs.okhttp.okhttp)

annotationProcessor(libs.dagger.compiler)
kapt(libs.dagger.compiler)
}
4 changes: 2 additions & 2 deletions api/trakt-auth/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.napt)
alias(libs.plugins.kotlin.kapt)
}

android {
Expand All @@ -37,7 +37,7 @@ dependencies {
api(projects.api.trakt)

implementation(libs.hilt.library)
annotationProcessor(libs.hilt.compiler)
kapt(libs.hilt.compiler)

implementation(libs.androidx.browser)
implementation(libs.androidx.core)
Expand Down
4 changes: 2 additions & 2 deletions api/trakt/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

plugins {
id("kotlin")
alias(libs.plugins.kotlin.napt)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.android.lint)
}

Expand All @@ -33,5 +33,5 @@ dependencies {
implementation(libs.retrofit.retrofit)
implementation(libs.retrofit.gsonConverter)

annotationProcessor(libs.dagger.compiler)
kapt(libs.dagger.compiler)
}
6 changes: 3 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.napt)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.hilt)
}

Expand Down Expand Up @@ -213,10 +213,10 @@ dependencies {

implementation(libs.hilt.library)
implementation(libs.hilt.compose)
annotationProcessor(libs.hilt.compiler)
kapt(libs.hilt.compiler)

implementation(libs.hilt.work)
annotationProcessor(libs.hilt.compiler)
kapt(libs.hilt.compiler)

implementation(libs.google.crashlytics)
implementation(libs.google.analytics)
Expand Down
9 changes: 6 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import com.android.build.gradle.BaseExtension
import com.android.build.gradle.BasePlugin
import dagger.hilt.android.plugin.HiltExtension
import org.jetbrains.kotlin.gradle.plugin.KaptExtension
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
Expand All @@ -26,7 +27,7 @@ plugins {
alias(libs.plugins.android.lint) apply false
alias(libs.plugins.android.test) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.napt) apply false
alias(libs.plugins.kotlin.kapt) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.hilt) apply false
alias(libs.plugins.gms.googleServices) apply false
Expand Down Expand Up @@ -92,8 +93,10 @@ subprojects {
}

plugins.withId(rootProject.libs.plugins.hilt.get().pluginId) {
// Had to turn this off for napt to work
extensions.getByType<HiltExtension>().enableAggregatingTask = false
extensions.getByType<HiltExtension>().enableAggregatingTask = true
}
plugins.withId(rootProject.libs.plugins.kotlin.kapt.get().pluginId) {
extensions.getByType<KaptExtension>().correctErrorTypes = true
}
plugins.withType<BasePlugin>().configureEach {
extensions.configure<BaseExtension> {
Expand Down
4 changes: 2 additions & 2 deletions common/imageloading/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.napt)
alias(libs.plugins.kotlin.kapt)
}

android {
Expand All @@ -34,7 +34,7 @@ dependencies {
implementation(libs.androidx.core)

implementation(libs.hilt.library)
annotationProcessor(libs.hilt.compiler)
kapt(libs.hilt.compiler)

api(libs.coil.coil)
}
4 changes: 2 additions & 2 deletions core/analytics/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.napt)
alias(libs.plugins.kotlin.kapt)
}

android {
Expand All @@ -31,5 +31,5 @@ dependencies {
implementation(libs.google.analytics)

implementation(libs.hilt.library)
annotationProcessor(libs.hilt.compiler)
kapt(libs.hilt.compiler)
}
4 changes: 2 additions & 2 deletions core/logging/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.napt)
alias(libs.plugins.kotlin.kapt)
}

android {
Expand All @@ -32,5 +32,5 @@ dependencies {
implementation(libs.timber)

implementation(libs.hilt.library)
annotationProcessor(libs.hilt.compiler)
kapt(libs.hilt.compiler)
}
6 changes: 3 additions & 3 deletions data-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.napt)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.ksp)
}

Expand Down Expand Up @@ -58,7 +58,7 @@ dependencies {
implementation(libs.androidx.paging.runtime)

implementation(libs.hilt.library)
annotationProcessor(libs.hilt.compiler)
kapt(libs.hilt.compiler)

testImplementation(libs.junit)
testImplementation(libs.robolectric)
Expand All @@ -73,7 +73,7 @@ dependencies {
testImplementation(libs.hilt.testing)

kspTest(libs.androidx.room.compiler)
testAnnotationProcessor(libs.hilt.compiler)
kaptTest(libs.hilt.compiler)

// Needed for Tzdb
testImplementation("org.threeten:threetenbp:${libs.versions.threetenbp.get()}")
Expand Down
4 changes: 2 additions & 2 deletions domain/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.napt)
alias(libs.plugins.kotlin.kapt)
}

android {
Expand All @@ -33,7 +33,7 @@ dependencies {
implementation(projects.api.tmdb)

implementation(libs.hilt.library)
annotationProcessor(libs.hilt.compiler)
kapt(libs.hilt.compiler)

api(libs.androidx.paging.common)
implementation(libs.androidx.paging.runtime)
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ android-library = { id = "com.android.library", version.ref = "agp" }
android-lint = { id = "com.android.lint", version.ref = "agp" }
android-test = { id = "com.android.test", version.ref = "agp" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-napt = "com.sergei-lapin.napt:1.17"
kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
ksp = "com.google.devtools.ksp:1.7.20-1.0.7"
hilt = { id = "com.google.dagger.hilt.android", version.ref = "dagger" }
gms-googleServices = "com.google.gms.google-services:4.3.14"
Expand Down
6 changes: 4 additions & 2 deletions tasks/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.napt)
alias(libs.plugins.kotlin.kapt)
}

android {
Expand All @@ -38,6 +38,8 @@ dependencies {
api(libs.androidx.work.runtime)

implementation(libs.hilt.library)
annotationProcessor(libs.hilt.compiler)
kapt(libs.hilt.compiler)

implementation(libs.hilt.work)
kapt(libs.hilt.compiler)
}
4 changes: 2 additions & 2 deletions ui/account/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.napt)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.hilt)
}

Expand Down Expand Up @@ -61,5 +61,5 @@ dependencies {

implementation(libs.hilt.compose)
implementation(libs.hilt.library)
annotationProcessor(libs.hilt.compiler)
kapt(libs.hilt.compiler)
}
4 changes: 2 additions & 2 deletions ui/discover/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.napt)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.hilt)
}

Expand Down Expand Up @@ -55,5 +55,5 @@ dependencies {

implementation(libs.hilt.compose)
implementation(libs.hilt.library)
annotationProcessor(libs.hilt.compiler)
kapt(libs.hilt.compiler)
}
4 changes: 2 additions & 2 deletions ui/episodedetails/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.napt)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.hilt)
}

Expand Down Expand Up @@ -56,5 +56,5 @@ dependencies {

implementation(libs.hilt.compose)
implementation(libs.hilt.library)
annotationProcessor(libs.hilt.compiler)
kapt(libs.hilt.compiler)
}
4 changes: 2 additions & 2 deletions ui/followed/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.napt)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.hilt)
}

Expand Down Expand Up @@ -61,5 +61,5 @@ dependencies {

implementation(libs.hilt.compose)
implementation(libs.hilt.library)
annotationProcessor(libs.hilt.compiler)
kapt(libs.hilt.compiler)
}
4 changes: 2 additions & 2 deletions ui/popular/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.napt)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.hilt)
}

Expand Down Expand Up @@ -52,5 +52,5 @@ dependencies {

implementation(libs.hilt.compose)
implementation(libs.hilt.library)
annotationProcessor(libs.hilt.compiler)
kapt(libs.hilt.compiler)
}
4 changes: 2 additions & 2 deletions ui/recommended/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.napt)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.hilt)
}

Expand Down Expand Up @@ -52,5 +52,5 @@ dependencies {

implementation(libs.hilt.compose)
implementation(libs.hilt.library)
annotationProcessor(libs.hilt.compiler)
kapt(libs.hilt.compiler)
}
4 changes: 2 additions & 2 deletions ui/search/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.napt)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.hilt)
}

Expand Down Expand Up @@ -52,5 +52,5 @@ dependencies {

implementation(libs.hilt.compose)
implementation(libs.hilt.library)
annotationProcessor(libs.hilt.compiler)
kapt(libs.hilt.compiler)
}
4 changes: 2 additions & 2 deletions ui/settings/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.napt)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.hilt)
}

Expand All @@ -36,5 +36,5 @@ dependencies {
implementation(libs.androidx.lifecycle.runtime.ktx)

implementation(libs.hilt.library)
annotationProcessor(libs.hilt.compiler)
kapt(libs.hilt.compiler)
}
4 changes: 2 additions & 2 deletions ui/showdetails/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.napt)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.hilt)
}

Expand Down Expand Up @@ -58,5 +58,5 @@ dependencies {

implementation(libs.hilt.compose)
implementation(libs.hilt.library)
annotationProcessor(libs.hilt.compiler)
kapt(libs.hilt.compiler)
}
4 changes: 2 additions & 2 deletions ui/showseasons/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.napt)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.hilt)
}

Expand Down Expand Up @@ -58,5 +58,5 @@ dependencies {

implementation(libs.hilt.compose)
implementation(libs.hilt.library)
annotationProcessor(libs.hilt.compiler)
kapt(libs.hilt.compiler)
}
Loading

0 comments on commit 4213050

Please sign in to comment.