diff --git a/app/build.gradle.kts b/app/build.gradle.kts index ab61a4dde8..79bfb4d440 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -156,7 +156,6 @@ dependencies { implementation(projects.common.ui.view) implementation(projects.common.imageloading) implementation(projects.common.ui.compose) - implementation(projects.data.inject) implementation(projects.data.dbRoom) implementation(projects.api.trakt) implementation(projects.api.traktAuth.android) diff --git a/data/episodes/build.gradle.kts b/data/episodes/build.gradle.kts index e039cedf63..2e3ff57261 100644 --- a/data/episodes/build.gradle.kts +++ b/data/episodes/build.gradle.kts @@ -30,6 +30,6 @@ dependencies { implementation(projects.api.tmdb) implementation(libs.retrofit.retrofit) - implementation(libs.dagger.dagger) - kapt(libs.dagger.compiler) + implementation(libs.hilt.core) + kapt(libs.hilt.compiler) } diff --git a/data/inject/src/main/java/app/tivi/data/episodes/EpisodeBinds.kt b/data/episodes/src/main/java/app/tivi/data/episodes/EpisodeBinds.kt similarity index 100% rename from data/inject/src/main/java/app/tivi/data/episodes/EpisodeBinds.kt rename to data/episodes/src/main/java/app/tivi/data/episodes/EpisodeBinds.kt diff --git a/data/followedshows/build.gradle.kts b/data/followedshows/build.gradle.kts index 2d97c2d7c5..2bf5cf2aea 100644 --- a/data/followedshows/build.gradle.kts +++ b/data/followedshows/build.gradle.kts @@ -33,6 +33,6 @@ dependencies { api(libs.store) implementation(libs.kotlinx.atomicfu) - implementation(libs.dagger.dagger) - kapt(libs.dagger.compiler) + implementation(libs.hilt.core) + kapt(libs.hilt.compiler) } diff --git a/data/inject/src/main/java/app/tivi/data/followedshows/FollowedShowsBinds.kt b/data/followedshows/src/main/java/app/tivi/data/followedshows/FollowedShowsBinds.kt similarity index 100% rename from data/inject/src/main/java/app/tivi/data/followedshows/FollowedShowsBinds.kt rename to data/followedshows/src/main/java/app/tivi/data/followedshows/FollowedShowsBinds.kt diff --git a/data/inject/build.gradle.kts b/data/inject/build.gradle.kts deleted file mode 100644 index 5c14108e77..0000000000 --- a/data/inject/build.gradle.kts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -plugins { - alias(libs.plugins.android.library) - alias(libs.plugins.cacheFixPlugin) - alias(libs.plugins.kotlin.android) - alias(libs.plugins.kotlin.kapt) -} - -android { - namespace = "app.tivi.data.legacy.inject" - - defaultConfig { - testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - } -} - -dependencies { - implementation(projects.base) - - api(projects.data.db) - api(projects.data.episodes) - api(projects.data.followedshows) - api(projects.data.popularshows) - api(projects.data.recommendedshows) - api(projects.data.relatedshows) - api(projects.data.search) - api(projects.data.showimages) - api(projects.data.shows) - api(projects.data.traktusers) - api(projects.data.trendingshows) - api(projects.data.watchedshows) - - implementation(libs.hilt.library) - kapt(libs.hilt.compiler) -} diff --git a/data/popularshows/build.gradle.kts b/data/popularshows/build.gradle.kts index 2d97c2d7c5..2bf5cf2aea 100644 --- a/data/popularshows/build.gradle.kts +++ b/data/popularshows/build.gradle.kts @@ -33,6 +33,6 @@ dependencies { api(libs.store) implementation(libs.kotlinx.atomicfu) - implementation(libs.dagger.dagger) - kapt(libs.dagger.compiler) + implementation(libs.hilt.core) + kapt(libs.hilt.compiler) } diff --git a/data/inject/src/main/java/app/tivi/data/popularshows/PopularShowsBinds.kt b/data/popularshows/src/main/java/app/tivi/data/popularshows/PopularShowsBinds.kt similarity index 100% rename from data/inject/src/main/java/app/tivi/data/popularshows/PopularShowsBinds.kt rename to data/popularshows/src/main/java/app/tivi/data/popularshows/PopularShowsBinds.kt diff --git a/data/recommendedshows/build.gradle.kts b/data/recommendedshows/build.gradle.kts index 025a08d3ae..fc5a2cf51d 100644 --- a/data/recommendedshows/build.gradle.kts +++ b/data/recommendedshows/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright 2017 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ plugins { id("kotlin") alias(libs.plugins.android.lint) + alias(libs.plugins.kotlin.kapt) } dependencies { @@ -31,4 +32,7 @@ dependencies { api(libs.store) implementation(libs.kotlinx.atomicfu) + + implementation(libs.hilt.core) + kapt(libs.hilt.compiler) } diff --git a/data/inject/src/main/java/app/tivi/data/recommendedshows/RecommendedShowsBinds.kt b/data/recommendedshows/src/main/java/app/tivi/data/recommendedshows/RecommendedShowsBinds.kt similarity index 100% rename from data/inject/src/main/java/app/tivi/data/recommendedshows/RecommendedShowsBinds.kt rename to data/recommendedshows/src/main/java/app/tivi/data/recommendedshows/RecommendedShowsBinds.kt diff --git a/data/relatedshows/build.gradle.kts b/data/relatedshows/build.gradle.kts index 025a08d3ae..060ffaf975 100644 --- a/data/relatedshows/build.gradle.kts +++ b/data/relatedshows/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright 2017 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,9 +15,28 @@ */ +import org.jetbrains.kotlin.kapt3.base.Kapt.kapt + +/* + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + plugins { id("kotlin") alias(libs.plugins.android.lint) + alias(libs.plugins.kotlin.kapt) } dependencies { @@ -31,4 +50,7 @@ dependencies { api(libs.store) implementation(libs.kotlinx.atomicfu) + + implementation(libs.hilt.core) + kapt(libs.hilt.compiler) } diff --git a/data/inject/src/main/java/app/tivi/data/relatedshows/RelatedShowsBinds.kt b/data/relatedshows/src/main/java/app/tivi/data/relatedshows/RelatedShowsBinds.kt similarity index 100% rename from data/inject/src/main/java/app/tivi/data/relatedshows/RelatedShowsBinds.kt rename to data/relatedshows/src/main/java/app/tivi/data/relatedshows/RelatedShowsBinds.kt diff --git a/data/search/build.gradle.kts b/data/search/build.gradle.kts index 0460675bad..80e2ca65da 100644 --- a/data/search/build.gradle.kts +++ b/data/search/build.gradle.kts @@ -35,6 +35,6 @@ dependencies { implementation(libs.androidx.collection) // LruCache - implementation(libs.dagger.dagger) - kapt(libs.dagger.compiler) + implementation(libs.hilt.core) + kapt(libs.hilt.compiler) } diff --git a/data/inject/src/main/java/app/tivi/data/search/SearchBinds.kt b/data/search/src/main/java/app/tivi/data/search/SearchBinds.kt similarity index 100% rename from data/inject/src/main/java/app/tivi/data/search/SearchBinds.kt rename to data/search/src/main/java/app/tivi/data/search/SearchBinds.kt diff --git a/data/showimages/build.gradle.kts b/data/showimages/build.gradle.kts index 2d97c2d7c5..2bf5cf2aea 100644 --- a/data/showimages/build.gradle.kts +++ b/data/showimages/build.gradle.kts @@ -33,6 +33,6 @@ dependencies { api(libs.store) implementation(libs.kotlinx.atomicfu) - implementation(libs.dagger.dagger) - kapt(libs.dagger.compiler) + implementation(libs.hilt.core) + kapt(libs.hilt.compiler) } diff --git a/data/inject/src/main/java/app/tivi/data/showimages/ShowImagesBinds.kt b/data/showimages/src/main/java/app/tivi/data/showimages/ShowImagesBinds.kt similarity index 100% rename from data/inject/src/main/java/app/tivi/data/showimages/ShowImagesBinds.kt rename to data/showimages/src/main/java/app/tivi/data/showimages/ShowImagesBinds.kt diff --git a/data/shows/build.gradle.kts b/data/shows/build.gradle.kts index 2d97c2d7c5..2bf5cf2aea 100644 --- a/data/shows/build.gradle.kts +++ b/data/shows/build.gradle.kts @@ -33,6 +33,6 @@ dependencies { api(libs.store) implementation(libs.kotlinx.atomicfu) - implementation(libs.dagger.dagger) - kapt(libs.dagger.compiler) + implementation(libs.hilt.core) + kapt(libs.hilt.compiler) } diff --git a/data/inject/src/main/java/app/tivi/data/shows/ShowsBinds.kt b/data/shows/src/main/java/app/tivi/data/shows/ShowsBinds.kt similarity index 100% rename from data/inject/src/main/java/app/tivi/data/shows/ShowsBinds.kt rename to data/shows/src/main/java/app/tivi/data/shows/ShowsBinds.kt diff --git a/data/test/build.gradle.kts b/data/test/build.gradle.kts index ca4fb458c1..2c2f1f5730 100644 --- a/data/test/build.gradle.kts +++ b/data/test/build.gradle.kts @@ -42,7 +42,6 @@ android { } dependencies { - implementation(projects.data.inject) implementation(projects.data.followedshows) implementation(projects.data.episodes) implementation(projects.data.showimages) diff --git a/data/traktusers/build.gradle.kts b/data/traktusers/build.gradle.kts index 2d97c2d7c5..2bf5cf2aea 100644 --- a/data/traktusers/build.gradle.kts +++ b/data/traktusers/build.gradle.kts @@ -33,6 +33,6 @@ dependencies { api(libs.store) implementation(libs.kotlinx.atomicfu) - implementation(libs.dagger.dagger) - kapt(libs.dagger.compiler) + implementation(libs.hilt.core) + kapt(libs.hilt.compiler) } diff --git a/data/inject/src/main/java/app/tivi/data/traktusers/TraktUsersBinds.kt b/data/traktusers/src/main/java/app/tivi/data/traktusers/TraktUsersBinds.kt similarity index 100% rename from data/inject/src/main/java/app/tivi/data/traktusers/TraktUsersBinds.kt rename to data/traktusers/src/main/java/app/tivi/data/traktusers/TraktUsersBinds.kt diff --git a/data/trendingshows/build.gradle.kts b/data/trendingshows/build.gradle.kts index 2d97c2d7c5..2bf5cf2aea 100644 --- a/data/trendingshows/build.gradle.kts +++ b/data/trendingshows/build.gradle.kts @@ -33,6 +33,6 @@ dependencies { api(libs.store) implementation(libs.kotlinx.atomicfu) - implementation(libs.dagger.dagger) - kapt(libs.dagger.compiler) + implementation(libs.hilt.core) + kapt(libs.hilt.compiler) } diff --git a/data/inject/src/main/java/app/tivi/data/trendingshows/TrendingShowsBinds.kt b/data/trendingshows/src/main/java/app/tivi/data/trendingshows/TrendingShowsBinds.kt similarity index 100% rename from data/inject/src/main/java/app/tivi/data/trendingshows/TrendingShowsBinds.kt rename to data/trendingshows/src/main/java/app/tivi/data/trendingshows/TrendingShowsBinds.kt diff --git a/data/watchedshows/build.gradle.kts b/data/watchedshows/build.gradle.kts index 2d97c2d7c5..2bf5cf2aea 100644 --- a/data/watchedshows/build.gradle.kts +++ b/data/watchedshows/build.gradle.kts @@ -33,6 +33,6 @@ dependencies { api(libs.store) implementation(libs.kotlinx.atomicfu) - implementation(libs.dagger.dagger) - kapt(libs.dagger.compiler) + implementation(libs.hilt.core) + kapt(libs.hilt.compiler) } diff --git a/data/inject/src/main/java/app/tivi/data/watchedshows/WatchedShowsBinds.kt b/data/watchedshows/src/main/java/app/tivi/data/watchedshows/WatchedShowsBinds.kt similarity index 100% rename from data/inject/src/main/java/app/tivi/data/watchedshows/WatchedShowsBinds.kt rename to data/watchedshows/src/main/java/app/tivi/data/watchedshows/WatchedShowsBinds.kt diff --git a/domain/build.gradle.kts b/domain/build.gradle.kts index e699a7d0c2..4b09a3212b 100644 --- a/domain/build.gradle.kts +++ b/domain/build.gradle.kts @@ -15,22 +15,6 @@ */ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - plugins { id("kotlin") alias(libs.plugins.cacheFixPlugin) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ae8a91e5f8..76b8489496 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -111,6 +111,7 @@ debugdrawer-timber = { module = "au.com.gridstone.debugdrawer:debugdrawer-timber debugdrawer-okhttplogger = { module = "au.com.gridstone.debugdrawer:debugdrawer-okhttp-logger", version.ref = "debugdrawer" } hilt-compiler = { module = "com.google.dagger:hilt-android-compiler", version.ref = "dagger" } +hilt-core = { module = "com.google.dagger:hilt-core", version.ref = "dagger" } hilt-library = { module = "com.google.dagger:hilt-android", version.ref = "dagger" } hilt-testing = { module = "com.google.dagger:hilt-android-testing", version.ref = "dagger" } diff --git a/settings.gradle.kts b/settings.gradle.kts index 98ade95664..7ca7341246 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -49,7 +49,6 @@ include( ":common:imageloading", ":data:db", ":data:db-room", - ":data:inject", ":data:legacy", ":data:models", ":data:test",