Skip to content

Commit

Permalink
Enable Kruth snapshots on androidx.dev
Browse files Browse the repository at this point in the history
This is not an indication we are planning to release or maintain Kruth in any shape or form.

Test: ./gradlew bOS
Change-Id: Ie2c38807b3ed2726e3e058c94fdc7ca608728ea5
  • Loading branch information
dlam committed Jul 6, 2023
1 parent 40ef8e9 commit 14495fa
Show file tree
Hide file tree
Showing 62 changed files with 40 additions and 34 deletions.
6 changes: 3 additions & 3 deletions datastore/datastore-core-okio/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ androidXMultiplatform {
}
commonTest {
dependencies {
api(project(":internal-testutils-kmp"))
api(project(":kruth:kruth"))
api(libs.kotlinTestCommon)
api(libs.kotlinTestAnnotationsCommon)
api(libs.kotlinCoroutinesTest)
api(project(":internal-testutils-datastore"))
api(project(":internal-testutils-kmp"))
api(project(":kruth:kruth"))
}
}
jvmTest {
Expand All @@ -71,7 +71,7 @@ androidXMultiplatform {
implementation(libs.kotlinTest)
implementation(libs.kotlinTestAnnotationsCommon)
api(project(":internal-testutils-datastore"))
api(project(":internal-testutils-kmp"))
api(project(":kruth:kruth"))
}
}

Expand Down
4 changes: 2 additions & 2 deletions datastore/datastore-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ androidXMultiplatform {
implementation(libs.kotlinCoroutinesTest)
implementation(libs.okio)
api(project(":datastore:datastore-core-okio"))
implementation(project(":internal-testutils-kmp"))
implementation(project(":kruth:kruth"))
implementation(project(":internal-testutils-datastore"))
}
}
Expand All @@ -101,7 +101,7 @@ androidXMultiplatform {
dependencies {
implementation(libs.junit)
implementation(libs.kotlinTest)
implementation(project(":internal-testutils-kmp"))
implementation(project(":kruth:kruth"))
implementation(project(":internal-testutils-datastore"))

// Workaround bug in 1.8.0, was supposed be fixed in RC2/final, but apparently not.
Expand Down
6 changes: 3 additions & 3 deletions datastore/datastore-preferences-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ androidXMultiplatform {
implementation(libs.kotlinTestAnnotationsCommon)
implementation(libs.kotlinCoroutinesTest)
implementation(project(":datastore:datastore-core"))
implementation(project(":internal-testutils-kmp"))
implementation(project(":kruth:kruth"))
implementation(project(":internal-testutils-datastore"))
}
}
Expand All @@ -71,7 +71,7 @@ androidXMultiplatform {
implementation(libs.junit)
implementation(libs.kotlinTest)
implementation(project(":internal-testutils-datastore"))
implementation(project(":internal-testutils-kmp"))
implementation(project(":kruth:kruth"))
}
}
if (enableNative) {
Expand All @@ -88,7 +88,7 @@ androidXMultiplatform {
dependencies {
implementation(libs.kotlinTest)
implementation(project(":internal-testutils-datastore"))
implementation(project(":internal-testutils-kmp"))
implementation(project(":kruth:kruth"))
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions datastore/datastore/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ androidXMultiplatform {
implementation(libs.okio)
api(project(":datastore:datastore-core"))
api(project(":datastore:datastore-core-okio"))
implementation(project(":internal-testutils-kmp"))
implementation(project(":kruth:kruth"))
implementation(project(":internal-testutils-datastore"))
}
}
Expand All @@ -65,7 +65,7 @@ androidXMultiplatform {
dependsOn(commonTest)
dependencies {
implementation(libs.kotlinTest)
implementation(project(":internal-testutils-kmp"))
implementation(project(":kruth:kruth"))
implementation(project(":internal-testutils-datastore"))
}
}
Expand All @@ -81,7 +81,7 @@ androidXMultiplatform {
implementation(libs.junit)
implementation(libs.truth)
implementation(project(":internal-testutils-truth"))
implementation(project(":internal-testutils-kmp"))
implementation(project(":kruth:kruth"))
implementation(project(":internal-testutils-datastore"))
implementation(libs.kotlinCoroutinesTest)
implementation(libs.testRunner)
Expand Down
2 changes: 1 addition & 1 deletion datastore/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ playground {
if (name.startsWith(":datastore")) return true
if (name == ":annotation:annotation-sampled") return true
if (name == ":internal-testutils-datastore") return true
if (name == ":internal-testutils-kmp") return true
if (name == ":kruth:kruth") return true
if (name == ":internal-testutils-truth") return true
return false
})
Expand Down
1 change: 0 additions & 1 deletion testutils/testutils-kmp/OWNERS → kruth/kruth/OWNERS
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
[email protected]
[email protected]
[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*/

import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
import androidx.build.Publish

plugins {
id("AndroidXPlugin")
Expand All @@ -26,6 +28,8 @@ androidXMultiplatform {
linux()
ios()

defaultPlatform(PlatformIdentifier.JVM)

sourceSets {
commonMain {
dependencies {
Expand Down Expand Up @@ -58,5 +62,6 @@ androidXMultiplatform {
}

androidx {
publish = Publish.SNAPSHOT_ONLY
type = LibraryType.INTERNAL_TEST_LIBRARY
}
2 changes: 2 additions & 0 deletions libraryversions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ INPUT_MOTIONPREDICTION = "1.0.0-beta02"
INSPECTION = "1.0.0"
INTERPOLATOR = "1.1.0-alpha01"
JAVASCRIPTENGINE = "1.0.0-alpha06"
KRUTH = "0.1.0-dev01"
LEANBACK = "1.2.0-alpha03"
LEANBACK_GRID = "1.0.0-alpha02"
LEANBACK_PAGING = "1.1.0-alpha10"
Expand Down Expand Up @@ -222,6 +223,7 @@ INSPECTION = { group = "androidx.inspection", atomicGroupVersion = "versions.INS
INSPECTION_EXTENSIONS = { group = "androidx.inspection.extensions", atomicGroupVersion = "versions.SQLITE_INSPECTOR", overrideInclude = [ ":sqlite:sqlite-inspection" ] }
INTERPOLATOR = { group = "androidx.interpolator", atomicGroupVersion = "versions.INTERPOLATOR" }
JAVASCRIPTENGINE = { group = "androidx.javascriptengine", atomicGroupVersion = "versions.JAVASCRIPTENGINE" }
KRUTH = { group = "androidx.kruth", atomicGroupVersion = "versions.KRUTH" }
LEANBACK = { group = "androidx.leanback" }
LEGACY = { group = "androidx.legacy" }
LIBYUV = { group = "libyuv", atomicGroupVersion = "versions.LIBYUV" }
Expand Down
2 changes: 1 addition & 1 deletion paging/paging-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ androidXMultiplatform {
dependencies {
implementation(libs.kotlinCoroutinesTest)
implementation(libs.kotlinTest)
implementation(project(":internal-testutils-kmp"))
implementation(project(":kruth:kruth"))
implementation(project(":internal-testutils-paging"))
}
}
Expand Down
2 changes: 1 addition & 1 deletion paging/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ playground {
selectProjectsFromAndroidX({ name ->
if (name.startsWith(":paging")) return true
if (name == ":annotation:annotation-sampled") return true
if (name == ":internal-testutils-kmp") return true
if (name == ":kruth:kruth") return true
if (name == ":internal-testutils-ktx") return true
if (name == ":internal-testutils-paging") return true
if (name == ":compose:integration-tests:demos:common") return true
Expand Down
2 changes: 1 addition & 1 deletion room/integration-tests/kotlintestapp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ dependencies {
exclude group: "com.android.support", module: "support-annotations"
exclude module: "hamcrest-core"
})
androidTestImplementation(project(":internal-testutils-kmp"))
androidTestImplementation(project(":kruth:kruth"))
androidTestImplementation(libs.kotlinTest)
androidTestImplementation(project(":room:room-guava"))
androidTestImplementation(project(":room:room-testing"))
Expand Down
2 changes: 1 addition & 1 deletion room/room-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies {
testImplementation(libs.junit)
testImplementation(libs.mockitoCore4)
testImplementation(libs.guava)
testImplementation(project(":internal-testutils-kmp"))
testImplementation(project(":kruth:kruth"))
}

androidx {
Expand Down
2 changes: 1 addition & 1 deletion room/room-compiler-processing-testing/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dependencies {
implementation(libs.kotlinStdlibJdk8) // KSP defines older version as dependency, force update.
implementation(libs.ksp)
implementation(libs.googleCompileTesting)
implementation(project(":internal-testutils-kmp"))
implementation(project(":kruth:kruth"))
// specify these to match the kotlin compiler version in AndroidX rather than what KSP or KCT
// uses
implementation(libs.kotlinCompilerEmbeddable)
Expand Down
2 changes: 1 addition & 1 deletion room/room-compiler-processing/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ dependencies {
testImplementation(libs.kotlinMetadataJvm)
testImplementation(project(":room:room-compiler-processing-testing"))
testImplementation(project(":internal-testutils-common"))
testImplementation(project(":internal-testutils-kmp"))
testImplementation(project(":kruth:kruth"))
}

tasks.withType(KotlinCompile).configureEach {
Expand Down
2 changes: 1 addition & 1 deletion room/room-compiler/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ dependencies {
implementation(libs.apacheCommonsCodec)
implementation(libs.intellijAnnotations)
testImplementation(libs.truth)
testImplementation(project(":internal-testutils-kmp"))
testImplementation(project(":kruth:kruth"))
testImplementation(libs.testParameterInjector)
testImplementation(libs.autoValue) // to access the processor in tests
testImplementation(libs.autoServiceAnnotations)
Expand Down
2 changes: 1 addition & 1 deletion room/room-gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ dependencies {
testImplementation(project(":internal-testutils-gradle-plugin"))
testImplementation(gradleTestKit())
testImplementation(libs.junit)
testImplementation(project(":internal-testutils-kmp"))
testImplementation(project(":kruth:kruth"))
testImplementation(libs.testParameterInjector)

testPlugin("com.android.tools.build:gradle:7.3.0")
Expand Down
4 changes: 2 additions & 2 deletions room/room-ktx/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ dependencies {
api(libs.kotlinCoroutinesAndroid)
testImplementation(libs.junit)
testImplementation(libs.mockitoCore4)
testImplementation(project(":internal-testutils-kmp"))
testImplementation(project(":kruth:kruth"))
testImplementation("androidx.lifecycle:lifecycle-livedata-core:2.0.0")
testImplementation(libs.testRunner)
testImplementation(libs.kotlinCoroutinesTest)

androidTestImplementation(project(":internal-testutils-kmp"))
androidTestImplementation(project(":kruth:kruth"))
androidTestImplementation(libs.testRunner)
androidTestImplementation(libs.kotlinCoroutinesTest)
}
Expand Down
2 changes: 1 addition & 1 deletion room/room-paging-guava/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies {
implementation(project(":room:room-guava"))
api("androidx.paging:paging-guava:3.1.1")

androidTestImplementation(project(":internal-testutils-kmp"))
androidTestImplementation(project(":kruth:kruth"))
androidTestImplementation(libs.testExtJunitKtx)
androidTestImplementation(libs.testRunner)
androidTestImplementation(libs.kotlinTestJunit)
Expand Down
2 changes: 1 addition & 1 deletion room/room-paging-rxjava2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies {
implementation(project(":room:room-paging"))
implementation(project(":room:room-rxjava2"))

androidTestImplementation(project(":internal-testutils-kmp"))
androidTestImplementation(project(":kruth:kruth"))
androidTestImplementation(libs.testExtJunitKtx)
androidTestImplementation(libs.testRunner)
androidTestImplementation(libs.kotlinTestJunit) //
Expand Down
2 changes: 1 addition & 1 deletion room/room-paging-rxjava3/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies {
implementation(project(":room:room-paging"))
implementation(project(":room:room-rxjava3"))

androidTestImplementation(project(":internal-testutils-kmp"))
androidTestImplementation(project(":kruth:kruth"))
androidTestImplementation(libs.testExtJunitKtx)
androidTestImplementation(libs.testRunner)
androidTestImplementation(libs.kotlinCoroutinesRx3)
Expand Down
2 changes: 1 addition & 1 deletion room/room-paging/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ dependencies {
kspAndroidTest(
project(path: ":room:room-compiler", configuration: "shadowAndImplementation")
)
androidTestImplementation(project(":internal-testutils-kmp"))
androidTestImplementation(project(":kruth:kruth"))
androidTestImplementation("androidx.arch.core:core-testing:2.2.0")
androidTestImplementation(project(":internal-testutils-common"))
androidTestImplementation(projectOrArtifact(":paging:paging-testing"))
Expand Down
4 changes: 2 additions & 2 deletions room/room-runtime/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ dependencies {
testImplementation("androidx.lifecycle:lifecycle-livedata-core:2.0.0")
testImplementation(libs.kotlinStdlib)
testImplementation(libs.kotlinTest)
testImplementation(project(":internal-testutils-kmp"))
testImplementation(project(":kruth:kruth"))
testImplementation(libs.testRunner) // Needed for @FlakyTest and @Ignore

androidTestImplementation(libs.junit)
Expand All @@ -68,7 +68,7 @@ dependencies {
androidTestImplementation(libs.mockitoCore, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(project(":internal-testutils-truth")) // for assertThrows
androidTestImplementation(project(":internal-testutils-kmp"))
androidTestImplementation(project(":kruth:kruth"))
androidTestImplementation("androidx.arch.core:core-testing:2.2.0")

}
Expand Down
2 changes: 1 addition & 1 deletion room/room-rxjava2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ dependencies {
implementation("androidx.arch.core:core-runtime:2.2.0")
implementation(libs.kotlinStdlib)

testImplementation(project(":internal-testutils-kmp"))
testImplementation(project(":kruth:kruth"))
testImplementation(libs.kotlinTest)
testImplementation(libs.mockitoCore4)
testImplementation(libs.mockitoKotlin4)
Expand Down
2 changes: 1 addition & 1 deletion room/room-rxjava3/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies {
implementation("androidx.arch.core:core-runtime:2.2.0")
implementation(libs.kotlinStdlib)

testImplementation(project(":internal-testutils-kmp"))
testImplementation(project(":kruth:kruth"))
testImplementation(libs.kotlinTest)
testImplementation(libs.mockitoCore4)
testImplementation(libs.mockitoKotlin4)
Expand Down
2 changes: 1 addition & 1 deletion room/room-testing/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ dependencies {
api(libs.junit)
implementation("androidx.arch.core:core-runtime:2.2.0")
androidTestImplementation(libs.truth) // Kruth currently lacks StringSubject#containsMatch
androidTestImplementation(project(":internal-testutils-kmp"))
androidTestImplementation(project(":kruth:kruth"))
androidTestImplementation(libs.kotlinStdlib)
androidTestImplementation(libs.testExtJunit)
androidTestImplementation(libs.testCore)
Expand Down
2 changes: 1 addition & 1 deletion room/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ playground {
if (name == ":annotation:annotation-experimental-lint") return true
if (name == ":annotation:annotation-experimental-lint-integration-tests") return true
if (name == ":internal-testutils-truth") return true
if (name == ":internal-testutils-kmp") return true
if (name == ":kruth:kruth") return true
return false
})
}
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -1155,13 +1155,13 @@ includeProject(":internal-testutils-espresso", "testutils/testutils-espresso", [
includeProject(":internal-testutils-fonts", "testutils/testutils-fonts", [BuildType.MAIN, BuildType.GLANCE, BuildType.MEDIA, BuildType.FLAN, BuildType.COMPOSE])
includeProject(":internal-testutils-truth", "testutils/testutils-truth")
includeProject(":internal-testutils-ktx", "testutils/testutils-ktx")
includeProject(":internal-testutils-kmp", "testutils/testutils-kmp", [BuildType.MAIN, BuildType.INFRAROGUE, BuildType.KMP, BuildType.COMPOSE])
includeProject(":internal-testutils-macrobenchmark", "testutils/testutils-macrobenchmark", [BuildType.MAIN, BuildType.COMPOSE])
includeProject(":internal-testutils-navigation", "testutils/testutils-navigation", [BuildType.MAIN, BuildType.COMPOSE, BuildType.FLAN])
includeProject(":internal-testutils-paging", "testutils/testutils-paging", [BuildType.MAIN, BuildType.COMPOSE])
includeProject(":internal-testutils-paparazzi", "testutils/testutils-paparazzi", [BuildType.COMPOSE])
includeProject(":internal-testutils-gradle-plugin", "testutils/testutils-gradle-plugin", [BuildType.MAIN, BuildType.FLAN, BuildType.COMPOSE, BuildType.TOOLS])
includeProject(":internal-testutils-mockito", "testutils/testutils-mockito", [BuildType.MAIN, BuildType.MEDIA, BuildType.FLAN, BuildType.COMPOSE])
includeProject(":kruth:kruth", [BuildType.MAIN, BuildType.INFRAROGUE, BuildType.KMP, BuildType.COMPOSE])

/////////////////////////////
//
Expand Down

0 comments on commit 14495fa

Please sign in to comment.