Skip to content
/ tivi Public
forked from chrisbanes/tivi

Commit

Permalink
Re-enable Napt
Browse files Browse the repository at this point in the history
This reverts commit 4213050. Seems issues had been solved, see
sergei-lapin/napt#11 (comment)
  • Loading branch information
Goooler committed Dec 2, 2022
1 parent fdb217d commit ac97ab9
Show file tree
Hide file tree
Showing 24 changed files with 50 additions and 55 deletions.
4 changes: 2 additions & 2 deletions api/tmdb/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

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

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

implementation(libs.okhttp.okhttp)

kapt(libs.dagger.compiler)
annotationProcessor(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 @@ -17,7 +17,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.napt)
}

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

implementation(libs.hilt.library)
kapt(libs.hilt.compiler)
annotationProcessor(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 @@ -16,7 +16,7 @@

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

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

kapt(libs.dagger.compiler)
annotationProcessor(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 @@ -17,7 +17,7 @@
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.napt)
alias(libs.plugins.hilt)
}

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

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

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

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

plugins {
Expand All @@ -27,7 +26,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.kapt) apply false
alias(libs.plugins.napt) 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 @@ -109,10 +108,8 @@ allprojects {
}

plugins.withId(rootProject.libs.plugins.hilt.get().pluginId) {
extensions.getByType<HiltExtension>().enableAggregatingTask = true
}
plugins.withId(rootProject.libs.plugins.kotlin.kapt.get().pluginId) {
extensions.getByType<KaptExtension>().correctErrorTypes = true
// Had to turn this off for napt to work
extensions.getByType<HiltExtension>().enableAggregatingTask = false
}
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 @@ -17,7 +17,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.napt)
}

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

implementation(libs.hilt.library)
kapt(libs.hilt.compiler)
annotationProcessor(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 @@ -17,7 +17,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.napt)
}

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

implementation(libs.hilt.library)
kapt(libs.hilt.compiler)
annotationProcessor(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 @@ -17,7 +17,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.napt)
}

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

implementation(libs.hilt.library)
kapt(libs.hilt.compiler)
annotationProcessor(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 @@ -17,7 +17,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.napt)
alias(libs.plugins.ksp)
}

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

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

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

kspTest(libs.androidx.room.compiler)
kaptTest(libs.hilt.compiler)
testAnnotationProcessor(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 @@ -17,7 +17,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.napt)
}

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

implementation(libs.hilt.library)
kapt(libs.hilt.compiler)
annotationProcessor(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 @@ -26,9 +26,9 @@ 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-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
ksp = "com.google.devtools.ksp:1.7.21-1.0.8"
hilt = { id = "com.google.dagger.hilt.android", version.ref = "dagger" }
napt = "com.sergei-lapin.napt:1.19"
gms-googleServices = "com.google.gms.google-services:4.3.14"
firebase-crashlytics = "com.google.firebase.crashlytics:2.9.2"
spotless = "com.diffplug.spotless:6.12.0"
Expand Down
6 changes: 2 additions & 4 deletions tasks/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.kapt)
alias(libs.plugins.napt)
}

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

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

annotationProcessor(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.kapt)
alias(libs.plugins.napt)
alias(libs.plugins.hilt)
}

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

implementation(libs.hilt.compose)
implementation(libs.hilt.library)
kapt(libs.hilt.compiler)
annotationProcessor(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 @@ -17,7 +17,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.napt)
alias(libs.plugins.hilt)
}

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

implementation(libs.hilt.compose)
implementation(libs.hilt.library)
kapt(libs.hilt.compiler)
annotationProcessor(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 @@ -17,7 +17,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.napt)
alias(libs.plugins.hilt)
}

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

implementation(libs.hilt.compose)
implementation(libs.hilt.library)
kapt(libs.hilt.compiler)
annotationProcessor(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 @@ -17,7 +17,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.napt)
alias(libs.plugins.hilt)
}

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

implementation(libs.hilt.compose)
implementation(libs.hilt.library)
kapt(libs.hilt.compiler)
annotationProcessor(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 @@ -17,7 +17,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.napt)
alias(libs.plugins.hilt)
}

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

implementation(libs.hilt.compose)
implementation(libs.hilt.library)
kapt(libs.hilt.compiler)
annotationProcessor(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 @@ -17,7 +17,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.napt)
alias(libs.plugins.hilt)
}

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

implementation(libs.hilt.compose)
implementation(libs.hilt.library)
kapt(libs.hilt.compiler)
annotationProcessor(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 @@ -17,7 +17,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.napt)
alias(libs.plugins.hilt)
}

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

implementation(libs.hilt.compose)
implementation(libs.hilt.library)
kapt(libs.hilt.compiler)
annotationProcessor(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 @@ -17,7 +17,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.napt)
alias(libs.plugins.hilt)
}

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

implementation(libs.hilt.library)
kapt(libs.hilt.compiler)
annotationProcessor(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 @@ -17,7 +17,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.napt)
alias(libs.plugins.hilt)
}

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

implementation(libs.hilt.compose)
implementation(libs.hilt.library)
kapt(libs.hilt.compiler)
annotationProcessor(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 @@ -17,7 +17,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.napt)
alias(libs.plugins.hilt)
}

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

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

0 comments on commit ac97ab9

Please sign in to comment.