From 624771206469e3db182e86f10ec6dcaef6159d4d Mon Sep 17 00:00:00 2001 From: Melwin Magalhaes Date: Fri, 22 Sep 2023 14:31:39 +0200 Subject: [PATCH] Add convention plugins to version catalogs --- app-nia-catalog/build.gradle.kts | 4 ++-- app/build.gradle.kts | 12 ++++++------ benchmarks/build.gradle.kts | 2 +- core/analytics/build.gradle.kts | 6 +++--- core/common/build.gradle.kts | 6 +++--- core/data-test/build.gradle.kts | 4 ++-- core/data/build.gradle.kts | 6 +++--- core/database/build.gradle.kts | 8 ++++---- core/datastore-test/build.gradle.kts | 4 ++-- core/datastore/build.gradle.kts | 6 +++--- core/designsystem/build.gradle.kts | 6 +++--- core/domain/build.gradle.kts | 4 ++-- core/model/build.gradle.kts | 2 +- core/network/build.gradle.kts | 6 +++--- core/notifications/build.gradle.kts | 6 +++--- core/testing/build.gradle.kts | 6 +++--- core/ui/build.gradle.kts | 6 +++--- feature/bookmarks/build.gradle.kts | 6 +++--- feature/foryou/build.gradle.kts | 6 +++--- feature/interests/build.gradle.kts | 6 +++--- feature/search/build.gradle.kts | 6 +++--- feature/settings/build.gradle.kts | 6 +++--- feature/topic/build.gradle.kts | 6 +++--- gradle/libs.versions.toml | 15 +++++++++++++++ lint/build.gradle.kts | 2 +- sync/sync-test/build.gradle.kts | 4 ++-- sync/work/build.gradle.kts | 6 +++--- ui-test-hilt-manifest/build.gradle.kts | 4 ++-- 28 files changed, 88 insertions(+), 73 deletions(-) diff --git a/app-nia-catalog/build.gradle.kts b/app-nia-catalog/build.gradle.kts index 1f9ac1e2a..661fa070c 100644 --- a/app-nia-catalog/build.gradle.kts +++ b/app-nia-catalog/build.gradle.kts @@ -32,8 +32,8 @@ import com.google.samples.apps.nowinandroid.NiaFlavor * limitations under the License. */ plugins { - id("nowinandroid.android.application") - id("nowinandroid.android.application.compose") + alias(libs.plugins.nowinandroid.android.application) + alias(libs.plugins.nowinandroid.android.application.compose) } android { diff --git a/app/build.gradle.kts b/app/build.gradle.kts index f1ea598d7..2d506242c 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -16,13 +16,13 @@ import com.google.samples.apps.nowinandroid.NiaBuildType plugins { - id("nowinandroid.android.application") - id("nowinandroid.android.application.compose") - id("nowinandroid.android.application.flavors") - id("nowinandroid.android.application.jacoco") - id("nowinandroid.android.hilt") + alias(libs.plugins.nowinandroid.android.application) + alias(libs.plugins.nowinandroid.android.application.compose) + alias(libs.plugins.nowinandroid.android.application.flavors) + alias(libs.plugins.nowinandroid.android.application.jacoco) + alias(libs.plugins.nowinandroid.android.hilt) id("jacoco") - id("nowinandroid.android.application.firebase") + alias(libs.plugins.nowinandroid.android.application.firebase) id("com.google.android.gms.oss-licenses-plugin") } diff --git a/benchmarks/build.gradle.kts b/benchmarks/build.gradle.kts index 48a6687e4..10c0f7acf 100644 --- a/benchmarks/build.gradle.kts +++ b/benchmarks/build.gradle.kts @@ -17,7 +17,7 @@ import com.google.samples.apps.nowinandroid.NiaBuildType import com.google.samples.apps.nowinandroid.configureFlavors plugins { - id("nowinandroid.android.test") + alias(libs.plugins.nowinandroid.android.test) } android { diff --git a/core/analytics/build.gradle.kts b/core/analytics/build.gradle.kts index 8c573b854..0f712085c 100644 --- a/core/analytics/build.gradle.kts +++ b/core/analytics/build.gradle.kts @@ -14,9 +14,9 @@ * limitations under the License. */ plugins { - id("nowinandroid.android.library") - id("nowinandroid.android.library.compose") - id("nowinandroid.android.hilt") + alias(libs.plugins.nowinandroid.android.library) + alias(libs.plugins.nowinandroid.android.library.compose) + alias(libs.plugins.nowinandroid.android.hilt) } android { diff --git a/core/common/build.gradle.kts b/core/common/build.gradle.kts index 491dffd80..da3db3b11 100644 --- a/core/common/build.gradle.kts +++ b/core/common/build.gradle.kts @@ -14,9 +14,9 @@ * limitations under the License. */ plugins { - id("nowinandroid.android.library") - id("nowinandroid.android.library.jacoco") - id("nowinandroid.android.hilt") + alias(libs.plugins.nowinandroid.android.library) + alias(libs.plugins.nowinandroid.android.library.jacoco) + alias(libs.plugins.nowinandroid.android.hilt) } android { diff --git a/core/data-test/build.gradle.kts b/core/data-test/build.gradle.kts index dfc224e19..5a31f36fb 100644 --- a/core/data-test/build.gradle.kts +++ b/core/data-test/build.gradle.kts @@ -14,8 +14,8 @@ * limitations under the License. */ plugins { - id("nowinandroid.android.library") - id("nowinandroid.android.hilt") + alias(libs.plugins.nowinandroid.android.library) + alias(libs.plugins.nowinandroid.android.hilt) } android { diff --git a/core/data/build.gradle.kts b/core/data/build.gradle.kts index 51dfb5393..f4c417a29 100644 --- a/core/data/build.gradle.kts +++ b/core/data/build.gradle.kts @@ -14,9 +14,9 @@ * limitations under the License. */ plugins { - id("nowinandroid.android.library") - id("nowinandroid.android.library.jacoco") - id("nowinandroid.android.hilt") + alias(libs.plugins.nowinandroid.android.library) + alias(libs.plugins.nowinandroid.android.library.jacoco) + alias(libs.plugins.nowinandroid.android.hilt) id("kotlinx-serialization") } diff --git a/core/database/build.gradle.kts b/core/database/build.gradle.kts index a9c711ae3..5e11f207d 100644 --- a/core/database/build.gradle.kts +++ b/core/database/build.gradle.kts @@ -15,10 +15,10 @@ */ plugins { - id("nowinandroid.android.library") - id("nowinandroid.android.library.jacoco") - id("nowinandroid.android.hilt") - id("nowinandroid.android.room") + alias(libs.plugins.nowinandroid.android.library) + alias(libs.plugins.nowinandroid.android.library.jacoco) + alias(libs.plugins.nowinandroid.android.hilt) + alias(libs.plugins.nowinandroid.android.room) } android { diff --git a/core/datastore-test/build.gradle.kts b/core/datastore-test/build.gradle.kts index 193c49da7..e20e3935b 100644 --- a/core/datastore-test/build.gradle.kts +++ b/core/datastore-test/build.gradle.kts @@ -14,8 +14,8 @@ * limitations under the License. */ plugins { - id("nowinandroid.android.library") - id("nowinandroid.android.hilt") + alias(libs.plugins.nowinandroid.android.library) + alias(libs.plugins.nowinandroid.android.hilt) } android { diff --git a/core/datastore/build.gradle.kts b/core/datastore/build.gradle.kts index d6ca7ebcd..63b1dfcf4 100644 --- a/core/datastore/build.gradle.kts +++ b/core/datastore/build.gradle.kts @@ -15,9 +15,9 @@ */ plugins { - id("nowinandroid.android.library") - id("nowinandroid.android.library.jacoco") - id("nowinandroid.android.hilt") + alias(libs.plugins.nowinandroid.android.library) + alias(libs.plugins.nowinandroid.android.library.jacoco) + alias(libs.plugins.nowinandroid.android.hilt) alias(libs.plugins.protobuf) } diff --git a/core/designsystem/build.gradle.kts b/core/designsystem/build.gradle.kts index cf9873e2c..98bead9ab 100644 --- a/core/designsystem/build.gradle.kts +++ b/core/designsystem/build.gradle.kts @@ -14,9 +14,9 @@ * limitations under the License. */ plugins { - id("nowinandroid.android.library") - id("nowinandroid.android.library.compose") - id("nowinandroid.android.library.jacoco") + alias(libs.plugins.nowinandroid.android.library) + alias(libs.plugins.nowinandroid.android.library.compose) + alias(libs.plugins.nowinandroid.android.library.jacoco) } android { diff --git a/core/domain/build.gradle.kts b/core/domain/build.gradle.kts index 0e3949aa3..0f0ef4fbf 100644 --- a/core/domain/build.gradle.kts +++ b/core/domain/build.gradle.kts @@ -14,8 +14,8 @@ * limitations under the License. */ plugins { - id("nowinandroid.android.library") - id("nowinandroid.android.library.jacoco") + alias(libs.plugins.nowinandroid.android.library) + alias(libs.plugins.nowinandroid.android.library.jacoco) kotlin("kapt") } diff --git a/core/model/build.gradle.kts b/core/model/build.gradle.kts index 55b49beb7..393e3aa7d 100644 --- a/core/model/build.gradle.kts +++ b/core/model/build.gradle.kts @@ -15,7 +15,7 @@ */ plugins { - id("nowinandroid.jvm.library") + alias(libs.plugins.nowinandroid.jvm.library) } dependencies { diff --git a/core/network/build.gradle.kts b/core/network/build.gradle.kts index 633e2573d..082345e6e 100644 --- a/core/network/build.gradle.kts +++ b/core/network/build.gradle.kts @@ -15,9 +15,9 @@ */ plugins { - id("nowinandroid.android.library") - id("nowinandroid.android.library.jacoco") - id("nowinandroid.android.hilt") + alias(libs.plugins.nowinandroid.android.library) + alias(libs.plugins.nowinandroid.android.library.jacoco) + alias(libs.plugins.nowinandroid.android.hilt) id("kotlinx-serialization") id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin") } diff --git a/core/notifications/build.gradle.kts b/core/notifications/build.gradle.kts index 012c6f3f3..0d6e92ec6 100644 --- a/core/notifications/build.gradle.kts +++ b/core/notifications/build.gradle.kts @@ -14,9 +14,9 @@ * limitations under the License. */ plugins { - id("nowinandroid.android.library") - id("nowinandroid.android.library.compose") - id("nowinandroid.android.hilt") + alias(libs.plugins.nowinandroid.android.library) + alias(libs.plugins.nowinandroid.android.library.compose) + alias(libs.plugins.nowinandroid.android.hilt) } android { diff --git a/core/testing/build.gradle.kts b/core/testing/build.gradle.kts index 51f21355e..a85eb713a 100644 --- a/core/testing/build.gradle.kts +++ b/core/testing/build.gradle.kts @@ -14,9 +14,9 @@ * limitations under the License. */ plugins { - id("nowinandroid.android.library") - id("nowinandroid.android.library.compose") - id("nowinandroid.android.hilt") + alias(libs.plugins.nowinandroid.android.library) + alias(libs.plugins.nowinandroid.android.library.compose) + alias(libs.plugins.nowinandroid.android.hilt) } android { diff --git a/core/ui/build.gradle.kts b/core/ui/build.gradle.kts index 044abedaf..8986c19e3 100644 --- a/core/ui/build.gradle.kts +++ b/core/ui/build.gradle.kts @@ -14,9 +14,9 @@ * limitations under the License. */ plugins { - id("nowinandroid.android.library") - id("nowinandroid.android.library.compose") - id("nowinandroid.android.library.jacoco") + alias(libs.plugins.nowinandroid.android.library) + alias(libs.plugins.nowinandroid.android.library.compose) + alias(libs.plugins.nowinandroid.android.library.jacoco) } android { diff --git a/feature/bookmarks/build.gradle.kts b/feature/bookmarks/build.gradle.kts index 667e674ec..32394f911 100644 --- a/feature/bookmarks/build.gradle.kts +++ b/feature/bookmarks/build.gradle.kts @@ -15,9 +15,9 @@ */ plugins { - id("nowinandroid.android.feature") - id("nowinandroid.android.library.compose") - id("nowinandroid.android.library.jacoco") + alias(libs.plugins.nowinandroid.android.feature) + alias(libs.plugins.nowinandroid.android.library.compose) + alias(libs.plugins.nowinandroid.android.library.jacoco) } android { diff --git a/feature/foryou/build.gradle.kts b/feature/foryou/build.gradle.kts index bd633e3d2..afe769ab8 100644 --- a/feature/foryou/build.gradle.kts +++ b/feature/foryou/build.gradle.kts @@ -15,9 +15,9 @@ */ plugins { - id("nowinandroid.android.feature") - id("nowinandroid.android.library.compose") - id("nowinandroid.android.library.jacoco") + alias(libs.plugins.nowinandroid.android.feature) + alias(libs.plugins.nowinandroid.android.library.compose) + alias(libs.plugins.nowinandroid.android.library.jacoco) } android { diff --git a/feature/interests/build.gradle.kts b/feature/interests/build.gradle.kts index 5c4b0360a..20b1ef1aa 100644 --- a/feature/interests/build.gradle.kts +++ b/feature/interests/build.gradle.kts @@ -15,9 +15,9 @@ */ plugins { - id("nowinandroid.android.feature") - id("nowinandroid.android.library.compose") - id("nowinandroid.android.library.jacoco") + alias(libs.plugins.nowinandroid.android.feature) + alias(libs.plugins.nowinandroid.android.library.compose) + alias(libs.plugins.nowinandroid.android.library.jacoco) } android { namespace = "com.google.samples.apps.nowinandroid.feature.interests" diff --git a/feature/search/build.gradle.kts b/feature/search/build.gradle.kts index cbaa767bc..2bfd65527 100644 --- a/feature/search/build.gradle.kts +++ b/feature/search/build.gradle.kts @@ -15,9 +15,9 @@ */ plugins { - id("nowinandroid.android.feature") - id("nowinandroid.android.library.compose") - id("nowinandroid.android.library.jacoco") + alias(libs.plugins.nowinandroid.android.feature) + alias(libs.plugins.nowinandroid.android.library.compose) + alias(libs.plugins.nowinandroid.android.library.jacoco) } android { diff --git a/feature/settings/build.gradle.kts b/feature/settings/build.gradle.kts index ef367d612..4f5d649b7 100644 --- a/feature/settings/build.gradle.kts +++ b/feature/settings/build.gradle.kts @@ -15,9 +15,9 @@ */ plugins { - id("nowinandroid.android.feature") - id("nowinandroid.android.library.compose") - id("nowinandroid.android.library.jacoco") + alias(libs.plugins.nowinandroid.android.feature) + alias(libs.plugins.nowinandroid.android.library.compose) + alias(libs.plugins.nowinandroid.android.library.jacoco) } android { diff --git a/feature/topic/build.gradle.kts b/feature/topic/build.gradle.kts index ecb0630ce..cc0ecc868 100644 --- a/feature/topic/build.gradle.kts +++ b/feature/topic/build.gradle.kts @@ -15,9 +15,9 @@ */ plugins { - id("nowinandroid.android.feature") - id("nowinandroid.android.library.compose") - id("nowinandroid.android.library.jacoco") + alias(libs.plugins.nowinandroid.android.feature) + alias(libs.plugins.nowinandroid.android.library.compose) + alias(libs.plugins.nowinandroid.android.library.jacoco) } android { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 08391f2e6..ee4a64b3f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -157,3 +157,18 @@ ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } protobuf = { id = "com.google.protobuf", version.ref = "protobufPlugin" } roborazzi = { id = "io.github.takahirom.roborazzi", version.ref = "roborazzi" } secrets = { id = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin", version.ref = "secrets" } +nowinandroid-android-application = { id = "nowinandroid.android.application", version = "unspecified" } +nowinandroid-android-application-compose = { id = "nowinandroid.android.application.compose", version = "unspecified" } +nowinandroid-android-application-firebase = { id = "nowinandroid.android.application.firebase", version = "unspecified" } +nowinandroid-android-application-flavors = { id = "nowinandroid.android.application.flavors", version = "unspecified" } +nowinandroid-android-application-jacoco = { id = "nowinandroid.android.application.jacoco", version = "unspecified" } +nowinandroid-android-feature = { id = "nowinandroid.android.feature", version = "unspecified" } +nowinandroid-android-hilt = { id = "nowinandroid.android.hilt", version = "unspecified" } +nowinandroid-android-library = { id = "nowinandroid.android.library", version = "unspecified" } +nowinandroid-android-library-compose = { id = "nowinandroid.android.library.compose", version = "unspecified" } +nowinandroid-android-library-jacoco = { id = "nowinandroid.android.library.jacoco", version = "unspecified" } +nowinandroid-android-lint = { id = "nowinandroid.android.lint", version = "unspecified" } +nowinandroid-android-room = { id = "nowinandroid.android.room", version = "unspecified" } +nowinandroid-android-test = { id = "nowinandroid.android.test", version = "unspecified" } +nowinandroid-jvm-library = { id = "nowinandroid.jvm.library", version = "unspecified" } + diff --git a/lint/build.gradle.kts b/lint/build.gradle.kts index 35b6ec1e8..c7032cf40 100644 --- a/lint/build.gradle.kts +++ b/lint/build.gradle.kts @@ -19,7 +19,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { `java-library` kotlin("jvm") - id("nowinandroid.android.lint") + alias(libs.plugins.nowinandroid.android.lint) } java { diff --git a/sync/sync-test/build.gradle.kts b/sync/sync-test/build.gradle.kts index 99909af6b..003239898 100644 --- a/sync/sync-test/build.gradle.kts +++ b/sync/sync-test/build.gradle.kts @@ -14,8 +14,8 @@ * limitations under the License. */ plugins { - id("nowinandroid.android.library") - id("nowinandroid.android.hilt") + alias(libs.plugins.nowinandroid.android.library) + alias(libs.plugins.nowinandroid.android.hilt) } android { diff --git a/sync/work/build.gradle.kts b/sync/work/build.gradle.kts index 79902e486..2dc02674d 100644 --- a/sync/work/build.gradle.kts +++ b/sync/work/build.gradle.kts @@ -14,9 +14,9 @@ * limitations under the License. */ plugins { - id("nowinandroid.android.library") - id("nowinandroid.android.library.jacoco") - id("nowinandroid.android.hilt") + alias(libs.plugins.nowinandroid.android.library) + alias(libs.plugins.nowinandroid.android.library.jacoco) + alias(libs.plugins.nowinandroid.android.hilt) } android { diff --git a/ui-test-hilt-manifest/build.gradle.kts b/ui-test-hilt-manifest/build.gradle.kts index b55036591..f41482814 100644 --- a/ui-test-hilt-manifest/build.gradle.kts +++ b/ui-test-hilt-manifest/build.gradle.kts @@ -14,8 +14,8 @@ * limitations under the License. */ plugins { - id("nowinandroid.android.library") - id("nowinandroid.android.hilt") + alias(libs.plugins.nowinandroid.android.library) + alias(libs.plugins.nowinandroid.android.hilt) } android {