[GH] Fix Unsupported Playground Project :benchmark:benchmark-common
## Proposed Changes
- Fix unsupported playground project issue by using `projectOrArtifact` for `:benchmark:benchmark-common` and `:benchmark:benchmark-junit4`
## Testing
Test: `none`
## Issues Fixed
Fixes: https://issuetracker.google.com/issues/377642759
This is an imported pull request from https://github.com/androidx/androidx/pull/728.
Resolves #728
Github-Pr-Head-Sha: a6f462637670a050937996a4c1b7da7c1c5baaf4
GitOrigin-RevId: 248e126d415b57b8c454f657bd4da0a4bddb46c6
Change-Id: I68d198c99066b65b66eb34e64f819a82a6e1a190
diff --git a/compose/benchmark-utils/build.gradle b/compose/benchmark-utils/build.gradle
index fd97201..523e168 100644
--- a/compose/benchmark-utils/build.gradle
+++ b/compose/benchmark-utils/build.gradle
@@ -33,7 +33,7 @@
dependencies {
api("androidx.activity:activity:1.2.0")
api(project(":compose:test-utils"))
- api(project(":benchmark:benchmark-junit4"))
+ api(projectOrArtifact(":benchmark:benchmark-junit4"))
implementation(libs.kotlinStdlibCommon)
implementation(project(":compose:runtime:runtime"))
diff --git a/compose/runtime/runtime/compose-runtime-benchmark/build.gradle b/compose/runtime/runtime/compose-runtime-benchmark/build.gradle
index e5794f5..12036c5 100644
--- a/compose/runtime/runtime/compose-runtime-benchmark/build.gradle
+++ b/compose/runtime/runtime/compose-runtime-benchmark/build.gradle
@@ -48,7 +48,7 @@
androidTestImplementation(libs.kotlinStdlib)
androidTestImplementation(libs.kotlinReflect)
androidTestImplementation(libs.kotlinCoroutinesTest)
- androidTestImplementation(project(":benchmark:benchmark-junit4"))
+ androidTestImplementation(projectOrArtifact(":benchmark:benchmark-junit4"))
androidTestImplementation("androidx.activity:activity:1.2.0")
androidTestImplementation(project(":activity:activity-compose"))
// old version of common-java8 conflicts with newer version, because both have
diff --git a/navigation/navigation-benchmark/build.gradle b/navigation/navigation-benchmark/build.gradle
index 614f804..c9d8c35 100644
--- a/navigation/navigation-benchmark/build.gradle
+++ b/navigation/navigation-benchmark/build.gradle
@@ -31,8 +31,8 @@
}
dependencies {
- androidTestImplementation(project(":benchmark:benchmark-common"))
- androidTestImplementation(project(":benchmark:benchmark-junit4"))
+ androidTestImplementation(projectOrArtifact(":benchmark:benchmark-common"))
+ androidTestImplementation(projectOrArtifact(":benchmark:benchmark-junit4"))
androidTestImplementation(project(":internal-testutils-navigation"))
androidTestImplementation(project(":navigation:navigation-common"))
androidTestImplementation(project(":navigation:navigation-runtime"))
diff --git a/room/benchmark/build.gradle b/room/benchmark/build.gradle
index 146a376..c679882 100644
--- a/room/benchmark/build.gradle
+++ b/room/benchmark/build.gradle
@@ -37,7 +37,7 @@
kspAndroidTest project(":room:room-compiler")
androidTestImplementation(project(":room:room-rxjava2"))
androidTestImplementation("androidx.arch.core:core-runtime:2.2.0")
- androidTestImplementation(project(":benchmark:benchmark-junit4"))
+ androidTestImplementation(projectOrArtifact(":benchmark:benchmark-junit4"))
androidTestImplementation(libs.rxjava2)
androidTestImplementation(libs.junit)
androidTestImplementation(libs.testExtJunit)