Fix misconfig deps for activity
Making changes to ensure that the activity dependencies are cleaned up
correct.
Test: ./gradlew bOS
Fixes: 349878946
Fixes: 349884129
Fixes: 349884639
Fixes: 349884361
Fixes: 349884478
Fixes: 349884617
Fixes: 349884518
Fixes: 349884381
Change-Id: I18aa3f5bcb801774c83193ede770b526a1068c6a
diff --git a/activity/activity-compose-lint/build.gradle b/activity/activity-compose-lint/build.gradle
index 88a73b5..42e9863 100644
--- a/activity/activity-compose-lint/build.gradle
+++ b/activity/activity-compose-lint/build.gradle
@@ -35,12 +35,16 @@
compileOnly(libs.androidLintMinApi)
compileOnly(libs.kotlinStdlib)
bundleInside(projectOrArtifact(":compose:lint:common"))
+ compileOnly(libs.intellijCore)
+ compileOnly(libs.uast)
+ compileOnly(libs.intellijKotlinCompiler)
+
testImplementation(projectOrArtifact(":compose:lint:common-test"))
testImplementation(libs.kotlinStdlib)
- testImplementation(libs.kotlinReflect)
+ testRuntimeOnly(libs.kotlinReflect)
testImplementation(libs.kotlinStdlibJdk8)
- testImplementation(libs.androidLint)
+ testImplementation(libs.androidLintApi)
testImplementation(libs.androidLintTests)
testImplementation(libs.junit)
testImplementation(libs.truth)
diff --git a/activity/activity-compose/build.gradle b/activity/activity-compose/build.gradle
index 1d02f4a..38212fc 100644
--- a/activity/activity-compose/build.gradle
+++ b/activity/activity-compose/build.gradle
@@ -33,18 +33,35 @@
dependencies {
implementation(libs.kotlinStdlib)
+ implementation(libs.kotlinCoroutinesCore)
api("androidx.compose.runtime:runtime:1.0.1")
api("androidx.compose.runtime:runtime-saveable:1.0.1")
api(projectOrArtifact(":activity:activity-ktx"))
- api("androidx.lifecycle:lifecycle-viewmodel:2.6.1")
api("androidx.compose.ui:ui:1.0.1")
+ api("androidx.core:core-ktx:1.13.0")
+ api("androidx.lifecycle:lifecycle-viewmodel:2.6.1")
+ implementation("androidx.lifecycle:lifecycle-common:2.6.1")
+ implementation("androidx.lifecycle:lifecycle-runtime:2.6.1")
+ implementation("androidx.savedstate:savedstate:1.2.1")
+ androidTestImplementation("androidx.annotation:annotation:1.8.0")
+ androidTestImplementation("androidx.compose.foundation:foundation-layout:1.6.0")
androidTestImplementation projectOrArtifact(":compose:ui:ui-test-junit4")
androidTestImplementation projectOrArtifact(":compose:material:material")
- androidTestImplementation project(":compose:test-utils")
+ androidTestRuntimeOnly project(":compose:test-utils")
+ androidTestImplementation(project(":compose:foundation:foundation"))
+ androidTestImplementation(project(":compose:runtime:runtime"))
+ androidTestImplementation(project(":compose:ui:ui"))
+ androidTestImplementation(project(":compose:ui:ui-graphics"))
+ androidTestImplementation(project(":compose:ui:ui-test"))
+ androidTestImplementation(project(":compose:ui:ui-text"))
+ androidTestImplementation(project(":lifecycle:lifecycle-common"))
+ androidTestImplementation(project(":lifecycle:lifecycle-runtime"))
androidTestImplementation projectOrArtifact(":lifecycle:lifecycle-runtime-testing")
+ androidTestImplementation("androidx.lifecycle:lifecycle-runtime-compose:2.8.2")
+ androidTestImplementation(libs.testCore)
androidTestImplementation(libs.testRunner)
- androidTestImplementation(libs.testExtJunitKtx)
+ androidTestImplementation(libs.testExtJunit)
androidTestImplementation(libs.junit)
androidTestImplementation(libs.truth)
diff --git a/activity/activity-compose/integration-tests/activity-demos/build.gradle b/activity/activity-compose/integration-tests/activity-demos/build.gradle
index a541a1c..e69de29 100644
--- a/activity/activity-compose/integration-tests/activity-demos/build.gradle
+++ b/activity/activity-compose/integration-tests/activity-demos/build.gradle
@@ -1,49 +0,0 @@
-/*
- * Copyright 2020 The Android Open Source Project
- *
- * 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.
- */
-
-/**
- * This file was created using the `create_project.py` script located in the
- * `<AndroidX root>/development/project-creator` directory.
- *
- * Please use that script when creating a new project, rather than copying an existing project and
- * modifying its settings.
- */
-import androidx.build.Publish
-
-plugins {
- id("AndroidXPlugin")
- id("com.android.library")
- id("AndroidXComposePlugin")
- id("org.jetbrains.kotlin.android")
-}
-
-dependencies {
- implementation(libs.kotlinStdlib)
- implementation projectOrArtifact(":activity:activity-compose")
- implementation projectOrArtifact(":activity:activity-compose:activity-compose-samples")
-}
-
-androidx {
- name = "Compose Activity Demos"
- publish = Publish.NONE
- inceptionYear = "2020"
- description = "This is a project for Activity demos."
-}
-
-android {
- compileSdk 35
- namespace "androidx.activity.compose.demos"
-}
diff --git a/activity/activity-compose/samples/build.gradle b/activity/activity-compose/samples/build.gradle
index 6086b6d..27063bd 100644
--- a/activity/activity-compose/samples/build.gradle
+++ b/activity/activity-compose/samples/build.gradle
@@ -32,11 +32,18 @@
dependencies {
implementation(libs.kotlinStdlib)
+ implementation(libs.kotlinCoroutinesCore)
compileOnly project(":annotation:annotation-sampled")
+ api("androidx.compose.foundation:foundation-layout:1.0.1")
+ api("androidx.compose.runtime:runtime:1.0.1")
implementation "androidx.compose.foundation:foundation:1.0.1"
implementation projectOrArtifact(":activity:activity-compose")
- implementation projectOrArtifact(":activity:activity-ktx")
+ implementation projectOrArtifact(":activity:activity")
+ implementation("androidx.compose.ui:ui-graphics:1.0.1")
+ implementation("androidx.compose.ui:ui-text:1.0.1")
+ implementation("androidx.compose.ui:ui:1.0.1")
+ implementation("androidx.core:core-ktx:1.13.0")
implementation "androidx.compose.material:material:1.0.1"
// old version of common-java8 conflicts with newer version, because both have
// DefaultLifecycleEventObserver.
diff --git a/activity/activity-ktx/build.gradle b/activity/activity-ktx/build.gradle
index 3d1ee71..a9cda3f 100644
--- a/activity/activity-ktx/build.gradle
+++ b/activity/activity-ktx/build.gradle
@@ -31,11 +31,7 @@
}
dependencies {
-
api(project(":activity:activity"))
- api("androidx.core:core-ktx:1.13.0") {
- because "Mirror activity dependency graph for -ktx artifacts"
- }
api("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1") {
because 'Mirror activity dependency graph for -ktx artifacts'
}
@@ -43,18 +39,6 @@
api("androidx.savedstate:savedstate-ktx:1.2.1") {
because 'Mirror activity dependency graph for -ktx artifacts'
}
- api(libs.kotlinStdlib)
-
- androidTestImplementation(projectOrArtifact(":lifecycle:lifecycle-runtime-testing"))
- androidTestImplementation(libs.junit)
- androidTestImplementation(libs.truth)
- androidTestImplementation(libs.testExtJunit)
- androidTestImplementation(libs.testCore)
- androidTestImplementation(libs.testRunner)
- androidTestImplementation(libs.testRules)
- androidTestImplementation(project(":internal-testutils-runtime"), {
- exclude group: "androidx.activity", module: "activity"
- })
}
androidx {
diff --git a/activity/activity-lint/build.gradle b/activity/activity-lint/build.gradle
index 7dabcfd..955e21f 100644
--- a/activity/activity-lint/build.gradle
+++ b/activity/activity-lint/build.gradle
@@ -32,11 +32,13 @@
compileOnly("com.android.tools.build:builder-model:8.1.0")
compileOnly(libs.androidLintMinApi)
compileOnly(libs.kotlinStdlib)
+ compileOnly(libs.intellijCore)
+ compileOnly(libs.uast)
testImplementation(libs.kotlinStdlib)
- testImplementation(libs.kotlinReflect)
+ testRuntimeOnly(libs.kotlinReflect)
testImplementation(libs.kotlinStdlibJdk8)
- testImplementation(libs.androidLint)
+ testImplementation(libs.androidLintApi)
testImplementation(libs.androidLintTests)
testImplementation(libs.junit)
testImplementation(libs.truth)
diff --git a/activity/activity/build.gradle b/activity/activity/build.gradle
index c11bee0..4652650 100644
--- a/activity/activity/build.gradle
+++ b/activity/activity/build.gradle
@@ -22,24 +22,26 @@
dependencies {
api("androidx.annotation:annotation:1.1.0")
- implementation("androidx.collection:collection:1.0.0")
- api("androidx.core:core:1.13.0")
+ api("androidx.core:core-ktx:1.13.0")
+ api("androidx.lifecycle:lifecycle-common:2.6.1")
api("androidx.lifecycle:lifecycle-runtime:2.6.1")
api("androidx.lifecycle:lifecycle-viewmodel:2.6.1")
api("androidx.savedstate:savedstate:1.2.1")
api("androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.1")
implementation("androidx.profileinstaller:profileinstaller:1.3.1")
implementation("androidx.tracing:tracing:1.0.0")
+ implementation(libs.kotlinCoroutinesCore)
api(libs.kotlinStdlib)
androidTestImplementation("androidx.lifecycle:lifecycle-runtime-testing:2.6.1")
- androidTestImplementation("androidx.lifecycle:lifecycle-viewmodel:2.6.1")
androidTestImplementation(libs.kotlinStdlib)
androidTestImplementation(libs.espressoCore, excludes.espresso)
- androidTestImplementation(libs.leakcanary)
+ androidTestImplementation(libs.hamcrestCore)
+ androidTestImplementation(libs.junit)
androidTestImplementation(libs.leakcanaryInstrumentation)
androidTestImplementation(libs.testExtJunit)
androidTestImplementation(libs.testCore)
+ androidTestImplementation(libs.testMonitor)
androidTestImplementation(libs.testRunner)
androidTestImplementation(libs.testRules)
androidTestImplementation(libs.truth)
diff --git a/activity/integration-tests/testapp/build.gradle b/activity/integration-tests/testapp/build.gradle
index 7fbf614..0d184bc 100644
--- a/activity/integration-tests/testapp/build.gradle
+++ b/activity/integration-tests/testapp/build.gradle
@@ -30,21 +30,20 @@
}
dependencies {
- implementation(project(":activity:activity-ktx"))
+ implementation(libs.kotlinCoroutinesCore)
+ implementation(project(":activity:activity"))
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1")
implementation("androidx.appcompat:appcompat:1.6.0")
implementation("androidx.core:core-splashscreen:1.0.0")
+ implementation("androidx.core:core-ktx:1.13.0")
+ implementation("androidx.fragment:fragment:1.3.6")
+ implementation("androidx.lifecycle:lifecycle-common:2.6.1")
+ implementation("androidx.lifecycle:lifecycle-viewmodel:2.6.1")
// Manually align dependencies across debugRuntime and debugAndroidTestRuntime.
androidTestImplementation("androidx.annotation:annotation:1.6.0")
- androidTestImplementation("androidx.annotation:annotation-experimental:1.4.0")
androidTestImplementation(libs.kotlinStdlib)
- androidTestImplementation(libs.testExtJunit)
- androidTestImplementation(libs.testCore)
- androidTestImplementation(libs.testRunner)
- androidTestImplementation(libs.testRules)
- androidTestImplementation(libs.espressoCore)
- androidTestImplementation(libs.mockitoCore, excludes.bytebuddy) // DexMaker has it's own MockMaker
- androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy) // DexMaker has it's own MockMaker
+ androidTestRuntimeOnly(libs.testCore)
+ androidTestRuntimeOnly(libs.testRunner)
}
diff --git a/settings.gradle b/settings.gradle
index d74886f..5b325be 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -333,7 +333,6 @@
includeProject(":activity:activity", [BuildType.MAIN, BuildType.FLAN, BuildType.COMPOSE])
includeProject(":activity:activity-compose", [BuildType.COMPOSE])
includeProject(":activity:activity-compose:activity-compose-samples", "activity/activity-compose/samples", [BuildType.COMPOSE])
-includeProject(":activity:activity-compose:integration-tests:activity-demos", [BuildType.COMPOSE])
includeProject(":activity:activity-compose-lint", [BuildType.COMPOSE])
includeProject(":activity:activity-ktx", [BuildType.MAIN, BuildType.FLAN, BuildType.COMPOSE])
includeProject(":activity:activity-lint", [BuildType.MAIN, BuildType.FLAN, BuildType.COMPOSE])