Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use version catalog naming style for plugins #643

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
* limitations under the License.
*/
plugins {
alias(libs.plugins.androidApplication) apply false
alias(libs.plugins.androidLibrary) apply false
alias(libs.plugins.kotlinAndroid) apply false
alias(libs.plugins.kotlinKapt) apply false
alias(libs.plugins.mavenPublish) apply false
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.kapt) apply false
alias(libs.plugins.maven.publish) apply false
alias(libs.plugins.errorprone) apply false
alias(libs.plugins.nullaway) apply false
alias(libs.plugins.intellij) apply false
Expand Down
2 changes: 1 addition & 1 deletion android/conventions/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ repositories {
dependencies {
// Workaround for using version catalog on precompiled scripts.
// https://github.com/gradle/gradle/issues/15383#issuecomment-779893192
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
implementation(files((libs as Any).javaClass.superclass.protectionDomain.codeSource.location))
implementation(gradleApi())
implementation(libs.gradle.android.plugin)
implementation(libs.gradle.kotlin.plugin)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ configure<com.diffplug.gradle.spotless.SpotlessExtension> {
}
java {
target("src/*/java/**/*.java")
googleJavaFormat(libs.versions.gjf.get())
googleJavaFormat(libs.versions.google.java.format.get())
licenseHeaderFile(rootProject.file("config/spotless/copyright.java"))
removeUnusedImports()
trimTrailingWhitespace()
Expand Down
8 changes: 4 additions & 4 deletions android/demos/compose/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id("ribs.kotlin-android-application-conventions")
alias(libs.plugins.kotlinKapt)
alias(libs.plugins.kotlin.kapt)
}

android {
Expand Down Expand Up @@ -42,9 +42,9 @@ dependencies {


// Flipper Debug tool integration
debugImplementation 'com.facebook.flipper:flipper:0.93.0'
debugImplementation 'com.facebook.soloader:soloader:0.10.1'
releaseImplementation 'com.facebook.flipper:flipper-noop:0.93.0'
debugImplementation(libs.flipper)
debugImplementation(libs.soloader)
releaseImplementation(libs.flipper.noop)

// Flipper RIBs plugin
implementation(project(":tooling:rib-flipper-plugin"))
Expand Down
8 changes: 4 additions & 4 deletions android/demos/flipper/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
plugins {
id("ribs.kotlin-android-application-conventions")
alias(libs.plugins.kotlinKapt)
alias(libs.plugins.kotlin.kapt)
}

android {
Expand All @@ -38,9 +38,9 @@ dependencies {
testImplementation(project(":libraries:rib-test"))

// Flipper Debug tool integration
debugImplementation 'com.facebook.flipper:flipper:0.93.0'
debugImplementation 'com.facebook.soloader:soloader:0.10.1'
releaseImplementation 'com.facebook.flipper:flipper-noop:0.93.0'
debugImplementation(libs.flipper)
debugImplementation(libs.soloader)
releaseImplementation(libs.flipper.noop)

// Flipper RIBs plugin
implementation(project(":tooling:rib-flipper-plugin"))
Expand Down
2 changes: 1 addition & 1 deletion android/demos/intellij/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
plugins {
id("ribs.kotlin-android-application-conventions")
alias(libs.plugins.kotlinKapt)
alias(libs.plugins.kotlin.kapt)
}

android {
Expand Down
3 changes: 1 addition & 2 deletions android/demos/memory-leaks/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
plugins {
id("ribs.kotlin-android-application-errorprone-conventions")
alias(libs.plugins.kotlinKapt)
alias(libs.plugins.kotlin.kapt)
}

android {
Expand All @@ -30,7 +30,6 @@ dependencies {
implementation(project(":libraries:rib-android"))
kapt(project(":libraries:rib-compiler-app"))
kapt(project(":libraries:rib-compiler-test"))
kapt(libs.autodispose.errorprone)
kapt(libs.dagger.compiler)
implementation(libs.dagger.library)
implementation(libs.rxbinding)
Expand Down
6 changes: 3 additions & 3 deletions android/demos/rib-workers/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ dependencies {
implementation(libs.autodispose.coroutines)
implementation(libs.motif.library)

debugImplementation 'com.facebook.flipper:flipper:0.93.0'
debugImplementation 'com.facebook.soloader:soloader:0.10.1'
releaseImplementation 'com.facebook.flipper:flipper-noop:0.93.0'
debugImplementation(libs.flipper)
debugImplementation(libs.soloader)
releaseImplementation(libs.flipper.noop)

implementation(project(":tooling:rib-flipper-plugin"))
}
23 changes: 10 additions & 13 deletions android/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ autodispose = "1.4.0"
autoservice = "1.0-rc4"
autovalue = "1.7"
checkerqual = "2.5.1"
compile-testing = "0.17"
compose-compiler = "1.4.6"
compose-libraries = "1.4.0"
compose-navigation = "2.4.0-alpha03"
Expand All @@ -18,7 +17,7 @@ dagger = "2.43.2"
errorprone = "2.3.3"
errorprone-javac = "9+181-r4173-1"
flipper = "0.93.0"
gjf = "1.16.0"
google-java-format = "1.16.0"
gradle-android-plugin = "7.4.2"
gradle-errorprone-plugin = "1.3.0"
gradle-intellij-plugin = "1.15.0"
Expand All @@ -31,14 +30,10 @@ guava-jre = "27.1-jre"
intellij = "2023.2"
javapoet = "1.11.1"
jsr250 = "1.0"
junit = "4.12"
kotlin = "1.8.20"
kotlinx-coroutines = "1.7.3"
ktfmt = "0.43"
ktlint = "0.48.2"
leakcanary = "1.5.4"
mockito = "4.6.1"
mockito-kotlin = "4.0.0"
motif = "0.3.4"
percent = "1.0.0"
reactivestreams = "1.0.0"
Expand All @@ -47,8 +42,8 @@ rxbinding = "2.0.0"
rxjava2 = "2.2.8"
rxkotlin = "2.2.0"
rxrelay2 = "2.1.0"
savedstate = "1.2.0"
truth = "0.43"
savedstate = "1.2.1"
soloader = "0.10.1"
uber-nullaway = "0.9.0"

[libraries]
Expand Down Expand Up @@ -82,6 +77,7 @@ dagger-library = { group = "com.google.dagger", name = "dagger", version.ref = "
errorprone-core = { group = "com.google.errorprone", name = "error_prone_core", version.ref = "errorprone" }
errorprone-javac = { group = "com.google.errorprone", name = "javac", version.ref = "errorprone-javac" }
flipper = { group = "com.facebook.flipper", name = "flipper", version.ref = "flipper" }
flipper-noop = { module = "com.facebook.flipper:flipper-noop", version.ref = "flipper" }
gradle-android-plugin = { module = "com.android.tools.build:gradle", version.ref = "gradle-android-plugin" }
gradle-errorprone-plugin = { module = "net.ltgt.gradle:gradle-errorprone-plugin", version.ref = "gradle-errorprone-plugin" }
gradle-kotlin-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
Expand All @@ -106,15 +102,16 @@ rxjava2 = { group = "io.reactivex.rxjava2", name = "rxjava", version.ref = "rxja
rxkotlin = { group = "io.reactivex.rxjava2", name = "rxkotlin", version.ref = "rxkotlin" }
rxrelay2 = { group = "com.jakewharton.rxrelay2", name = "rxrelay", version.ref = "rxrelay2" }
savedstate = { group = "androidx.savedstate", name = "savedstate", version.ref = "savedstate" }
soloader = { module = "com.facebook.soloader:soloader", version.ref = "soloader" }
uber-nullaway = { group = "com.uber.nullaway", name = "nullaway", version.ref = "uber-nullaway" }

[plugins]
androidApplication = { id = "com.android.application", version.ref = "gradle-android-plugin" }
androidLibrary = { id = "com.android.library", version.ref = "gradle-android-plugin" }
android-application = { id = "com.android.application", version.ref = "gradle-android-plugin" }
android-library = { id = "com.android.library", version.ref = "gradle-android-plugin" }
errorprone = { id = "net.ltgt.errorprone", version.ref = "gradle-errorprone-plugin" }
intellij = { id = "org.jetbrains.intellij", version.ref = "gradle-intellij-plugin" }
kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlinKapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
mavenPublish = { id = "com.vanniktech.maven.publish", version.ref = "gradle-maven-publish-plugin" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "gradle-maven-publish-plugin" }
nullaway = { id = "net.ltgt.nullaway", version.ref = "gradle-nullaway-plugin" }
spotless = { id = "com.diffplug.spotless", version.ref = "gradle-spotless-plugin" }
6 changes: 2 additions & 4 deletions android/gradle/test-libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@
compile-testing = "0.17"
coroutines = "1.7.3"
junit = "4.12"
mockito = "4.6.1"
mockito-kotlin = "4.0.0"
robolectric = "4.4"
truth = "0.43"

[libraries]
compileTesting = { group = "com.google.testing.compile", name = "compile-testing", version.ref = "compile-testing" }
compile-testing = { group = "com.google.testing.compile", name = "compile-testing", version.ref = "compile-testing" }
coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "coroutines" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
mockito = { group = "org.mockito", name = "mockito-core", version.ref = "mockito" }
mockitoKotlin = { group = "org.mockito.kotlin", name = "mockito-kotlin", version.ref = "mockito-kotlin" }
mockito-kotlin = { group = "org.mockito.kotlin", name = "mockito-kotlin", version.ref = "mockito-kotlin" }
robolectric = { group = "org.robolectric", name = "robolectric", version.ref = "robolectric" }
truth = { group = "com.google.truth", name = "truth", version.ref = "truth" }
4 changes: 2 additions & 2 deletions android/libraries/rib-android-compose/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
plugins {
id("ribs.kotlin-android-library-conventions")
alias(libs.plugins.mavenPublish)
alias(libs.plugins.maven.publish)
}

android {
Expand All @@ -35,6 +35,6 @@ dependencies {
implementation(libs.compose.foundation)
implementation(libs.compose.ui)
testImplementation(testLibs.robolectric)
testImplementation(testLibs.mockitoKotlin)
testImplementation(testLibs.mockito.kotlin)
testImplementation(project(":libraries:rib-test"))
}
2 changes: 1 addition & 1 deletion android/libraries/rib-android-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

plugins {
id("ribs.kotlin-android-library-conventions")
alias(libs.plugins.mavenPublish)
alias(libs.plugins.maven.publish)
}

android {
Expand Down
4 changes: 2 additions & 2 deletions android/libraries/rib-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
plugins {
id("ribs.kotlin-android-library-conventions")
alias(libs.plugins.mavenPublish)
alias(libs.plugins.maven.publish)
}

android {
Expand Down Expand Up @@ -48,6 +48,6 @@ dependencies {
testImplementation(testLibs.robolectric)
testImplementation(libs.lifecycle.runtime)
testImplementation(libs.appcompat)
testImplementation(testLibs.mockitoKotlin)
testImplementation(testLibs.mockito.kotlin)
testImplementation(project(":libraries:rib-test"))
}
8 changes: 3 additions & 5 deletions android/libraries/rib-base/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
plugins {
id("ribs.kotlin-library-conventions")
alias(libs.plugins.kotlinKapt)
alias(libs.plugins.mavenPublish)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.maven.publish)
}

dependencies {
Expand Down Expand Up @@ -47,9 +47,7 @@ dependencies {
testImplementation(project(":libraries:rib-coroutines-test"))
testImplementation(libs.annotation)
testImplementation(libs.android.api)
testImplementation(testLibs.junit)
testImplementation(testLibs.mockito)
testImplementation(testLibs.mockitoKotlin)
testImplementation(testLibs.mockito.kotlin)
testImplementation(testLibs.truth)
testImplementation(project(":libraries:rib-test")) {
transitive = false
Expand Down
4 changes: 2 additions & 2 deletions android/libraries/rib-compiler-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

plugins {
id("ribs.kotlin-library-conventions")
alias(libs.plugins.mavenPublish)
alias(libs.plugins.maven.publish)
}

dependencies {
Expand All @@ -30,7 +30,7 @@ dependencies {
compileOnly(libs.autoservice)
compileOnly(libs.android.api)

testImplementation(testLibs.compileTesting)
testImplementation(testLibs.compile.testing)
}

// https://code.google.com/p/android/issues/detail?id=64887
Expand Down
6 changes: 3 additions & 3 deletions android/libraries/rib-compiler-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import org.gradle.internal.jvm.Jvm

plugins {
id("ribs.kotlin-library-conventions")
alias(libs.plugins.kotlinKapt)
alias(libs.plugins.mavenPublish)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.maven.publish)
}

dependencies {
Expand All @@ -32,7 +32,7 @@ dependencies {
kapt(libs.autoservice)

testImplementation(libs.annotation)
testImplementation(testLibs.compileTesting)
testImplementation(testLibs.compile.testing)
testImplementation files("libs/tools.jar")
}

Expand Down
5 changes: 2 additions & 3 deletions android/libraries/rib-coroutines-test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

plugins {
id("ribs.kotlin-library-conventions")
alias(libs.plugins.mavenPublish)
alias(libs.plugins.maven.publish)
}

kotlin {
Expand All @@ -39,8 +39,7 @@ dependencies {
testImplementation(project(":libraries:rib-base"))
testImplementation(project(":libraries:rib-test"))
testImplementation(testLibs.junit)
testImplementation(testLibs.mockito)
testImplementation(testLibs.mockitoKotlin)
testImplementation(testLibs.mockito.kotlin)
testImplementation(testLibs.truth)
testImplementation(testLibs.coroutines.test)
testImplementation(libs.coroutines.android)
Expand Down
5 changes: 2 additions & 3 deletions android/libraries/rib-coroutines/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

plugins {
id("ribs.kotlin-library-conventions")
alias(libs.plugins.mavenPublish)
alias(libs.plugins.maven.publish)
}

dependencies {
Expand All @@ -30,8 +30,7 @@ dependencies {
testImplementation(project(":libraries:rib-base"))
testImplementation(project(":libraries:rib-test"))
testImplementation(testLibs.junit)
testImplementation(testLibs.mockito)
testImplementation(testLibs.mockitoKotlin)
testImplementation(testLibs.mockito.kotlin)
testImplementation(testLibs.truth)
testImplementation(testLibs.coroutines.test)
testImplementation(libs.annotation)
Expand Down
2 changes: 1 addition & 1 deletion android/libraries/rib-debug-utils/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

plugins {
id("ribs.kotlin-library-conventions")
alias(libs.plugins.mavenPublish)
alias(libs.plugins.maven.publish)
}

kotlin {
Expand Down
4 changes: 2 additions & 2 deletions android/libraries/rib-router-navigator/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

plugins {
id("ribs.kotlin-library-conventions")
alias(libs.plugins.mavenPublish)
alias(libs.plugins.maven.publish)
}

dependencies {
Expand All @@ -29,6 +29,6 @@ dependencies {
compileOnly(libs.android.api)

testImplementation(testLibs.junit)
testImplementation(testLibs.mockitoKotlin)
testImplementation(testLibs.mockito.kotlin)
testImplementation(testLibs.truth)
}
2 changes: 1 addition & 1 deletion android/libraries/rib-screen-stack-base/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

plugins {
id("ribs.kotlin-android-library-conventions")
alias(libs.plugins.mavenPublish)
alias(libs.plugins.maven.publish)
}

android {
Expand Down
Loading
Loading