Merge "Simplify code by using existing collectIsFocusedAsState extension function." into androidx-main
diff --git a/activity/integration-tests/testapp/build.gradle b/activity/integration-tests/testapp/build.gradle
index fdb5dec..11e5101 100644
--- a/activity/integration-tests/testapp/build.gradle
+++ b/activity/integration-tests/testapp/build.gradle
@@ -39,6 +39,6 @@
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
androidTestImplementation(ESPRESSO_CORE)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it's own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it's own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it's own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it's own MockMaker
}
diff --git a/ads/ads-identifier-benchmark/build.gradle b/ads/ads-identifier-benchmark/build.gradle
index cc75f5d..95e55d2 100644
--- a/ads/ads-identifier-benchmark/build.gradle
+++ b/ads/ads-identifier-benchmark/build.gradle
@@ -35,5 +35,5 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy)
}
diff --git a/ads/ads-identifier-provider/build.gradle b/ads/ads-identifier-provider/build.gradle
index d412cd9..f1039b5 100644
--- a/ads/ads-identifier-provider/build.gradle
+++ b/ads/ads-identifier-provider/build.gradle
@@ -39,7 +39,7 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy)
}
androidx {
diff --git a/ads/ads-identifier-testing/build.gradle b/ads/ads-identifier-testing/build.gradle
index 07d65f8..d8265c7 100644
--- a/ads/ads-identifier-testing/build.gradle
+++ b/ads/ads-identifier-testing/build.gradle
@@ -24,7 +24,7 @@
dependencies {
implementation(project(":ads-identifier-common"))
api("androidx.annotation:annotation:1.1.0")
- api(MOCKITO_CORE, libs.exclude_bytebuddy)
+ api(MOCKITO_CORE, excludes.bytebuddy)
}
android {
diff --git a/ads/ads-identifier/build.gradle b/ads/ads-identifier/build.gradle
index 6841cce..e3730f5 100644
--- a/ads/ads-identifier/build.gradle
+++ b/ads/ads-identifier/build.gradle
@@ -41,7 +41,7 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy)
}
android {
diff --git a/appcompat/appcompat-resources/build.gradle b/appcompat/appcompat-resources/build.gradle
index 33879d3..6390db6 100644
--- a/appcompat/appcompat-resources/build.gradle
+++ b/appcompat/appcompat-resources/build.gradle
@@ -36,9 +36,9 @@
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
androidTestImplementation(TRUTH)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(project(":internal-testutils-runtime"), {
exclude group: "androidx.appcompat", module: "appcompat-resources"
})
diff --git a/appcompat/appcompat/build.gradle b/appcompat/appcompat/build.gradle
index 99a5f06..29f8bf2 100644
--- a/appcompat/appcompat/build.gradle
+++ b/appcompat/appcompat/build.gradle
@@ -29,9 +29,9 @@
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
androidTestImplementation(TRUTH)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it's own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it's own MockMaker
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it's own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it's own MockMaker
androidTestImplementation(project(":internal-testutils-appcompat"), {
exclude group: "androidx.appcompat", module: "appcompat"
exclude group: "androidx.core", module: "core"
diff --git a/arch/core/core-testing/build.gradle b/arch/core/core-testing/build.gradle
index f94fa7a..bd80e98 100644
--- a/arch/core/core-testing/build.gradle
+++ b/arch/core/core-testing/build.gradle
@@ -29,7 +29,7 @@
api(project(":arch:core:core-runtime"))
api("androidx.annotation:annotation:1.1.0")
api(JUNIT)
- api(MOCKITO_CORE, libs.exclude_bytebuddy)
+ api(MOCKITO_CORE, excludes.bytebuddy)
testImplementation(JUNIT)
diff --git a/benchmark/macro-junit4/build.gradle b/benchmark/macro-junit4/build.gradle
index 4ee565e..d159e9f 100644
--- a/benchmark/macro-junit4/build.gradle
+++ b/benchmark/macro-junit4/build.gradle
@@ -50,9 +50,9 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ESPRESSO_CORE)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy)
// DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy)
// DexMaker has it"s own MockMaker
}
diff --git a/biometric/biometric/build.gradle b/biometric/biometric/build.gradle
index 0933892..6f12943 100644
--- a/biometric/biometric/build.gradle
+++ b/biometric/biometric/build.gradle
@@ -46,8 +46,8 @@
androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
androidTestImplementation(ANDROIDX_TEST_RULES)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy)
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy)
androidTestImplementation(TRUTH)
}
diff --git a/browser/browser/build.gradle b/browser/browser/build.gradle
index 5359fed..c98ffa8 100644
--- a/browser/browser/build.gradle
+++ b/browser/browser/build.gradle
@@ -40,9 +40,9 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(project(":internal-testutils-runtime"))
}
diff --git a/buildSrc/dependencies.gradle b/buildSrc/dependencies.gradle
index 0eb002e..23c0358 100644
--- a/buildSrc/dependencies.gradle
+++ b/buildSrc/dependencies.gradle
@@ -14,13 +14,13 @@
* limitations under the License.
*/
// Add ext.libs for library versions
-def libs = [:]
+def excludes = [:]
-libs.exclude_bytebuddy = {
+excludes.bytebuddy = {
exclude group: "net.bytebuddy"
}
-libs.exclude_for_espresso = {
+excludes.espresso = {
exclude group: "androidx.annotation"
exclude group: "androidx.appcompat"
exclude group: "androidx.recyclerview"
@@ -31,4 +31,4 @@
exclude group: "androidx.core"
}
-rootProject.ext["libs"] = libs
+rootProject.ext["excludes"] = excludes
diff --git a/camera/camera-camera2/build.gradle b/camera/camera-camera2/build.gradle
index 113c7b3..78ccd42 100644
--- a/camera/camera-camera2/build.gradle
+++ b/camera/camera-camera2/build.gradle
@@ -55,8 +55,8 @@
androidTestImplementation(TRUTH)
androidTestImplementation(ANDROIDX_TEST_UIAUTOMATOR)
androidTestImplementation(ESPRESSO_CORE)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it's own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it's own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it's own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it's own MockMaker
androidTestImplementation("androidx.appcompat:appcompat:1.1.0")
androidTestImplementation(project(":camera:camera-testing"))
androidTestImplementation(KOTLIN_STDLIB)
diff --git a/camera/camera-core/build.gradle b/camera/camera-core/build.gradle
index 1ee46cb..2b4bf00 100644
--- a/camera/camera-core/build.gradle
+++ b/camera/camera-core/build.gradle
@@ -57,8 +57,8 @@
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
androidTestImplementation(TRUTH)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it's own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it's own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it's own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it's own MockMaker
androidTestImplementation(project(":camera:camera-testing"))
androidTestImplementation(KOTLIN_STDLIB)
androidTestImplementation(KOTLIN_COROUTINES_ANDROID)
diff --git a/camera/camera-extensions/build.gradle b/camera/camera-extensions/build.gradle
index 1d55af9..64d147b 100644
--- a/camera/camera-extensions/build.gradle
+++ b/camera/camera-extensions/build.gradle
@@ -49,9 +49,9 @@
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has its own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has its own MockMaker
androidTestImplementation(KOTLIN_STDLIB)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has its own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has its own MockMaker
androidTestImplementation(TRUTH)
androidTestImplementation(project(":camera:camera-testing"))
androidTestImplementation(project(":internal-testutils-truth"))
diff --git a/camera/camera-video/build.gradle b/camera/camera-video/build.gradle
index d2d4178..4527837 100644
--- a/camera/camera-video/build.gradle
+++ b/camera/camera-video/build.gradle
@@ -53,8 +53,8 @@
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
androidTestImplementation(TRUTH)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it's own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it's own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it's own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it's own MockMaker
androidTestImplementation(project(":camera:camera-testing"))
androidTestImplementation(KOTLIN_STDLIB)
androidTestImplementation(KOTLIN_COROUTINES_ANDROID)
diff --git a/camera/camera-view/build.gradle b/camera/camera-view/build.gradle
index aef81d0..06c00c8 100644
--- a/camera/camera-view/build.gradle
+++ b/camera/camera-view/build.gradle
@@ -73,8 +73,8 @@
androidTestImplementation(KOTLIN_STDLIB)
androidTestImplementation(TRUTH)
androidTestImplementation("androidx.camera:camera-camera2:${VIEW_ATOMIC_GROUP_PINNED_VER}")
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it's own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it's own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it's own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it's own MockMaker
}
android {
defaultConfig {
diff --git a/cleanBuild.sh b/cleanBuild.sh
index 3ee4ae6..c6ed4dd 100755
--- a/cleanBuild.sh
+++ b/cleanBuild.sh
@@ -1,19 +1,6 @@
#!/bin/bash
set -e
-echo "IF THIS SCRIPT FIXES YOUR BUILD; OPEN A BUG."
-echo "In nearly all cases, it should not be necessary to run a clean build."
-echo
-echo "You may be more interested in running:"
-echo
-echo " ./development/diagnose-build-failure/diagnose-build-failure.sh $*"
-echo
-echo "which attempts to diagnose more details about build failures"
-# one case where it is convenient to have a clean build is for double-checking that a build failure isn't due to an incremental build failure
-# another case where it is convenient to have a clean build is for performance testing
-# another case where it is convenient to have a clean build is when you're modifying the build and may have introduced some errors but haven't shared your changes yet (at which point you should have fixed the errors)
-echo
-
DO_PROMPT=true
if [ "$1" == "-y" ]; then
DO_PROMPT=false
@@ -52,7 +39,7 @@
# Confirm whether the user wants to run this script instead of diagnose-build-failure.sh
# Recall that we already mentioned the existence of diagnose-build-failure.sh above
echo
- echo "Press <Enter> to run a clean build or Ctrl-C to cancel"
+ echo "Press <Enter> to run a clean build (./gradlew --clean $goals) or Ctrl-C to cancel"
if [ "$DO_PROMPT" == "true" ]; then
read response
fi
@@ -62,25 +49,5 @@
scriptDir="$(cd $(dirname $0) && pwd)"
checkoutDir="$(cd $scriptDir/../.. && pwd)"
export OUT_DIR="$checkoutDir/out"
-function removeCaches() {
- echo removing caches
- rm -rf .gradle
- rm -rf buildSrc/.gradle
- rm -f local.properties
- # We move the Gradle cache (via the OUT_DIR) variable during this build to prevent
- # Other Gradle builds in other directories from sharing it, to be extra-sure that the
- # build will be clean. However, if the user subsequently runs `./gradlew`, it will use
- # ~/.gradle as the Gradle cache dir, which could surprise users because it might hold
- # different state. So, we preemptively remove ~/.gradle too, just in case the user
- # is going to want that for their following build
- rm -rf ~/.gradle
- # AGP should (also) do this automatically (b/170640263)
- rm -rf appsearch/appsearch/.cxx
- rm -rf appsearch/local-backend/.cxx
- rm -rf appsearch/local-storage/.cxx
- rm -rf $OUT_DIR
-}
-removeCaches
-echo running build
-./gradlew --no-daemon $goals
+./gradlew --clean $goals
diff --git a/compose/foundation/foundation/build.gradle b/compose/foundation/foundation/build.gradle
index 80a5550..7d4b5d7 100644
--- a/compose/foundation/foundation/build.gradle
+++ b/compose/foundation/foundation/build.gradle
@@ -70,9 +70,9 @@
androidTestImplementation(ESPRESSO_CORE)
androidTestImplementation(JUNIT)
androidTestImplementation(TRUTH)
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own
// MockMaker
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(MOCKITO_KOTLIN, {
exclude group: "org.mockito" // to keep control on the mockito version
})
@@ -136,9 +136,9 @@
implementation(ESPRESSO_CORE)
implementation(JUNIT)
implementation(TRUTH)
- implementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own
+ implementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own
// MockMaker
- implementation(MOCKITO_CORE, libs.exclude_bytebuddy)
+ implementation(MOCKITO_CORE, excludes.bytebuddy)
// DexMaker has it"s own MockMaker
implementation(MOCKITO_KOTLIN, {
exclude group: "org.mockito" // to keep control on the mockito version
diff --git a/compose/material/material/build.gradle b/compose/material/material/build.gradle
index dbc14ae..b7f40da 100644
--- a/compose/material/material/build.gradle
+++ b/compose/material/material/build.gradle
@@ -61,8 +61,8 @@
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(JUNIT)
androidTestImplementation(TRUTH)
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(MOCKITO_KOTLIN, {
exclude group: "org.mockito" // to keep control on the mockito version
})
@@ -120,8 +120,8 @@
implementation(ANDROIDX_TEST_RUNNER)
implementation(JUNIT)
implementation(TRUTH)
- implementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- implementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ implementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ implementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
implementation(MOCKITO_KOTLIN, {
exclude group: "org.mockito" // to keep control on the mockito version
})
diff --git a/compose/runtime/runtime-saveable/build.gradle b/compose/runtime/runtime-saveable/build.gradle
index eaf9e66..2c030ea 100644
--- a/compose/runtime/runtime-saveable/build.gradle
+++ b/compose/runtime/runtime-saveable/build.gradle
@@ -57,9 +57,9 @@
androidTestImplementation(ESPRESSO_CORE)
androidTestImplementation(JUNIT)
androidTestImplementation(TRUTH)
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy)
// DexMaker has it"s own MockMaker
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy)
// DexMaker has it"s own MockMaker
lintPublish(project(":compose:runtime:runtime-saveable-lint"))
@@ -105,9 +105,9 @@
implementation(ESPRESSO_CORE)
implementation(JUNIT)
implementation(TRUTH)
- implementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
+ implementation(DEXMAKER_MOCKITO, excludes.bytebuddy)
// DexMaker has it"s own MockMaker
- implementation(MOCKITO_CORE, libs.exclude_bytebuddy)
+ implementation(MOCKITO_CORE, excludes.bytebuddy)
// DexMaker has it"s own MockMaker
}
}
diff --git a/compose/ui/ui-test-junit4/build.gradle b/compose/ui/ui-test-junit4/build.gradle
index 1130408..1923226 100644
--- a/compose/ui/ui-test-junit4/build.gradle
+++ b/compose/ui/ui-test-junit4/build.gradle
@@ -57,8 +57,8 @@
androidTestImplementation(ANDROIDX_TEST_RULES)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(TRUTH)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(MOCKITO_KOTLIN, {
exclude group: "org.mockito" // to keep control on the mockito version
})
@@ -108,8 +108,8 @@
implementation(ANDROIDX_TEST_RULES)
implementation(ANDROIDX_TEST_RUNNER)
implementation(TRUTH)
- implementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- implementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ implementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ implementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
implementation(MOCKITO_KOTLIN, {
exclude group: "org.mockito" // to keep control on the mockito version
})
diff --git a/compose/ui/ui-test/build.gradle b/compose/ui/ui-test/build.gradle
index 4f251e1..19de9f8 100644
--- a/compose/ui/ui-test/build.gradle
+++ b/compose/ui/ui-test/build.gradle
@@ -52,8 +52,8 @@
androidTestImplementation(project(":compose:test-utils"))
androidTestImplementation(project(":compose:ui:ui-test-junit4"))
androidTestImplementation(TRUTH)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(MOCKITO_KOTLIN, {
exclude group: "org.mockito" // to keep control on the mockito version
})
@@ -96,8 +96,8 @@
implementation(project(":compose:ui:ui-test-junit4"))
implementation(project(":activity:activity-compose"))
implementation(TRUTH)
- implementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- implementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ implementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ implementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
implementation(MOCKITO_KOTLIN, {
exclude group: "org.mockito" // to keep control on the mockito version
})
diff --git a/compose/ui/ui-text/build.gradle b/compose/ui/ui-text/build.gradle
index 07f2cfb..f3bb4c5 100644
--- a/compose/ui/ui-text/build.gradle
+++ b/compose/ui/ui-text/build.gradle
@@ -66,9 +66,9 @@
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ESPRESSO_CORE)
androidTestImplementation(JUNIT)
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy)
// DexMaker has it"s own MockMaker
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy)
androidTestImplementation(TRUTH)
androidTestImplementation(MOCKITO_KOTLIN, {
exclude group: "org.mockito" // to keep control on the mockito version
@@ -139,9 +139,9 @@
implementation(ANDROIDX_TEST_RUNNER)
implementation(ESPRESSO_CORE)
implementation(JUNIT)
- implementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
+ implementation(DEXMAKER_MOCKITO, excludes.bytebuddy)
// DexMaker has it"s own MockMaker
- implementation(MOCKITO_CORE, libs.exclude_bytebuddy)
+ implementation(MOCKITO_CORE, excludes.bytebuddy)
implementation(TRUTH)
implementation(MOCKITO_KOTLIN, {
exclude group: "org.mockito" // to keep control on the mockito version
diff --git a/compose/ui/ui/build.gradle b/compose/ui/ui/build.gradle
index 1517399..80bb64e 100644
--- a/compose/ui/ui/build.gradle
+++ b/compose/ui/ui/build.gradle
@@ -86,9 +86,9 @@
androidTestImplementation(KOTLIN_COROUTINES_TEST)
androidTestImplementation(ESPRESSO_CORE)
androidTestImplementation(JUNIT)
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy)
// DexMaker has it"s own MockMaker
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy)
// DexMaker has it"s own MockMaker
androidTestImplementation(TRUTH)
androidTestImplementation(MOCKITO_KOTLIN, {
@@ -190,9 +190,9 @@
implementation(KOTLIN_COROUTINES_TEST)
implementation(ESPRESSO_CORE)
implementation(JUNIT)
- implementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
+ implementation(DEXMAKER_MOCKITO, excludes.bytebuddy)
// DexMaker has it"s own MockMaker
- implementation(MOCKITO_CORE, libs.exclude_bytebuddy)
+ implementation(MOCKITO_CORE, excludes.bytebuddy)
// DexMaker has it"s own MockMaker
implementation(TRUTH)
implementation(MOCKITO_KOTLIN, {
diff --git a/compose/ui/ui/src/desktopMain/kotlin/androidx/compose/desktop/AppWindow.desktop.kt b/compose/ui/ui/src/desktopMain/kotlin/androidx/compose/desktop/AppWindow.desktop.kt
index 874e013..071661a 100644
--- a/compose/ui/ui/src/desktopMain/kotlin/androidx/compose/desktop/AppWindow.desktop.kt
+++ b/compose/ui/ui/src/desktopMain/kotlin/androidx/compose/desktop/AppWindow.desktop.kt
@@ -111,7 +111,7 @@
"AppWindow should be created inside AWT Event Thread (use SwingUtilities.invokeLater " +
"or just dsl for creating window: Window { })"
}
- window = ComposeWindow(parent = this)
+ window = ComposeWindow()
window.apply {
defaultCloseOperation = WindowConstants.DISPOSE_ON_CLOSE
addWindowListener(object : WindowAdapter() {
@@ -122,7 +122,7 @@
onDispose?.invoke()
onDismiss?.invoke()
events.invokeOnClose()
- AppManager.removeWindow(parent)
+ AppManager.removeWindow(this@AppWindow)
}
}
}
@@ -137,7 +137,7 @@
override fun windowGainedFocus(event: WindowEvent) {
// Dialogs should not receive a common application menu bar
if (invoker == null) {
- window.setJMenuBar(parent.menuBar?.menuBar)
+ window.setJMenuBar([email protected]?.menuBar)
}
events.invokeOnFocusGet()
}
@@ -417,7 +417,6 @@
window.setContent(parentComposition) {
CompositionLocalProvider(
LocalAppWindow provides this,
- LocalLayerContainer provides window,
content = content
)
}
diff --git a/compose/ui/ui/src/desktopMain/kotlin/androidx/compose/desktop/ComposeWindow.desktop.kt b/compose/ui/ui/src/desktopMain/kotlin/androidx/compose/desktop/ComposeWindow.desktop.kt
index 90c25cf..273b3b0 100644
--- a/compose/ui/ui/src/desktopMain/kotlin/androidx/compose/desktop/ComposeWindow.desktop.kt
+++ b/compose/ui/ui/src/desktopMain/kotlin/androidx/compose/desktop/ComposeWindow.desktop.kt
@@ -17,6 +17,7 @@
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionContext
+import androidx.compose.runtime.CompositionLocalProvider
import org.jetbrains.skiko.ClipComponent
import org.jetbrains.skiko.GraphicsApi
import java.awt.Component
@@ -26,9 +27,8 @@
/**
* ComposeWindow is a window for building UI using Compose for Desktop.
* ComposeWindow inherits javax.swing.JFrame.
- * @param parent The parent AppFrame that wraps the ComposeWindow.
*/
-class ComposeWindow(val parent: AppFrame) : JFrame() {
+class ComposeWindow : JFrame() {
private var isDisposed = false
internal val layer = ComposeLayer()
private val pane = object : JLayeredPane() {
@@ -73,8 +73,13 @@
) {
layer.setContent(
parentComposition = parentComposition,
- content = content
- )
+ ) {
+ CompositionLocalProvider(
+ LocalLayerContainer provides this
+ ) {
+ content()
+ }
+ }
}
override fun dispose() {
diff --git a/contentpager/contentpager/build.gradle b/contentpager/contentpager/build.gradle
index 33bc9f0..17c5064 100644
--- a/contentpager/contentpager/build.gradle
+++ b/contentpager/contentpager/build.gradle
@@ -34,7 +34,7 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
}
androidx {
diff --git a/coordinatorlayout/coordinatorlayout/build.gradle b/coordinatorlayout/coordinatorlayout/build.gradle
index 98639d0..a6a6937 100644
--- a/coordinatorlayout/coordinatorlayout/build.gradle
+++ b/coordinatorlayout/coordinatorlayout/build.gradle
@@ -18,10 +18,10 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(ESPRESSO_CONTRIB, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy)
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(ESPRESSO_CONTRIB, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy)
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(project(":internal-testutils-runtime"), {
exclude group: "androidx.coordinatorlayout", module: "coordinatorlayout"
})
diff --git a/core/core-animation-integration-tests/testapp/build.gradle b/core/core-animation-integration-tests/testapp/build.gradle
index 5e2863f..f1a3103 100644
--- a/core/core-animation-integration-tests/testapp/build.gradle
+++ b/core/core-animation-integration-tests/testapp/build.gradle
@@ -27,7 +27,7 @@
implementation(project(":core:core-animation"))
implementation(project(":core:core-animation-testing"))
- implementation(ANDROIDX_TEST_EXT_JUNIT, libs.exclude_for_espresso)
- implementation(ANDROIDX_TEST_CORE, libs.exclude_for_espresso)
- implementation(ANDROIDX_TEST_RULES, libs.exclude_for_espresso)
+ implementation(ANDROIDX_TEST_EXT_JUNIT, excludes.espresso)
+ implementation(ANDROIDX_TEST_CORE, excludes.espresso)
+ implementation(ANDROIDX_TEST_RULES, excludes.espresso)
}
diff --git a/core/core-animation/build.gradle b/core/core-animation/build.gradle
index 2b4bbef..d7061d3 100644
--- a/core/core-animation/build.gradle
+++ b/core/core-animation/build.gradle
@@ -29,8 +29,8 @@
implementation("androidx.core:core:1.3.1")
implementation("androidx.collection:collection:1.1.0")
- androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT, libs.exclude_for_espresso)
- androidTestImplementation(ANDROIDX_TEST_RULES, libs.exclude_for_espresso)
+ androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT, excludes.espresso)
+ androidTestImplementation(ANDROIDX_TEST_RULES, excludes.espresso)
}
androidx {
diff --git a/core/core-google-shortcuts/build.gradle b/core/core-google-shortcuts/build.gradle
index 56bca79..2484a3a 100644
--- a/core/core-google-shortcuts/build.gradle
+++ b/core/core-google-shortcuts/build.gradle
@@ -47,8 +47,8 @@
androidTestImplementation(ANDROIDX_TEST_RULES)
androidTestImplementation(ESPRESSO_CORE)
androidTestImplementation(ESPRESSO_INTENTS)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy)
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy)
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy)
androidTestImplementation(TRUTH)
}
diff --git a/core/core/build.gradle b/core/core/build.gradle
index 80c146b..4b127c1 100644
--- a/core/core/build.gradle
+++ b/core/core/build.gradle
@@ -24,15 +24,15 @@
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
androidTestImplementation(TRUTH)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(MULTIDEX)
// Including both dexmakers allows support for all API levels plus final mocking support on
// API 28+. The implementation is swapped based on the finality of the mock type. This
// delegation is handled manually inside androidx.core.util.mockito.CustomMockMaker.
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO_INLINE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO_INLINE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation("androidx.appcompat:appcompat:1.1.0") {
exclude group: "androidx.core", module: "core"
}
diff --git a/core/core/lint-baseline.xml b/core/core/lint-baseline.xml
index e683e40..978eb9b 100644
--- a/core/core/lint-baseline.xml
+++ b/core/core/lint-baseline.xml
@@ -30,7 +30,7 @@
errorLine2=" ^">
<location
file="src/main/java/androidx/core/content/ContextCompat.java"
- line="605"
+ line="602"
column="5"/>
</issue>
@@ -228,7 +228,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/content/res/ResourcesCompat.java"
- line="553"
+ line="679"
column="29"/>
</issue>
@@ -239,7 +239,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/widget/TextViewCompat.java"
- line="605"
+ line="625"
column="25"/>
</issue>
@@ -2962,193 +2962,6 @@
<issue
id="ClassVerificationFailure"
- message="This call references a method added in API level 16; however, the containing class androidx.core.content.ContextCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" context.startActivities(intents, options);"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"
- line="240"
- column="21"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 16; however, the containing class androidx.core.content.ContextCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" context.startActivity(intent, options);"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"
- line="267"
- column="21"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 24; however, the containing class androidx.core.content.ContextCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return context.getDataDir();"
- errorLine2=" ~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"
- line="291"
- column="28"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.content.ContextCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return context.getObbDirs();"
- errorLine2=" ~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"
- line="344"
- column="28"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.content.ContextCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return context.getExternalFilesDirs(type);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"
- line="397"
- column="28"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 19; however, the containing class androidx.core.content.ContextCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return context.getExternalCacheDirs();"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"
- line="450"
- column="28"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 21; however, the containing class androidx.core.content.ContextCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return context.getDrawable(id);"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"
- line="471"
- column="28"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 23; however, the containing class androidx.core.content.ContextCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return context.getColorStateList(id);"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"
- line="510"
- column="28"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 23; however, the containing class androidx.core.content.ContextCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return context.getColor(id);"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"
- line="533"
- column="28"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 21; however, the containing class androidx.core.content.ContextCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return context.getNoBackupFilesDir();"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"
- line="574"
- column="28"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 21; however, the containing class androidx.core.content.ContextCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return context.getCodeCacheDir();"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"
- line="598"
- column="28"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 24; however, the containing class androidx.core.content.ContextCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return context.createDeviceProtectedStorageContext();"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"
- line="653"
- column="28"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 24; however, the containing class androidx.core.content.ContextCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return context.isDeviceProtectedStorage();"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"
- line="667"
- column="28"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 28; however, the containing class androidx.core.content.ContextCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return context.getMainExecutor();"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"
- line="680"
- column="28"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 26; however, the containing class androidx.core.content.ContextCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" context.startForegroundService(intent);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"
- line="697"
- column="21"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 23; however, the containing class androidx.core.content.ContextCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return context.getSystemService(serviceClass);"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"
- line="717"
- column="28"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
- message="This call references a method added in API level 23; however, the containing class androidx.core.content.ContextCompat is reachable from earlier API levels and will fail run-time class verification."
- errorLine1=" return context.getSystemServiceName(serviceClass);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/ContextCompat.java"
- line="737"
- column="28"/>
- </issue>
-
- <issue
- id="ClassVerificationFailure"
message="This call references a method added in API level 28; however, the containing class androidx.core.database.CursorWindowCompat is reachable from earlier API levels and will fail run-time class verification."
errorLine1=" return new CursorWindow(name, windowSizeBytes);"
errorLine2=" ~~~~~~~~~~~~~~~~">
@@ -8467,7 +8280,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/content/res/ResourcesCompat.java"
- line="95"
+ line="104"
column="24"/>
</issue>
@@ -8478,7 +8291,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/content/res/ResourcesCompat.java"
- line="128"
+ line="137"
column="24"/>
</issue>
@@ -8489,7 +8302,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/content/res/ResourcesCompat.java"
- line="130"
+ line="139"
column="24"/>
</issue>
@@ -8500,7 +8313,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/core/content/res/ResourcesCompat.java"
- line="158"
+ line="167"
column="24"/>
</issue>
@@ -8511,7 +8324,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/content/res/ResourcesCompat.java"
- line="188"
+ line="195"
column="24"/>
</issue>
@@ -9908,7 +9721,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/widget/TextViewCompat.java"
- line="695"
+ line="715"
column="22"/>
</issue>
@@ -9919,7 +9732,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/widget/TextViewCompat.java"
- line="704"
+ line="724"
column="29"/>
</issue>
@@ -9930,7 +9743,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/widget/TextViewCompat.java"
- line="745"
+ line="765"
column="29"/>
</issue>
@@ -9941,7 +9754,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/widget/TextViewCompat.java"
- line="816"
+ line="836"
column="62"/>
</issue>
@@ -9952,7 +9765,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/widget/TextViewCompat.java"
- line="821"
+ line="841"
column="51"/>
</issue>
@@ -9963,7 +9776,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/widget/TextViewCompat.java"
- line="822"
+ line="842"
column="58"/>
</issue>
@@ -9974,7 +9787,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/widget/TextViewCompat.java"
- line="843"
+ line="863"
column="22"/>
</issue>
@@ -9985,7 +9798,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/widget/TextViewCompat.java"
- line="866"
+ line="886"
column="22"/>
</issue>
@@ -9996,7 +9809,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/widget/TextViewCompat.java"
- line="867"
+ line="887"
column="22"/>
</issue>
@@ -10007,7 +9820,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/widget/TextViewCompat.java"
- line="919"
+ line="939"
column="67"/>
</issue>
@@ -10018,7 +9831,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/widget/TextViewCompat.java"
- line="919"
+ line="939"
column="46"/>
</issue>
@@ -10029,7 +9842,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/widget/TextViewCompat.java"
- line="920"
+ line="940"
column="45"/>
</issue>
@@ -10040,7 +9853,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/widget/TextViewCompat.java"
- line="935"
+ line="955"
column="48"/>
</issue>
@@ -10051,7 +9864,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/widget/TextViewCompat.java"
- line="938"
+ line="958"
column="26"/>
</issue>
@@ -10062,7 +9875,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/widget/TextViewCompat.java"
- line="995"
+ line="1015"
column="22"/>
</issue>
@@ -10073,7 +9886,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/widget/TextViewCompat.java"
- line="1011"
+ line="1031"
column="29"/>
</issue>
@@ -10084,7 +9897,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/widget/TextViewCompat.java"
- line="1029"
+ line="1049"
column="22"/>
</issue>
@@ -10095,7 +9908,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/widget/TextViewCompat.java"
- line="1046"
+ line="1066"
column="29"/>
</issue>
@@ -11745,7 +11558,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/content/ContextCompat.java"
- line="150"
+ line="156"
column="14"/>
</issue>
@@ -14626,7 +14439,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/content/ContextCompat.java"
- line="596"
+ line="593"
column="19"/>
</issue>
@@ -14637,7 +14450,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/core/content/ContextCompat.java"
- line="678"
+ line="675"
column="19"/>
</issue>
@@ -14648,7 +14461,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/core/content/ContextCompat.java"
- line="678"
+ line="675"
column="44"/>
</issue>
@@ -18135,7 +17948,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/core/content/res/ResourcesCompat.java"
- line="307"
+ line="433"
column="54"/>
</issue>
@@ -18146,7 +17959,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/core/content/res/ResourcesCompat.java"
- line="376"
+ line="502"
column="19"/>
</issue>
@@ -18157,7 +17970,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/core/content/res/ResourcesCompat.java"
- line="376"
+ line="502"
column="79"/>
</issue>
diff --git a/core/core/src/main/java/androidx/core/content/ContextCompat.java b/core/core/src/main/java/androidx/core/content/ContextCompat.java
index d92b30f..882f35b 100644
--- a/core/core/src/main/java/androidx/core/content/ContextCompat.java
+++ b/core/core/src/main/java/androidx/core/content/ContextCompat.java
@@ -84,11 +84,13 @@
import android.appwidget.AppWidgetManager;
import android.bluetooth.BluetoothManager;
import android.content.ClipboardManager;
+import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.RestrictionsManager;
import android.content.pm.ApplicationInfo;
import android.content.pm.LauncherApps;
+import android.content.pm.PackageManager;
import android.content.res.ColorStateList;
import android.graphics.drawable.Drawable;
import android.hardware.ConsumerIrManager;
@@ -115,6 +117,7 @@
import android.os.Handler;
import android.os.PowerManager;
import android.os.Process;
+import android.os.StatFs;
import android.os.UserManager;
import android.os.Vibrator;
import android.os.storage.StorageManager;
@@ -133,9 +136,11 @@
import androidx.annotation.ColorInt;
import androidx.annotation.ColorRes;
+import androidx.annotation.DoNotInline;
import androidx.annotation.DrawableRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
+import androidx.annotation.RequiresApi;
import androidx.core.app.ActivityOptionsCompat;
import androidx.core.content.res.ResourcesCompat;
import androidx.core.os.EnvironmentCompat;
@@ -146,7 +151,7 @@
import java.util.concurrent.Executor;
/**
- * Helper for accessing features in {@link android.content.Context}.
+ * Helper for accessing features in {@link Context}.
*/
public class ContextCompat {
private static final String TAG = "ContextCompat";
@@ -173,7 +178,7 @@
@Nullable
public static String getAttributionTag(@NonNull Context context) {
if (Build.VERSION.SDK_INT >= 30) {
- return context.getAttributionTag();
+ return Api30Impl.getAttributionTag(context);
}
return null;
@@ -232,13 +237,13 @@
* @param intents Array of intents defining the activities that will be started. The element
* length-1 will correspond to the top activity on the resulting task stack.
* @param options Additional options for how the Activity should be started.
- * See {@link android.content.Context#startActivity(Intent, android.os.Bundle)}
+ * See {@link Context#startActivity(Intent, Bundle)}
* @return true if the underlying API was available and the call was successful, false otherwise
*/
public static boolean startActivities(@NonNull Context context, @NonNull Intent[] intents,
@Nullable Bundle options) {
if (Build.VERSION.SDK_INT >= 16) {
- context.startActivities(intents, options);
+ Api16Impl.startActivities(context, intents, options);
} else {
context.startActivities(intents);
}
@@ -255,7 +260,7 @@
* not exist the activity will be launched normally.</p>
*
* @param context Context to launch activity from.
- * @param intent The description of the activity to start.
+ * @param intent The description of the activity to start.
* @param options Additional options for how the Activity should be started.
* May be null if there are no options. See
* {@link ActivityOptionsCompat} for how to build the Bundle
@@ -265,7 +270,7 @@
public static void startActivity(@NonNull Context context, @NonNull Intent intent,
@Nullable Bundle options) {
if (Build.VERSION.SDK_INT >= 16) {
- context.startActivity(intent, options);
+ Api16Impl.startActivity(context, intent, options);
} else {
context.startActivity(intent);
}
@@ -289,7 +294,7 @@
@Nullable
public static File getDataDir(@NonNull Context context) {
if (Build.VERSION.SDK_INT >= 24) {
- return context.getDataDir();
+ return Api24Impl.getDataDir(context);
} else {
final String dataDir = context.getApplicationInfo().dataDir;
return dataDir != null ? new File(dataDir) : null;
@@ -318,9 +323,9 @@
* <p>
* An application may store data on any or all of the returned devices. For
* example, an app may choose to store large files on the device with the
- * most available space, as measured by {@link android.os.StatFs}.
+ * most available space, as measured by {@link StatFs}.
* <p>
- * Starting in {@link android.os.Build.VERSION_CODES#KITKAT}, no permissions
+ * Starting in {@link Build.VERSION_CODES#KITKAT}, no permissions
* are required to write to the returned paths; they're always accessible to
* the calling app. Before then,
* {@link android.Manifest.permission#WRITE_EXTERNAL_STORAGE} is required to
@@ -342,9 +347,9 @@
@NonNull
public static File[] getObbDirs(@NonNull Context context) {
if (Build.VERSION.SDK_INT >= 19) {
- return context.getObbDirs();
+ return Api19Impl.getObbDirs(context);
} else {
- return new File[] { context.getObbDir() };
+ return new File[]{context.getObbDir()};
}
}
@@ -370,9 +375,9 @@
* <p>
* An application may store data on any or all of the returned devices. For
* example, an app may choose to store large files on the device with the
- * most available space, as measured by {@link android.os.StatFs}.
+ * most available space, as measured by {@link StatFs}.
* <p>
- * Starting in {@link android.os.Build.VERSION_CODES#KITKAT}, no permissions
+ * Starting in {@link Build.VERSION_CODES#KITKAT}, no permissions
* are required to write to the returned paths; they're always accessible to
* the calling app. Before then,
* {@link android.Manifest.permission#WRITE_EXTERNAL_STORAGE} is required to
@@ -395,9 +400,9 @@
@NonNull
public static File[] getExternalFilesDirs(@NonNull Context context, @Nullable String type) {
if (Build.VERSION.SDK_INT >= 19) {
- return context.getExternalFilesDirs(type);
+ return Api19Impl.getExternalFilesDirs(context, type);
} else {
- return new File[] { context.getExternalFilesDir(type) };
+ return new File[]{context.getExternalFilesDir(type)};
}
}
@@ -423,9 +428,9 @@
* <p>
* An application may store data on any or all of the returned devices. For
* example, an app may choose to store large files on the device with the
- * most available space, as measured by {@link android.os.StatFs}.
+ * most available space, as measured by {@link StatFs}.
* <p>
- * Starting in {@link android.os.Build.VERSION_CODES#KITKAT}, no permissions
+ * Starting in {@link Build.VERSION_CODES#KITKAT}, no permissions
* are required to write to the returned paths; they're always accessible to
* the calling app. Before then,
* {@link android.Manifest.permission#WRITE_EXTERNAL_STORAGE} is required to
@@ -448,16 +453,16 @@
@NonNull
public static File[] getExternalCacheDirs(@NonNull Context context) {
if (Build.VERSION.SDK_INT >= 19) {
- return context.getExternalCacheDirs();
+ return Api19Impl.getExternalCacheDirs(context);
} else {
- return new File[] { context.getExternalCacheDir() };
+ return new File[]{context.getExternalCacheDir()};
}
}
/**
* Returns a drawable object associated with a particular resource ID.
* <p>
- * Starting in {@link android.os.Build.VERSION_CODES#LOLLIPOP}, the
+ * Starting in {@link Build.VERSION_CODES#LOLLIPOP}, the
* returned drawable will be styled for the specified Context's theme.
*
* @param id The desired resource identifier, as generated by the aapt tool.
@@ -469,7 +474,7 @@
@Nullable
public static Drawable getDrawable(@NonNull Context context, @DrawableRes int id) {
if (Build.VERSION.SDK_INT >= 21) {
- return context.getDrawable(id);
+ return Api21Impl.getDrawable(context, id);
} else if (Build.VERSION.SDK_INT >= 16) {
return context.getResources().getDrawable(id);
} else {
@@ -492,14 +497,14 @@
/**
* Returns a color state list associated with a particular resource ID.
* <p>
- * Starting in {@link android.os.Build.VERSION_CODES#M}, the returned
+ * Starting in {@link Build.VERSION_CODES#M}, the returned
* color state list will be styled for the specified Context's theme.
*
* @param id The desired resource identifier, as generated by the aapt
* tool. This integer encodes the package, type, and resource
* entry. The value 0 is an invalid identifier.
* @return A color state list, or {@code null} if the resource could not be
- * resolved.
+ * resolved.
* @throws android.content.res.Resources.NotFoundException if the given ID
* does not exist.
*/
@@ -511,7 +516,7 @@
/**
* Returns a color associated with a particular resource ID
* <p>
- * Starting in {@link android.os.Build.VERSION_CODES#M}, the returned
+ * Starting in {@link Build.VERSION_CODES#M}, the returned
* color will be styled for the specified Context's theme.
*
* @param id The desired resource identifier, as generated by the aapt
@@ -525,7 +530,7 @@
@ColorInt
public static int getColor(@NonNull Context context, @ColorRes int id) {
if (Build.VERSION.SDK_INT >= 23) {
- return context.getColor(id);
+ return Api23Impl.getColor(context, id);
} else {
return context.getResources().getColor(id);
}
@@ -535,38 +540,35 @@
* Determine whether <em>you</em> have been granted a particular permission.
*
* @param permission The name of the permission being checked.
- *
- * @return {@link android.content.pm.PackageManager#PERMISSION_GRANTED} if you have the
- * permission, or {@link android.content.pm.PackageManager#PERMISSION_DENIED} if not.
- *
- * @see android.content.pm.PackageManager#checkPermission(String, String)
+ * @return {@link PackageManager#PERMISSION_GRANTED} if you have the
+ * permission, or {@link PackageManager#PERMISSION_DENIED} if not.
+ * @see PackageManager#checkPermission(String, String)
*/
public static int checkSelfPermission(@NonNull Context context, @NonNull String permission) {
if (permission == null) {
throw new IllegalArgumentException("permission is null");
}
- return context.checkPermission(permission, android.os.Process.myPid(), Process.myUid());
+ return context.checkPermission(permission, Process.myPid(), Process.myUid());
}
/**
* Returns the absolute path to the directory on the filesystem similar to
* {@link Context#getFilesDir()}. The difference is that files placed under this
* directory will be excluded from automatic backup to remote storage on
- * devices running {@link android.os.Build.VERSION_CODES#LOLLIPOP} or later.
+ * devices running {@link Build.VERSION_CODES#LOLLIPOP} or later.
*
* <p>No permissions are required to read or write to the returned path, since this
* path is internal storage.
*
* @return The path of the directory holding application files that will not be
- * automatically backed up to remote storage.
- *
- * @see android.content.Context#getFilesDir()
+ * automatically backed up to remote storage.
+ * @see Context#getFilesDir()
*/
@Nullable
public static File getNoBackupFilesDir(@NonNull Context context) {
if (Build.VERSION.SDK_INT >= 21) {
- return context.getNoBackupFilesDir();
+ return Api21Impl.getNoBackupFilesDir(context);
} else {
ApplicationInfo appInfo = context.getApplicationInfo();
return createFilesDir(new File(appInfo.dataDir, "no_backup"));
@@ -576,7 +578,7 @@
/**
* Returns the absolute path to the application specific cache directory on
* the filesystem designed for storing cached code. On devices running
- * {@link android.os.Build.VERSION_CODES#LOLLIPOP} or later, the system will delete
+ * {@link Build.VERSION_CODES#LOLLIPOP} or later, the system will delete
* any files stored in this location both when your specific application is
* upgraded, and when the entire platform is upgraded.
* <p>
@@ -590,7 +592,7 @@
*/
public static File getCodeCacheDir(@NonNull Context context) {
if (Build.VERSION.SDK_INT >= 21) {
- return context.getCodeCacheDir();
+ return Api21Impl.getCodeCacheDir(context);
} else {
ApplicationInfo appInfo = context.getApplicationInfo();
return createFilesDir(new File(appInfo.dataDir, "code_cache"));
@@ -645,7 +647,7 @@
@Nullable
public static Context createDeviceProtectedStorageContext(@NonNull Context context) {
if (Build.VERSION.SDK_INT >= 24) {
- return context.createDeviceProtectedStorageContext();
+ return Api24Impl.createDeviceProtectedStorageContext(context);
} else {
return null;
}
@@ -659,7 +661,7 @@
*/
public static boolean isDeviceProtectedStorage(@NonNull Context context) {
if (Build.VERSION.SDK_INT >= 24) {
- return context.isDeviceProtectedStorage();
+ return Api24Impl.isDeviceProtectedStorage(context);
} else {
return false;
}
@@ -672,7 +674,7 @@
*/
public static Executor getMainExecutor(Context context) {
if (Build.VERSION.SDK_INT >= 28) {
- return context.getMainExecutor();
+ return Api28Impl.getMainExecutor(context);
}
return ExecutorCompat.create(new Handler(context.getMainLooper()));
}
@@ -682,14 +684,13 @@
* for before O.
*
* @param context Context to start Service from.
- * @param intent The description of the Service to start.
- *
+ * @param intent The description of the Service to start.
* @see Context#startForegroundService(Intent)
* @see Context#startService(Intent)
*/
public static void startForegroundService(@NonNull Context context, @NonNull Intent intent) {
if (Build.VERSION.SDK_INT >= 26) {
- context.startForegroundService(intent);
+ Api26Impl.startForegroundService(context, intent);
} else {
// Pre-O behavior.
context.startService(intent);
@@ -699,17 +700,16 @@
/**
* Return the handle to a system-level service by class.
*
- * @param context Context to retrieve service from.
+ * @param context Context to retrieve service from.
* @param serviceClass The class of the desired service.
* @return The service or null if the class is not a supported system service.
- *
* @see Context#getSystemService(Class)
*/
@SuppressWarnings("unchecked")
@Nullable
public static <T> T getSystemService(@NonNull Context context, @NonNull Class<T> serviceClass) {
if (Build.VERSION.SDK_INT >= 23) {
- return context.getSystemService(serviceClass);
+ return Api23Impl.getSystemService(context, serviceClass);
}
String serviceName = getSystemServiceName(context, serviceClass);
@@ -719,17 +719,16 @@
/**
* Gets the name of the system-level service that is represented by the specified class.
*
- * @param context Context to retrieve service name from.
+ * @param context Context to retrieve service name from.
* @param serviceClass The class of the desired service.
* @return The service name or null if the class is not a supported system service.
- *
* @see Context#getSystemServiceName(Class)
*/
@Nullable
public static String getSystemServiceName(@NonNull Context context,
@NonNull Class<?> serviceClass) {
if (Build.VERSION.SDK_INT >= 23) {
- return context.getSystemServiceName(serviceClass);
+ return Api23Impl.getSystemServiceName(context, serviceClass);
}
return LegacyServiceMapHolder.SERVICES.get(serviceClass);
}
@@ -804,4 +803,150 @@
SERVICES.put(WindowManager.class, WINDOW_SERVICE);
}
}
+
+ @RequiresApi(16)
+ static class Api16Impl {
+ private Api16Impl() {
+ // This class is not instantiable.
+ }
+
+ @DoNotInline
+ static void startActivities(Context obj, Intent[] intents, Bundle options) {
+ obj.startActivities(intents, options);
+ }
+
+ @DoNotInline
+ static void startActivity(Context obj, Intent intent, Bundle options) {
+ obj.startActivity(intent, options);
+ }
+ }
+
+ @RequiresApi(19)
+ static class Api19Impl {
+ private Api19Impl() {
+ // This class is not instantiable.
+ }
+
+ @DoNotInline
+ static File[] getExternalCacheDirs(Context obj) {
+ return obj.getExternalCacheDirs();
+ }
+
+ @DoNotInline
+ static File[] getExternalFilesDirs(Context obj, String type) {
+ return obj.getExternalFilesDirs(type);
+ }
+
+ @DoNotInline
+ static File[] getObbDirs(Context obj) {
+ return obj.getObbDirs();
+ }
+ }
+
+ @RequiresApi(21)
+ static class Api21Impl {
+ private Api21Impl() {
+ // This class is not instantiable.
+ }
+
+ @DoNotInline
+ static Drawable getDrawable(Context obj, int id) {
+ return obj.getDrawable(id);
+ }
+
+ @DoNotInline
+ static File getNoBackupFilesDir(Context obj) {
+ return obj.getNoBackupFilesDir();
+ }
+
+ @DoNotInline
+ static File getCodeCacheDir(Context obj) {
+ return obj.getCodeCacheDir();
+ }
+ }
+
+ @RequiresApi(23)
+ static class Api23Impl {
+ private Api23Impl() {
+ // This class is not instantiable.
+ }
+
+ @DoNotInline
+ static ColorStateList getColorStateList(Context obj, int id) {
+ return obj.getColorStateList(id);
+ }
+
+ @DoNotInline
+ static int getColor(Context obj, int id) {
+ return obj.getColor(id);
+ }
+
+ @DoNotInline
+ static <T> T getSystemService(Context obj, Class<T> serviceClass) {
+ return obj.getSystemService(serviceClass);
+ }
+
+ @DoNotInline
+ static String getSystemServiceName(Context obj, Class<?> serviceClass) {
+ return obj.getSystemServiceName(serviceClass);
+ }
+ }
+
+ @RequiresApi(24)
+ static class Api24Impl {
+ private Api24Impl() {
+ // This class is not instantiable.
+ }
+
+ @DoNotInline
+ static File getDataDir(Context obj) {
+ return obj.getDataDir();
+ }
+
+ @DoNotInline
+ static Context createDeviceProtectedStorageContext(Context obj) {
+ return obj.createDeviceProtectedStorageContext();
+ }
+
+ @DoNotInline
+ static boolean isDeviceProtectedStorage(Context obj) {
+ return obj.isDeviceProtectedStorage();
+ }
+ }
+
+ @RequiresApi(26)
+ static class Api26Impl {
+ private Api26Impl() {
+ // This class is not instantiable.
+ }
+
+ @DoNotInline
+ static ComponentName startForegroundService(Context obj, Intent service) {
+ return obj.startForegroundService(service);
+ }
+ }
+
+ @RequiresApi(28)
+ static class Api28Impl {
+ private Api28Impl() {
+ // This class is not instantiable.
+ }
+
+ @DoNotInline
+ static Executor getMainExecutor(Context obj) {
+ return obj.getMainExecutor();
+ }
+ }
+
+ @RequiresApi(30)
+ static class Api30Impl {
+ private Api30Impl() {
+ // This class is not instantiable.
+ }
+
+ @DoNotInline
+ static String getAttributionTag(Context obj) {
+ return obj.getAttributionTag();
+ }
+ }
}
diff --git a/dynamic-animation/dynamic-animation-ktx/build.gradle b/dynamic-animation/dynamic-animation-ktx/build.gradle
index 9533a73..e3ec3f0 100644
--- a/dynamic-animation/dynamic-animation-ktx/build.gradle
+++ b/dynamic-animation/dynamic-animation-ktx/build.gradle
@@ -35,9 +35,9 @@
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
}
androidx {
diff --git a/dynamic-animation/dynamic-animation/build.gradle b/dynamic-animation/dynamic-animation/build.gradle
index 6ad3e31..13e952f 100644
--- a/dynamic-animation/dynamic-animation/build.gradle
+++ b/dynamic-animation/dynamic-animation/build.gradle
@@ -16,9 +16,9 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
}
androidx {
diff --git a/emoji/core/build.gradle b/emoji/core/build.gradle
index 2c54100..94334a7 100644
--- a/emoji/core/build.gradle
+++ b/emoji/core/build.gradle
@@ -31,9 +31,9 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(project(":internal-testutils-runtime"))
}
diff --git a/emoji2/emoji2-benchmark/build.gradle b/emoji2/emoji2-benchmark/build.gradle
index af349c0..a4709c1 100644
--- a/emoji2/emoji2-benchmark/build.gradle
+++ b/emoji2/emoji2-benchmark/build.gradle
@@ -34,8 +34,8 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation project(':internal-testutils-runtime')
androidTestImplementation(KOTLIN_STDLIB)
}
diff --git a/emoji2/emoji2-bundled/build.gradle b/emoji2/emoji2-bundled/build.gradle
index fd9fc67..7d6c347 100644
--- a/emoji2/emoji2-bundled/build.gradle
+++ b/emoji2/emoji2-bundled/build.gradle
@@ -39,9 +39,9 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation project(':internal-testutils-runtime')
// view tests that use font are in this module as well; for licensing reasons
diff --git a/emoji2/emoji2-views-helper/build.gradle b/emoji2/emoji2-views-helper/build.gradle
index bd68538..038f23c 100644
--- a/emoji2/emoji2-views-helper/build.gradle
+++ b/emoji2/emoji2-views-helper/build.gradle
@@ -20,9 +20,9 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation project(':internal-testutils-runtime')
}
diff --git a/emoji2/emoji2-views/build.gradle b/emoji2/emoji2-views/build.gradle
index 726ad9f..a7b3177 100644
--- a/emoji2/emoji2-views/build.gradle
+++ b/emoji2/emoji2-views/build.gradle
@@ -21,9 +21,9 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation project(':internal-testutils-runtime')
}
diff --git a/emoji2/emoji2/build.gradle b/emoji2/emoji2/build.gradle
index a9446f7..ef1872e 100644
--- a/emoji2/emoji2/build.gradle
+++ b/emoji2/emoji2/build.gradle
@@ -32,9 +32,9 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation project(':internal-testutils-runtime')
}
diff --git a/fragment/fragment-testing/build.gradle b/fragment/fragment-testing/build.gradle
index 716c481..6c9828d 100644
--- a/fragment/fragment-testing/build.gradle
+++ b/fragment/fragment-testing/build.gradle
@@ -36,8 +36,8 @@
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
androidTestImplementation(TRUTH)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
lintPublish(project(":fragment:fragment-testing-lint"))
}
diff --git a/fragment/fragment/build.gradle b/fragment/fragment/build.gradle
index 57dd500..da73487 100644
--- a/fragment/fragment/build.gradle
+++ b/fragment/fragment/build.gradle
@@ -58,9 +58,9 @@
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
androidTestImplementation(TRUTH)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(MULTIDEX)
androidTestImplementation(project(":internal-testutils-runtime"), {
exclude group: "androidx.fragment", module: "fragment"
diff --git a/gradlew b/gradlew
index a43ff0f..4067d06 100755
--- a/gradlew
+++ b/gradlew
@@ -222,8 +222,14 @@
TMPDIR_ARG="-Djava.io.tmpdir=$TMPDIR"
fi
+if [[ " ${@} " =~ " --clean " ]]; then
+ cleanCaches=true
+else
+ cleanCaches=false
+fi
+
# Expand some arguments
-for compact in "--ci" "--strict"; do
+for compact in "--ci" "--strict" "--clean"; do
if [ "$compact" == "--ci" ]; then
expanded="--strict\
--stacktrace\
@@ -240,30 +246,38 @@
--no-daemon\
--offline"
fi
+ if [ "$compact" == "--clean" ]; then
+ expanded="" # we parsed the argument above but we still have to remove it to avoid confusing Gradle
+ fi
- # Expand an individual argument
- # Start by making a copy of our list of arguments and iterating through the copy
- for arg in "$@"; do
- # Remove this argument from our list of arguments.
- # By the time we've completed this loop, we will have removed the original copy of
- # each argument, and potentially re-added a new copy or an expansion of each.
- shift
- # Determine whether to expand this argument
- if [ "$arg" == "$compact" ]; then
- # Add the expansion to our arguments
- set -- "$@" $expanded
- echo "gradlew expanded '$compact' into '$expanded'"
- echo
- # We avoid re-adding this argument itself back into the list for two reasons:
- # 1. This argument might not be directly understood by Gradle
- # 2. We want to enforce that all behaviors enabled by this flag can be toggled independently,
- # so we don't want it to be easy to inadvertently check for the presence of this flag
- # specifically
- else
- # Add this argument back into our arguments
- set -- "$@" "$arg"
- fi
- done
+ # check whether this particular compat argument was passed (and therefore needs expansion)
+ if [[ " ${@} " =~ " $compact " ]]; then
+ # Expand an individual argument
+ # Start by making a copy of our list of arguments and iterating through the copy
+ for arg in "$@"; do
+ # Remove this argument from our list of arguments.
+ # By the time we've completed this loop, we will have removed the original copy of
+ # each argument, and potentially re-added a new copy or an expansion of each.
+ shift
+ # Determine whether to expand this argument
+ if [ "$arg" == "$compact" ]; then
+ # Add the expansion to our arguments
+ set -- "$@" $expanded
+ if [ "$expanded" != "" ]; then
+ echo "gradlew expanded '$compact' into '$expanded'"
+ echo
+ fi
+ # We avoid re-adding this argument itself back into the list for two reasons:
+ # 1. This argument might not be directly understood by Gradle
+ # 2. We want to enforce that all behaviors enabled by this flag can be toggled independently,
+ # so we don't want it to be easy to inadvertently check for the presence of this flag
+ # specifically
+ else
+ # Add this argument back into our arguments
+ set -- "$@" "$arg"
+ fi
+ done
+ fi
done
function tryToDiagnosePossibleDaemonFailure() {
@@ -276,6 +290,41 @@
fi
}
+function removeCaches() {
+ rm -rf $SCRIPT_PATH/.gradle
+ rm -rf $SCRIPT_PATH/buildSrc/.gradle
+ rm -f $SCRIPT_PATH/local.properties
+ if [ "$GRADLE_USER_HOME" != "" ]; then
+ rm -rf "$GRADLE_USER_HOME"
+ else
+ rm -rf ~/.gradle
+ fi
+ # AGP should (also) do this automatically (b/170640263)
+ rm -rf $SCRIPT_PATH/appsearch/appsearch/.cxx
+ rm -rf $SCRIPT_PATH/appsearch/local-backend/.cxx
+ rm -rf $SCRIPT_PATH/appsearch/local-storage/.cxx
+ rm -rf $OUT_DIR
+}
+
+if [ "$cleanCaches" == true ]; then
+ echo "IF ./gradlew --clean FIXES YOUR BUILD; OPEN A BUG."
+ echo "In nearly all cases, it should not be necessary to run a clean build."
+ echo
+ echo "You may be more interested in running:"
+ echo
+ echo " ./development/diagnose-build-failure/diagnose-build-failure.sh $*"
+ echo
+ echo "which attempts to diagnose more details about build failures."
+ echo
+ echo "Removing caches"
+ # one case where it is convenient to have a clean build is for double-checking that a build failure isn't due to an incremental build failure
+ # another case where it is convenient to have a clean build is for performance testing
+ # another case where it is convenient to have a clean build is when you're modifying the build and may have introduced some errors but haven't shared your changes yet (at which point you should have fixed the errors)
+ echo
+
+ removeCaches
+fi
+
function runGradle() {
processOutput=false
if [[ " ${@} " =~ " -Pandroidx.validateNoUnrecognizedMessages " ]]; then
diff --git a/gridlayout/gridlayout/build.gradle b/gridlayout/gridlayout/build.gradle
index 613a911..b5c5616 100644
--- a/gridlayout/gridlayout/build.gradle
+++ b/gridlayout/gridlayout/build.gradle
@@ -16,7 +16,7 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
}
androidx {
diff --git a/heifwriter/heifwriter/build.gradle b/heifwriter/heifwriter/build.gradle
index b31fef5..2df6655 100644
--- a/heifwriter/heifwriter/build.gradle
+++ b/heifwriter/heifwriter/build.gradle
@@ -21,7 +21,7 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
}
androidx {
diff --git a/leanback/leanback-paging/build.gradle b/leanback/leanback-paging/build.gradle
index 32e4434..415101b 100644
--- a/leanback/leanback-paging/build.gradle
+++ b/leanback/leanback-paging/build.gradle
@@ -19,9 +19,9 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(project(":internal-testutils-espresso"))
androidTestImplementation(project(":internal-testutils-runtime"))
androidTestImplementation(project(":internal-testutils-common"))
diff --git a/leanback/leanback-tab/build.gradle b/leanback/leanback-tab/build.gradle
index 8bad67a..587ee18 100644
--- a/leanback/leanback-tab/build.gradle
+++ b/leanback/leanback-tab/build.gradle
@@ -25,9 +25,9 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(project(":internal-testutils-espresso"))
androidTestImplementation(project(":internal-testutils-runtime"))
androidTestImplementation(project(":internal-testutils-common"))
diff --git a/leanback/leanback/build.gradle b/leanback/leanback/build.gradle
index e0f38fa..cbc1960 100644
--- a/leanback/leanback/build.gradle
+++ b/leanback/leanback/build.gradle
@@ -23,9 +23,9 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(project(":internal-testutils-espresso"))
androidTestImplementation(project(":internal-testutils-runtime"))
androidTestImplementation(project(":internal-testutils-common"))
diff --git a/loader/loader-ktx/build.gradle b/loader/loader-ktx/build.gradle
index e27fe01..12f8e80 100644
--- a/loader/loader-ktx/build.gradle
+++ b/loader/loader-ktx/build.gradle
@@ -38,9 +38,9 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
}
androidx {
diff --git a/loader/loader/build.gradle b/loader/loader/build.gradle
index 3b958cf..315f072 100644
--- a/loader/loader/build.gradle
+++ b/loader/loader/build.gradle
@@ -27,9 +27,9 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
}
androidx {
diff --git a/media/media/build.gradle b/media/media/build.gradle
index 49e34a9..561b834 100644
--- a/media/media/build.gradle
+++ b/media/media/build.gradle
@@ -31,7 +31,7 @@
androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
androidTestImplementation(project(":internal-testutils-runtime"))
annotationProcessor(project(":versionedparcelable:versionedparcelable-compiler"))
}
diff --git a/media2/media2-common/build.gradle b/media2/media2-common/build.gradle
index 45d8b15..e128665 100644
--- a/media2/media2-common/build.gradle
+++ b/media2/media2-common/build.gradle
@@ -38,7 +38,7 @@
androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
androidTestImplementation(project(":internal-testutils-runtime"))
annotationProcessor(project(":versionedparcelable:versionedparcelable-compiler"))
}
diff --git a/media2/media2-player/build.gradle b/media2/media2-player/build.gradle
index 73f080a..cfd7110 100644
--- a/media2/media2-player/build.gradle
+++ b/media2/media2-player/build.gradle
@@ -39,7 +39,7 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
androidTestImplementation(project(":internal-testutils-runtime"))
annotationProcessor(project(":versionedparcelable:versionedparcelable-compiler"))
}
diff --git a/media2/media2-session/build.gradle b/media2/media2-session/build.gradle
index 4aa0edb..47e3b2e 100644
--- a/media2/media2-session/build.gradle
+++ b/media2/media2-session/build.gradle
@@ -37,7 +37,7 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
androidTestImplementation(project(":internal-testutils-runtime"))
annotationProcessor(project(":versionedparcelable:versionedparcelable-compiler"))
}
diff --git a/media2/media2-widget/build.gradle b/media2/media2-widget/build.gradle
index f26fb57..e637e6c 100644
--- a/media2/media2-widget/build.gradle
+++ b/media2/media2-widget/build.gradle
@@ -33,9 +33,9 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(project(":internal-testutils-runtime"))
androidTestImplementation(project(":media2:media2-player"))
}
diff --git a/mediarouter/mediarouter/build.gradle b/mediarouter/mediarouter/build.gradle
index 993ef6e..84c37b6 100644
--- a/mediarouter/mediarouter/build.gradle
+++ b/mediarouter/mediarouter/build.gradle
@@ -37,7 +37,7 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
androidTestImplementation(project(":media:version-compat-tests:lib"))
}
diff --git a/navigation/navigation-common/build.gradle b/navigation/navigation-common/build.gradle
index e45b8cf..5ecb6d0 100644
--- a/navigation/navigation-common/build.gradle
+++ b/navigation/navigation-common/build.gradle
@@ -46,8 +46,8 @@
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ESPRESSO_CORE)
androidTestImplementation(TRUTH)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy)
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy)
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy)
androidTestImplementation(KOTLIN_STDLIB)
}
diff --git a/navigation/navigation-dynamic-features-fragment/build.gradle b/navigation/navigation-dynamic-features-fragment/build.gradle
index ccf402b..369f823 100644
--- a/navigation/navigation-dynamic-features-fragment/build.gradle
+++ b/navigation/navigation-dynamic-features-fragment/build.gradle
@@ -42,9 +42,9 @@
androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
androidTestImplementation(ANDROIDX_TEST_RULES)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy)
androidTestImplementation(ESPRESSO_CORE)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy)
androidTestImplementation(TRUTH)
androidTestImplementation(project(":internal-testutils-runtime"), {
exclude group: "androidx.fragment", module: "fragment"
diff --git a/navigation/navigation-dynamic-features-runtime/build.gradle b/navigation/navigation-dynamic-features-runtime/build.gradle
index 3853ed4..e395526a 100644
--- a/navigation/navigation-dynamic-features-runtime/build.gradle
+++ b/navigation/navigation-dynamic-features-runtime/build.gradle
@@ -43,9 +43,9 @@
androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
androidTestImplementation(ANDROIDX_TEST_RULES)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy)
androidTestImplementation(ESPRESSO_CORE)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy)
androidTestImplementation(TRUTH)
}
diff --git a/navigation/navigation-runtime/build.gradle b/navigation/navigation-runtime/build.gradle
index 8117a55..9ac58b4 100644
--- a/navigation/navigation-runtime/build.gradle
+++ b/navigation/navigation-runtime/build.gradle
@@ -44,8 +44,8 @@
androidTestImplementation(ESPRESSO_CORE)
androidTestImplementation(ESPRESSO_INTENTS)
androidTestImplementation(TRUTH)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy)
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy)
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy)
androidTestImplementation(KOTLIN_STDLIB)
}
diff --git a/percentlayout/percentlayout/build.gradle b/percentlayout/percentlayout/build.gradle
index ae86a44..bc6a65e 100644
--- a/percentlayout/percentlayout/build.gradle
+++ b/percentlayout/percentlayout/build.gradle
@@ -16,7 +16,7 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
}
android {
diff --git a/preference/preference/build.gradle b/preference/preference/build.gradle
index 5cc86e5..b26f71e 100644
--- a/preference/preference/build.gradle
+++ b/preference/preference/build.gradle
@@ -38,9 +38,9 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(KOTLIN_STDLIB)
androidTestImplementation(TRUTH)
androidTestImplementation(MULTIDEX)
diff --git a/recyclerview/recyclerview-selection/build.gradle b/recyclerview/recyclerview-selection/build.gradle
index efd061d..d7fcd32 100644
--- a/recyclerview/recyclerview-selection/build.gradle
+++ b/recyclerview/recyclerview-selection/build.gradle
@@ -33,9 +33,9 @@
androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it's own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it's own MockMaker
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it's own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it's own MockMaker
androidTestImplementation(JUNIT)
}
diff --git a/recyclerview/recyclerview/build.gradle b/recyclerview/recyclerview/build.gradle
index a6fe293..b9dc0b6 100644
--- a/recyclerview/recyclerview/build.gradle
+++ b/recyclerview/recyclerview/build.gradle
@@ -19,9 +19,9 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(TRUTH)
androidTestImplementation(JUNIT)
androidTestImplementation(KOTLIN_STDLIB)
diff --git a/remotecallback/remotecallback/build.gradle b/remotecallback/remotecallback/build.gradle
index 2c46eb7..a0ad9c0 100644
--- a/remotecallback/remotecallback/build.gradle
+++ b/remotecallback/remotecallback/build.gradle
@@ -32,8 +32,8 @@
androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy)
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy)
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy)
androidTestAnnotationProcessor (project(":remotecallback:remotecallback-processor"))
}
diff --git a/room/integration-tests/autovaluetestapp/build.gradle b/room/integration-tests/autovaluetestapp/build.gradle
index aafd894..01ee90f 100644
--- a/room/integration-tests/autovaluetestapp/build.gradle
+++ b/room/integration-tests/autovaluetestapp/build.gradle
@@ -47,8 +47,8 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ESPRESSO_CORE)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it's own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it's own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it's own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it's own MockMaker
testImplementation(JUNIT)
}
diff --git a/room/integration-tests/testapp/build.gradle b/room/integration-tests/testapp/build.gradle
index edcd26b..f89faf2 100644
--- a/room/integration-tests/testapp/build.gradle
+++ b/room/integration-tests/testapp/build.gradle
@@ -114,8 +114,8 @@
androidTestImplementation(ANDROIDX_TEST_RULES)
androidTestImplementation(ESPRESSO_CORE)
androidTestImplementation(TRUTH)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it's own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it's own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it's own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it's own MockMaker
androidTestImplementation(project(":internal-testutils-truth"))
diff --git a/room/runtime/build.gradle b/room/runtime/build.gradle
index a20e760..6985986 100644
--- a/room/runtime/build.gradle
+++ b/room/runtime/build.gradle
@@ -58,8 +58,8 @@
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ESPRESSO_CORE)
androidTestImplementation(KOTLIN_STDLIB)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(project(":internal-testutils-truth")) // for assertThrows
androidTestImplementation("androidx.arch.core:core-testing:2.0.1")
diff --git a/sharetarget/sharetarget/build.gradle b/sharetarget/sharetarget/build.gradle
index 3713624..e911dca 100644
--- a/sharetarget/sharetarget/build.gradle
+++ b/sharetarget/sharetarget/build.gradle
@@ -34,8 +34,8 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
}
androidx {
diff --git a/slices/benchmark/build.gradle b/slices/benchmark/build.gradle
index 19510e2..7b04353 100644
--- a/slices/benchmark/build.gradle
+++ b/slices/benchmark/build.gradle
@@ -35,9 +35,9 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy)
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy)
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy)
}
androidx {
diff --git a/slices/core/build.gradle b/slices/core/build.gradle
index a0669c4..90affdb 100644
--- a/slices/core/build.gradle
+++ b/slices/core/build.gradle
@@ -33,8 +33,8 @@
androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy)
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy)
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy)
annotationProcessor (project(":versionedparcelable:versionedparcelable-compiler"))
}
diff --git a/slices/remotecallback/build.gradle b/slices/remotecallback/build.gradle
index 2849219..c906165 100644
--- a/slices/remotecallback/build.gradle
+++ b/slices/remotecallback/build.gradle
@@ -34,8 +34,8 @@
androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy)
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy)
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy)
androidTestAnnotationProcessor project(":remotecallback:remotecallback-processor")
}
diff --git a/slices/test/build.gradle b/slices/test/build.gradle
index 28e5a52..351e96a 100644
--- a/slices/test/build.gradle
+++ b/slices/test/build.gradle
@@ -34,9 +34,9 @@
androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy)
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy)
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy)
}
androidx {
diff --git a/slices/view/build.gradle b/slices/view/build.gradle
index f88be95..48025cc 100644
--- a/slices/view/build.gradle
+++ b/slices/view/build.gradle
@@ -37,9 +37,9 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy)
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy)
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy)
}
androidx {
diff --git a/slidingpanelayout/slidingpanelayout/build.gradle b/slidingpanelayout/slidingpanelayout/build.gradle
index 86340b6..4ac36e3 100644
--- a/slidingpanelayout/slidingpanelayout/build.gradle
+++ b/slidingpanelayout/slidingpanelayout/build.gradle
@@ -16,7 +16,7 @@
androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
androidTestImplementation(KOTLIN_STDLIB)
androidTestImplementation(TRUTH)
androidTestImplementation(project(':internal-testutils-runtime'))
diff --git a/sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteDatabase.java b/sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteDatabase.java
index 0cc817b..c75894e 100644
--- a/sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteDatabase.java
+++ b/sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteDatabase.java
@@ -124,7 +124,7 @@
// Adding @RequiresApi(30) would prevent unbundled implementations from offering this
// functionality to lower API levels.
- @SuppressWarnings("UnsafeNewApiCall")
+ @SuppressWarnings("ClassVerificationFailure")
@Override
public void execPerConnectionSQL(@NonNull String sql, @Nullable Object[] bindArgs) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
diff --git a/startup/integration-tests/first-library/build.gradle b/startup/integration-tests/first-library/build.gradle
index 7b408f1..59ce01d 100644
--- a/startup/integration-tests/first-library/build.gradle
+++ b/startup/integration-tests/first-library/build.gradle
@@ -33,7 +33,7 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ESPRESSO_CORE)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has its own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has its own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has its own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has its own MockMaker
testImplementation(JUNIT)
}
diff --git a/startup/integration-tests/second-library/build.gradle b/startup/integration-tests/second-library/build.gradle
index 36ee190..760958b 100644
--- a/startup/integration-tests/second-library/build.gradle
+++ b/startup/integration-tests/second-library/build.gradle
@@ -32,7 +32,7 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ESPRESSO_CORE)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has its own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has its own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has its own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has its own MockMaker
testImplementation(JUNIT)
}
diff --git a/startup/startup-runtime/build.gradle b/startup/startup-runtime/build.gradle
index 75c3825..9b60091 100644
--- a/startup/startup-runtime/build.gradle
+++ b/startup/startup-runtime/build.gradle
@@ -46,8 +46,8 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ESPRESSO_CORE)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has its own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has its own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has its own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has its own MockMaker
testImplementation(JUNIT)
}
diff --git a/swiperefreshlayout/swiperefreshlayout/build.gradle b/swiperefreshlayout/swiperefreshlayout/build.gradle
index 3eb08fd..94f6bce 100644
--- a/swiperefreshlayout/swiperefreshlayout/build.gradle
+++ b/swiperefreshlayout/swiperefreshlayout/build.gradle
@@ -18,10 +18,10 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(ESPRESSO_CONTRIB, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(ESPRESSO_CONTRIB, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(project(":internal-testutils-espresso"))
androidTestImplementation(project(":internal-testutils-runtime"), {
exclude group: "androidx.swiperefreshlayout", module: "swiperefreshlayout"
diff --git a/testutils/testutils-espresso/build.gradle b/testutils/testutils-espresso/build.gradle
index 0ba77aa..314bef2 100644
--- a/testutils/testutils-espresso/build.gradle
+++ b/testutils/testutils-espresso/build.gradle
@@ -25,7 +25,7 @@
dependencies {
api("androidx.annotation:annotation:1.1.0")
- implementation(ESPRESSO_CORE, libs.exclude_for_espresso)
+ implementation(ESPRESSO_CORE, excludes.espresso)
implementation(KOTLIN_STDLIB)
}
diff --git a/testutils/testutils-mockito/build.gradle b/testutils/testutils-mockito/build.gradle
index ea8a7de..18aaea4 100644
--- a/testutils/testutils-mockito/build.gradle
+++ b/testutils/testutils-mockito/build.gradle
@@ -23,7 +23,7 @@
}
dependencies {
- api(MOCKITO_CORE, libs.exclude_bytebuddy)
+ api(MOCKITO_CORE, excludes.bytebuddy)
implementation(KOTLIN_STDLIB)
}
diff --git a/text/text/build.gradle b/text/text/build.gradle
index f29d53b..684036d 100644
--- a/text/text/build.gradle
+++ b/text/text/build.gradle
@@ -41,11 +41,11 @@
androidTestImplementation(ANDROIDX_TEST_RULES)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(ESPRESSO_CORE)
androidTestImplementation(JUNIT)
androidTestImplementation(TRUTH)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(MOCKITO_KOTLIN, {
exclude group: "org.mockito" // to keep control on the mockito version
})
diff --git a/textclassifier/textclassifier/build.gradle b/textclassifier/textclassifier/build.gradle
index 392d82b..bc5aabc 100644
--- a/textclassifier/textclassifier/build.gradle
+++ b/textclassifier/textclassifier/build.gradle
@@ -19,9 +19,9 @@
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
androidTestImplementation(TRUTH)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy)
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy)
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy)
}
android {
diff --git a/transition/transition/build.gradle b/transition/transition/build.gradle
index 7a472ef..9b95adc 100644
--- a/transition/transition/build.gradle
+++ b/transition/transition/build.gradle
@@ -23,9 +23,9 @@
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
androidTestImplementation(TRUTH)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(project(":fragment:fragment"))
androidTestImplementation("androidx.appcompat:appcompat:1.1.0")
androidTestImplementation(project(":internal-testutils-runtime"), {
diff --git a/vectordrawable/vectordrawable-animated/build.gradle b/vectordrawable/vectordrawable-animated/build.gradle
index 57a3bf7..30d3435 100644
--- a/vectordrawable/vectordrawable-animated/build.gradle
+++ b/vectordrawable/vectordrawable-animated/build.gradle
@@ -17,7 +17,7 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
}
android {
diff --git a/vectordrawable/vectordrawable-seekable/build.gradle b/vectordrawable/vectordrawable-seekable/build.gradle
index 7ac21aa..b40844f 100644
--- a/vectordrawable/vectordrawable-seekable/build.gradle
+++ b/vectordrawable/vectordrawable-seekable/build.gradle
@@ -18,7 +18,7 @@
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
androidTestImplementation(TRUTH)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
androidTestImplementation(project(":core:core-animation-testing"))
}
diff --git a/versionedparcelable/versionedparcelable/build.gradle b/versionedparcelable/versionedparcelable/build.gradle
index f4fd9d2..8a6cd7a 100644
--- a/versionedparcelable/versionedparcelable/build.gradle
+++ b/versionedparcelable/versionedparcelable/build.gradle
@@ -32,8 +32,8 @@
androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy)
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy)
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy)
androidTestImplementation(TRUTH)
androidTestAnnotationProcessor project(":versionedparcelable:versionedparcelable-compiler")
}
diff --git a/viewpager/viewpager/build.gradle b/viewpager/viewpager/build.gradle
index 7194986..0fa3c58 100644
--- a/viewpager/viewpager/build.gradle
+++ b/viewpager/viewpager/build.gradle
@@ -24,9 +24,9 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
}
androidx {
diff --git a/viewpager2/viewpager2/build.gradle b/viewpager2/viewpager2/build.gradle
index 313262f..96b5361 100644
--- a/viewpager2/viewpager2/build.gradle
+++ b/viewpager2/viewpager2/build.gradle
@@ -36,9 +36,9 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it's own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it's own MockMaker
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it's own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it's own MockMaker
androidTestImplementation(project(":internal-testutils-espresso"))
androidTestImplementation(project(":internal-testutils-appcompat"), {
exclude group: "androidx.viewpager2", module: "viewpager2"
diff --git a/wear/wear-ongoing/api/current.txt b/wear/wear-ongoing/api/current.txt
index cf3b4ea..779ba555 100644
--- a/wear/wear-ongoing/api/current.txt
+++ b/wear/wear-ongoing/api/current.txt
@@ -3,9 +3,19 @@
@RequiresApi(24) public final class OngoingActivity {
method public void apply(android.content.Context);
- method public static androidx.wear.ongoing.OngoingActivity? fromExistingOngoingActivity(android.content.Context, java.util.function.Predicate<androidx.wear.ongoing.OngoingActivityData!>);
- method public static androidx.wear.ongoing.OngoingActivity? fromExistingOngoingActivity(android.content.Context);
- method public static androidx.wear.ongoing.OngoingActivity? fromExistingOngoingActivity(android.content.Context, int);
+ method public android.graphics.drawable.Icon? getAnimatedIcon();
+ method public String? getCategory();
+ method public androidx.core.content.LocusIdCompat? getLocusId();
+ method public int getNotificationId();
+ method public int getOngoingActivityId();
+ method public android.graphics.drawable.Icon getStaticIcon();
+ method public androidx.wear.ongoing.OngoingActivityStatus? getStatus();
+ method public String? getTag();
+ method public long getTimestamp();
+ method public android.app.PendingIntent getTouchIntent();
+ method public static androidx.wear.ongoing.OngoingActivity? recoverOngoingActivity(android.content.Context, java.util.function.Predicate<androidx.wear.ongoing.OngoingActivityData!>);
+ method public static androidx.wear.ongoing.OngoingActivity? recoverOngoingActivity(android.content.Context);
+ method public static androidx.wear.ongoing.OngoingActivity? recoverOngoingActivity(android.content.Context, int);
method public void update(android.content.Context, androidx.wear.ongoing.OngoingActivityStatus);
}
diff --git a/wear/wear-ongoing/api/public_plus_experimental_current.txt b/wear/wear-ongoing/api/public_plus_experimental_current.txt
index c35669e..3c959c3 100644
--- a/wear/wear-ongoing/api/public_plus_experimental_current.txt
+++ b/wear/wear-ongoing/api/public_plus_experimental_current.txt
@@ -3,9 +3,19 @@
@RequiresApi(24) public final class OngoingActivity {
method public void apply(android.content.Context);
- method public static androidx.wear.ongoing.OngoingActivity? fromExistingOngoingActivity(android.content.Context, java.util.function.Predicate<androidx.wear.ongoing.OngoingActivityData!>);
- method public static androidx.wear.ongoing.OngoingActivity? fromExistingOngoingActivity(android.content.Context);
- method public static androidx.wear.ongoing.OngoingActivity? fromExistingOngoingActivity(android.content.Context, int);
+ method public android.graphics.drawable.Icon? getAnimatedIcon();
+ method public String? getCategory();
+ method public androidx.core.content.LocusIdCompat? getLocusId();
+ method public int getNotificationId();
+ method public int getOngoingActivityId();
+ method public android.graphics.drawable.Icon getStaticIcon();
+ method public androidx.wear.ongoing.OngoingActivityStatus? getStatus();
+ method public String? getTag();
+ method public long getTimestamp();
+ method public android.app.PendingIntent getTouchIntent();
+ method public static androidx.wear.ongoing.OngoingActivity? recoverOngoingActivity(android.content.Context, java.util.function.Predicate<androidx.wear.ongoing.OngoingActivityData!>);
+ method public static androidx.wear.ongoing.OngoingActivity? recoverOngoingActivity(android.content.Context);
+ method public static androidx.wear.ongoing.OngoingActivity? recoverOngoingActivity(android.content.Context, int);
method public void update(android.content.Context, androidx.wear.ongoing.OngoingActivityStatus);
}
diff --git a/wear/wear-ongoing/api/restricted_current.txt b/wear/wear-ongoing/api/restricted_current.txt
index c35669e..3c959c3 100644
--- a/wear/wear-ongoing/api/restricted_current.txt
+++ b/wear/wear-ongoing/api/restricted_current.txt
@@ -3,9 +3,19 @@
@RequiresApi(24) public final class OngoingActivity {
method public void apply(android.content.Context);
- method public static androidx.wear.ongoing.OngoingActivity? fromExistingOngoingActivity(android.content.Context, java.util.function.Predicate<androidx.wear.ongoing.OngoingActivityData!>);
- method public static androidx.wear.ongoing.OngoingActivity? fromExistingOngoingActivity(android.content.Context);
- method public static androidx.wear.ongoing.OngoingActivity? fromExistingOngoingActivity(android.content.Context, int);
+ method public android.graphics.drawable.Icon? getAnimatedIcon();
+ method public String? getCategory();
+ method public androidx.core.content.LocusIdCompat? getLocusId();
+ method public int getNotificationId();
+ method public int getOngoingActivityId();
+ method public android.graphics.drawable.Icon getStaticIcon();
+ method public androidx.wear.ongoing.OngoingActivityStatus? getStatus();
+ method public String? getTag();
+ method public long getTimestamp();
+ method public android.app.PendingIntent getTouchIntent();
+ method public static androidx.wear.ongoing.OngoingActivity? recoverOngoingActivity(android.content.Context, java.util.function.Predicate<androidx.wear.ongoing.OngoingActivityData!>);
+ method public static androidx.wear.ongoing.OngoingActivity? recoverOngoingActivity(android.content.Context);
+ method public static androidx.wear.ongoing.OngoingActivity? recoverOngoingActivity(android.content.Context, int);
method public void update(android.content.Context, androidx.wear.ongoing.OngoingActivityStatus);
}
diff --git a/wear/wear-ongoing/src/main/java/androidx/wear/ongoing/OngoingActivity.java b/wear/wear-ongoing/src/main/java/androidx/wear/ongoing/OngoingActivity.java
index 0879272..6c53230 100644
--- a/wear/wear-ongoing/src/main/java/androidx/wear/ongoing/OngoingActivity.java
+++ b/wear/wear-ongoing/src/main/java/androidx/wear/ongoing/OngoingActivity.java
@@ -50,11 +50,16 @@
* notificationManager.notify(notificationId, builder.build());
* }</pre>
*
+ * Note that if a Notification with that id was previously posted it will be replaced. If you
+ * need more than one Notification with the same ID you can use a String tag to differentiate
+ * them in both the {@link Builder#Builder(Context, String, int, NotificationCompat.Builder)} and
+ * {@link NotificationManager#notify(String, int, Notification)}
+ * <p>
* Afterward, {@link OngoingActivity#update(Context, OngoingActivityStatus) update} can be used to
* update the status.
* <p>
* If saving the {@link OngoingActivity} instance is not convenient, it can be recovered (after the
- * notification is posted) with {@link OngoingActivity#fromExistingOngoingActivity(Context)}
+ * notification is posted) with {@link OngoingActivity#recoverOngoingActivity(Context)}
*/
@RequiresApi(24)
public final class OngoingActivity {
@@ -132,8 +137,6 @@
* {@link OngoingActivity}. For example, in the WatchFace.
* Should be white with a transparent background, preferably an AnimatedVectorDrawable.
*/
- @SuppressWarnings("MissingGetterMatchingBuilder")
- // No getters needed on OngoingActivity - receiver will consume from OngoingActivityData.
@NonNull
public Builder setAnimatedIcon(@NonNull Icon animatedIcon) {
mAnimatedIcon = animatedIcon;
@@ -145,8 +148,6 @@
* {@link OngoingActivity}. For example, in the WatchFace.
* Should be white with a transparent background, preferably an AnimatedVectorDrawable.
*/
- @SuppressWarnings("MissingGetterMatchingBuilder")
- // No getters needed on OngoingActivity - receiver will consume from OngoingActivityData.
@NonNull
public Builder setAnimatedIcon(@DrawableRes int animatedIcon) {
mAnimatedIcon = Icon.createWithResource(mContext, animatedIcon);
@@ -158,8 +159,6 @@
* {@link OngoingActivity}, for example in the WatchFace in ambient mode.
* Should be white with a transparent background, preferably an VectorDrawable.
*/
- @SuppressWarnings("MissingGetterMatchingBuilder")
- // No getters needed on OngoingActivity - receiver will consume from OngoingActivityData.
@NonNull
public Builder setStaticIcon(@NonNull Icon staticIcon) {
mStaticIcon = staticIcon;
@@ -171,8 +170,6 @@
* {@link OngoingActivity}, for example in the WatchFace in ambient mode.
* Should be white with a transparent background, preferably an VectorDrawable.
*/
- @SuppressWarnings("MissingGetterMatchingBuilder")
- // No getters needed on OngoingActivity - receiver will consume from OngoingActivityData.
@NonNull
public Builder setStaticIcon(@DrawableRes int staticIcon) {
mStaticIcon = Icon.createWithResource(mContext, staticIcon);
@@ -183,8 +180,6 @@
* Set the initial status of this ongoing activity, the status may be displayed on the UI to
* show progress of the Ongoing Activity.
*/
- @SuppressWarnings("MissingGetterMatchingBuilder")
- // No getters needed on OngoingActivity - receiver will consume from OngoingActivityData.
@NonNull
public Builder setStatus(@NonNull OngoingActivityStatus status) {
mStatus = status;
@@ -195,8 +190,6 @@
* Set the intent to be used to go back to the activity when the user interacts with the
* Ongoing Activity in other surfaces (for example, taps the Icon on the WatchFace)
*/
- @SuppressWarnings("MissingGetterMatchingBuilder")
- // No getters needed on OngoingActivity - receiver will consume from OngoingActivityData.
@NonNull
public Builder setTouchIntent(@NonNull PendingIntent touchIntent) {
mTouchIntent = touchIntent;
@@ -207,8 +200,6 @@
* Set the corresponding LocusId of this {@link OngoingActivity}, this will be used by the
* launcher to identify the corresponding launcher item and display it accordingly.
*/
- @SuppressWarnings("MissingGetterMatchingBuilder")
- // No getters needed on OngoingActivity - receiver will consume from OngoingActivityData.
@NonNull
public Builder setLocusId(@NonNull LocusIdCompat locusId) {
mLocusId = locusId;
@@ -217,10 +208,8 @@
/**
* Give an id to this {@link OngoingActivity}, as a way to reference it in
- * {@link OngoingActivity#fromExistingOngoingActivity(Context, int)}
+ * {@link OngoingActivity#recoverOngoingActivity(Context, int)}
*/
- @SuppressWarnings("MissingGetterMatchingBuilder")
- // No getters needed on OngoingActivity - receiver will consume from OngoingActivityData.
@NonNull
public Builder setOngoingActivityId(int ongoingActivityId) {
mOngoingActivityId = ongoingActivityId;
@@ -231,8 +220,6 @@
* Set the category of this {@link OngoingActivity}, this may be used by the system to
* prioritize it.
*/
- @SuppressWarnings("MissingGetterMatchingBuilder")
- // No getters needed on OngoingActivity - receiver will consume from OngoingActivityData.
@NonNull
public Builder setCategory(@NonNull String category) {
mCategory = category;
@@ -291,6 +278,95 @@
}
/**
+ * Get the notificationId of the notification associated with this {@link OngoingActivity}.
+ */
+ public int getNotificationId() {
+ return mNotificationId;
+ }
+
+ /**
+ * Get the tag of the notification associated with this {@link OngoingActivity}, or null if
+ * there is none.
+ */
+ @Nullable
+ public String getTag() {
+ return mTag;
+ }
+
+ /**
+ * Get the animated icon that can be used on some surfaces to represent this
+ * {@link OngoingActivity}. For example, in the WatchFace.
+ */
+ @Nullable
+ public Icon getAnimatedIcon() {
+ return mData.getAnimatedIcon();
+ }
+
+ /**
+ * Get the static icon that can be used on some surfaces to represent this
+ * {@link OngoingActivity}. For example in the WatchFace in ambient mode. If not set, returns
+ * the small icon of the corresponding Notification.
+ */
+ @NonNull
+ public Icon getStaticIcon() {
+ return mData.getStaticIcon();
+ }
+
+ /**
+ * Get the status of this ongoing activity, the status may be displayed on the UI to
+ * show progress of the Ongoing Activity. If not set, returns the content text of the
+ * corresponding Notification.
+ */
+ @Nullable
+ public OngoingActivityStatus getStatus() {
+ return mData.getStatus();
+ }
+
+ /**
+ * Get the intent to be used to go back to the activity when the user interacts with the
+ * Ongoing Activity in other surfaces (for example, taps the Icon on the WatchFace). If not
+ * set, returns the touch intent of the corresponding Notification.
+ */
+ @NonNull
+ public PendingIntent getTouchIntent() {
+ return mData.getTouchIntent();
+ }
+
+ /**
+ * Get the LocusId of this {@link OngoingActivity}, this can be used by the launcher to
+ * identify the corresponding launcher item and display it accordingly. If not set, returns
+ * the one in the corresponding Notification.
+ */
+ @Nullable
+ public LocusIdCompat getLocusId() {
+ return mData.getLocusId();
+ }
+
+ /**
+ * Get the id to this {@link OngoingActivity}. This id is used to reference it in
+ * {@link #recoverOngoingActivity(Context, int)}
+ */
+ public int getOngoingActivityId() {
+ return mData.getOngoingActivityId();
+ }
+
+ /**
+ * Get the Category of this {@link OngoingActivity} if set, otherwise the category of the
+ * corresponding notification.
+ */
+ @Nullable
+ public String getCategory() {
+ return mData.getCategory();
+ }
+
+ /**
+ * Get the time (in {@link SystemClock#elapsedRealtime()} time) the OngoingActivity was built.
+ */
+ public long getTimestamp() {
+ return mData.getTimestamp();
+ }
+
+ /**
* Notify the system that this activity should be shown as an Ongoing Activity.
*
* This will modify the notification builder associated with this Ongoing Activity, so needs
@@ -334,7 +410,7 @@
* @return the Ongoing Activity or null if not found
*/
@Nullable
- public static OngoingActivity fromExistingOngoingActivity(
+ public static OngoingActivity recoverOngoingActivity(
@NonNull Context context,
@NonNull Predicate<OngoingActivityData> filter
) {
@@ -367,8 +443,8 @@
* @return the Ongoing Activity or null if not found
*/
@Nullable
- public static OngoingActivity fromExistingOngoingActivity(@NonNull Context context) {
- return fromExistingOngoingActivity(context, (data) -> true);
+ public static OngoingActivity recoverOngoingActivity(@NonNull Context context) {
+ return recoverOngoingActivity(context, (data) -> true);
}
/**
@@ -382,9 +458,9 @@
* @return the Ongoing Activity or null if not found
*/
@Nullable
- public static OngoingActivity fromExistingOngoingActivity(@NonNull Context context,
+ public static OngoingActivity recoverOngoingActivity(@NonNull Context context,
int ongoingActivityId) {
- return fromExistingOngoingActivity(context,
+ return recoverOngoingActivity(context,
(data) -> data.getOngoingActivityId() == ongoingActivityId);
}
diff --git a/wear/wear-ongoing/src/test/java/androidx/wear/ongoing/OngoingActivityTest.kt b/wear/wear-ongoing/src/test/java/androidx/wear/ongoing/OngoingActivityTest.kt
index e8b9974..4f7f098 100644
--- a/wear/wear-ongoing/src/test/java/androidx/wear/ongoing/OngoingActivityTest.kt
+++ b/wear/wear-ongoing/src/test/java/androidx/wear/ongoing/OngoingActivityTest.kt
@@ -125,12 +125,12 @@
@Test
fun testCreateFromExistingOngoingActivityNull() {
// Nothing to see here.
- assertNull(OngoingActivity.fromExistingOngoingActivity(context))
+ assertNull(OngoingActivity.recoverOngoingActivity(context))
// Same, with a normal notification posted.
val builder = NotificationCompat.Builder(context, ChannelId)
notificationManager.notify(NotificationId, builder.build())
- assertNull(OngoingActivity.fromExistingOngoingActivity(context))
+ assertNull(OngoingActivity.recoverOngoingActivity(context))
// Clean up.
notificationManager.cancel(NotificationId)
@@ -158,7 +158,7 @@
for (i in 1..n) {
val status = "New Status $i"
statuses.add(status)
- OngoingActivity.fromExistingOngoingActivity(context, i)!!
+ OngoingActivity.recoverOngoingActivity(context, i)!!
.update(context, OngoingActivityStatus.forPart(TextStatusPart(status)))
}
assertEquals(n, statuses.size) // Just in case.
@@ -219,7 +219,7 @@
// After posting, send an update.
val newStatus = OngoingActivityStatus.forPart(TimerStatusPart(12345))
- OngoingActivity.fromExistingOngoingActivity(context)!!.update(context, newStatus)
+ OngoingActivity.recoverOngoingActivity(context)!!.update(context, newStatus)
// Get the notification and check that the status, and only the status has been updated.
val notifications = notificationManager.activeNotifications
@@ -341,7 +341,7 @@
// After posting, send an update to the second OA and check the statuses.
val newStatus2 = OngoingActivityStatus.forPart(TextStatusPart("update2"))
- OngoingActivity.fromExistingOngoingActivity(context, 2)?.update(context, newStatus2)
+ OngoingActivity.recoverOngoingActivity(context, 2)?.update(context, newStatus2)
assertEquals("status1, update2", getStatuses())
diff --git a/wear/wear-watchface-client/build.gradle b/wear/wear-watchface-client/build.gradle
index 3c29c46..91ad998 100644
--- a/wear/wear-watchface-client/build.gradle
+++ b/wear/wear-watchface-client/build.gradle
@@ -42,8 +42,8 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(TRUTH)
testImplementation(ANDROIDX_TEST_EXT_JUNIT)
diff --git a/wear/wear-watchface-client/guava/build.gradle b/wear/wear-watchface-client/guava/build.gradle
index 3c0a1a5..a751ec3 100644
--- a/wear/wear-watchface-client/guava/build.gradle
+++ b/wear/wear-watchface-client/guava/build.gradle
@@ -37,8 +37,8 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(TRUTH)
}
diff --git a/wear/wear-watchface-editor/build.gradle b/wear/wear-watchface-editor/build.gradle
index 8c4d011..f226b93 100644
--- a/wear/wear-watchface-editor/build.gradle
+++ b/wear/wear-watchface-editor/build.gradle
@@ -43,8 +43,8 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(KOTLIN_COROUTINES_TEST)
androidTestImplementation(TRUTH)
}
diff --git a/wear/wear-watchface-editor/guava/build.gradle b/wear/wear-watchface-editor/guava/build.gradle
index 5d7afd9..a11ce0d 100644
--- a/wear/wear-watchface-editor/guava/build.gradle
+++ b/wear/wear-watchface-editor/guava/build.gradle
@@ -36,8 +36,8 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(TRUTH)
}
diff --git a/wear/wear-watchface-style/src/main/java/androidx/wear/watchface/style/CurrentUserStyleRepository.kt b/wear/wear-watchface-style/src/main/java/androidx/wear/watchface/style/CurrentUserStyleRepository.kt
index 8654b4d..80387b8 100644
--- a/wear/wear-watchface-style/src/main/java/androidx/wear/watchface/style/CurrentUserStyleRepository.kt
+++ b/wear/wear-watchface-style/src/main/java/androidx/wear/watchface/style/CurrentUserStyleRepository.kt
@@ -142,26 +142,39 @@
* Describes the list of [UserStyleSetting]s the user can configure.
*
* @param userStyleSettings The user configurable style categories associated with this watch face.
- * Empty if the watch face doesn't support user styling.
+ * Empty if the watch face doesn't support user styling. Note we allow at most one
+ * [UserStyleSetting.ComplicationsUserStyleSetting] and one
+ * [UserStyleSetting.CustomValueUserStyleSetting]
+ * in the list.
*/
public class UserStyleSchema(
public val userStyleSettings: List<UserStyleSetting>
) {
init {
+ var complicationsUserStyleSettingCount = 0
var customValueUserStyleSettingCount = 0
for (setting in userStyleSettings) {
- if (setting is UserStyleSetting.CustomValueUserStyleSetting) {
- customValueUserStyleSettingCount++
+ when (setting) {
+ is UserStyleSetting.ComplicationsUserStyleSetting ->
+ complicationsUserStyleSettingCount++
+
+ is UserStyleSetting.CustomValueUserStyleSetting ->
+ customValueUserStyleSettingCount++
}
}
+ // This requirement makes it easier to implement companion editors.
+ require(complicationsUserStyleSettingCount <= 1) {
+ "At most only one ComplicationsUserStyleSetting is allowed"
+ }
+
// There's a hard limit to how big Schema + UserStyle can be and since this data is sent
// over bluetooth to the companion there will be performance issues well before we hit
// that the limit. As a result we want the total size of custom data to be kept small and
// we are initially restricting there to be at most one CustomValueUserStyleSetting.
- require(
- customValueUserStyleSettingCount <= 1
- ) { "At most only one CustomValueUserStyleSetting is allowed" }
+ require(customValueUserStyleSettingCount <= 1) {
+ "At most only one CustomValueUserStyleSetting is allowed"
+ }
}
/** @hide */
diff --git a/wear/wear-watchface-style/src/main/java/androidx/wear/watchface/style/UserStyleSetting.kt b/wear/wear-watchface-style/src/main/java/androidx/wear/watchface/style/UserStyleSetting.kt
index 789ddc8..55a881d 100644
--- a/wear/wear-watchface-style/src/main/java/androidx/wear/watchface/style/UserStyleSetting.kt
+++ b/wear/wear-watchface-style/src/main/java/androidx/wear/watchface/style/UserStyleSetting.kt
@@ -358,7 +358,8 @@
* The ComplicationsManager listens for style changes with this setting and when a
* [ComplicationsOption] is selected the overrides are automatically applied. Note its suggested
* that the default [ComplicationOverlay] (the first entry in the list) does not apply any
- * overrides.
+ * overrides. Only a single [ComplicationsUserStyleSetting] is permitted in the
+ * [UserStyleSchema].
*
* Not to be confused with complication provider selection.
*/
@@ -942,7 +943,8 @@
/**
* An application specific style setting. This style is ignored by the system editor. This is
- * expected to be used in conjunction with an on watch face editor.
+ * expected to be used in conjunction with an on watch face editor. Only a single
+ * [ComplicationsUserStyleSetting] is permitted in the [UserStyleSchema].
*/
public class CustomValueUserStyleSetting : UserStyleSetting {
internal companion object {
diff --git a/wear/wear-watchface-style/src/test/java/androidx/wear/watchface/style/CurrentUserStyleRepositoryTest.kt b/wear/wear-watchface-style/src/test/java/androidx/wear/watchface/style/CurrentUserStyleRepositoryTest.kt
index 3504aa6..359caeb 100644
--- a/wear/wear-watchface-style/src/test/java/androidx/wear/watchface/style/CurrentUserStyleRepositoryTest.kt
+++ b/wear/wear-watchface-style/src/test/java/androidx/wear/watchface/style/CurrentUserStyleRepositoryTest.kt
@@ -264,12 +264,35 @@
userStyleRepository.schema
)
- val customValue = userStyle.selectedOptions[customStyleSetting]!! as
- UserStyleSetting.CustomValueUserStyleSetting.CustomValueOption
+ val customValue = userStyle.selectedOptions[customStyleSetting]!! as CustomValueOption
assertThat(customValue.customValue.decodeToString()).isEqualTo("TEST 123")
}
@Test
+ public fun userStyle_multiple_ComplicationsUserStyleSetting_notAllowed() {
+ val customStyleSetting1 = CustomValueUserStyleSetting(
+ listOf(WatchFaceLayer.BASE),
+ "default".encodeToByteArray()
+ )
+ val customStyleSetting2 = CustomValueUserStyleSetting(
+ listOf(WatchFaceLayer.BASE),
+ "default".encodeToByteArray()
+ )
+
+ try {
+ UserStyleSchema(
+ listOf(customStyleSetting1, customStyleSetting2)
+ )
+ fail(
+ "Constructing a UserStyleSchema with more than one ComplicationsUserStyleSetting " +
+ "should fail"
+ )
+ } catch (e: Exception) {
+ // expected
+ }
+ }
+
+ @Test
public fun userStyle_multiple_CustomValueUserStyleSettings_notAllowed() {
val customStyleSetting1 = CustomValueUserStyleSetting(
listOf(WatchFaceLayer.BASE),
@@ -308,8 +331,7 @@
userStyleRepository.userStyle = UserStyle(
mapOf(
- customStyleSetting to
- CustomValueUserStyleSetting.CustomValueOption("test".encodeToByteArray())
+ customStyleSetting to CustomValueOption("test".encodeToByteArray())
)
)
@@ -370,9 +392,6 @@
.isEqualTo("12.3")
assertThat(LongRangeUserStyleSetting.LongRangeOption(123).toString())
.isEqualTo("123")
- assertThat(
- CustomValueUserStyleSetting.CustomValueOption("test".encodeToByteArray())
- .toString()
- ).isEqualTo("test")
+ assertThat(CustomValueOption("test".encodeToByteArray()).toString()).isEqualTo("test")
}
}
diff --git a/wear/wear-watchface/build.gradle b/wear/wear-watchface/build.gradle
index 0582637..340abf2 100644
--- a/wear/wear-watchface/build.gradle
+++ b/wear/wear-watchface/build.gradle
@@ -43,8 +43,8 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(TRUTH)
testImplementation(project(":wear:wear-watchface-complications-rendering"))
diff --git a/wear/wear-watchface/guava/build.gradle b/wear/wear-watchface/guava/build.gradle
index a70be6e..28f0610 100644
--- a/wear/wear-watchface/guava/build.gradle
+++ b/wear/wear-watchface/guava/build.gradle
@@ -34,14 +34,14 @@
androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
androidTestImplementation(TRUTH)
testImplementation(ANDROIDX_TEST_CORE)
testImplementation(ANDROIDX_TEST_RUNNER)
testImplementation(ANDROIDX_TEST_RULES)
- testImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- testImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ testImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ testImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
testImplementation(ROBOLECTRIC)
testImplementation(TRUTH)
}
diff --git a/wear/wear/build.gradle b/wear/wear/build.gradle
index a1aa6ae..80eb984 100644
--- a/wear/wear/build.gradle
+++ b/wear/wear/build.gradle
@@ -23,9 +23,9 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
testImplementation(KOTLIN_STDLIB)
testImplementation(ANDROIDX_TEST_CORE)
diff --git a/webkit/integration-tests/testapp/build.gradle b/webkit/integration-tests/testapp/build.gradle
index fe4acbc..4caa18a 100644
--- a/webkit/integration-tests/testapp/build.gradle
+++ b/webkit/integration-tests/testapp/build.gradle
@@ -32,13 +32,13 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(ESPRESSO_CORE, libs.exclude_for_espresso)
- androidTestImplementation(ESPRESSO_CONTRIB, libs.exclude_for_espresso)
+ androidTestImplementation(ESPRESSO_CORE, excludes.espresso)
+ androidTestImplementation(ESPRESSO_CONTRIB, excludes.espresso)
androidTestImplementation(ESPRESSO_IDLING_RESOURCE)
- androidTestImplementation(ESPRESSO_WEB, libs.exclude_for_espresso)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy)
+ androidTestImplementation(ESPRESSO_WEB, excludes.espresso)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy)
// DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy)
}
rootProject.tasks.getByName("buildOnServer").dependsOn(project.path + ":assembleRelease")
diff --git a/webkit/webkit/build.gradle b/webkit/webkit/build.gradle
index a640c8d..a52b165 100644
--- a/webkit/webkit/build.gradle
+++ b/webkit/webkit/build.gradle
@@ -36,7 +36,7 @@
androidTestImplementation("androidx.concurrent:concurrent-futures:1.0.0")
// Hamcrest matchers:
- androidTestImplementation(ESPRESSO_CONTRIB, libs.exclude_for_espresso)
+ androidTestImplementation(ESPRESSO_CONTRIB, excludes.espresso)
}
ext {
diff --git a/window/window-extensions/build.gradle b/window/window-extensions/build.gradle
index 384720b..5ee89bc 100644
--- a/window/window-extensions/build.gradle
+++ b/window/window-extensions/build.gradle
@@ -37,8 +37,8 @@
androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy)
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy)
}
androidx {
diff --git a/window/window/build.gradle b/window/window/build.gradle
index a1d0366..6329f99 100644
--- a/window/window/build.gradle
+++ b/window/window/build.gradle
@@ -74,9 +74,9 @@
androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy)
- androidTestImplementation(MOCKITO_KOTLIN, libs.exclude_bytebuddy)
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy)
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy)
+ androidTestImplementation(MOCKITO_KOTLIN, excludes.bytebuddy)
androidTestImplementation(TRUTH)
androidTestImplementation(compileOnly(project(":window:window-extensions")))
androidTestImplementation(compileOnly(project(":window:window-sidecar")))
diff --git a/work/workmanager-gcm/build.gradle b/work/workmanager-gcm/build.gradle
index b87f85f..004c634 100644
--- a/work/workmanager-gcm/build.gradle
+++ b/work/workmanager-gcm/build.gradle
@@ -48,8 +48,8 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ESPRESSO_CORE)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has its own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has its own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has its own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has its own MockMaker
testImplementation(JUNIT)
}
diff --git a/work/workmanager-ktx/build.gradle b/work/workmanager-ktx/build.gradle
index fa3953a..e323c94 100644
--- a/work/workmanager-ktx/build.gradle
+++ b/work/workmanager-ktx/build.gradle
@@ -39,8 +39,8 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ESPRESSO_CORE)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has its own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has its own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has its own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has its own MockMaker
androidTestImplementation("androidx.room:room-testing:2.2.5")
testImplementation(JUNIT)
}
diff --git a/work/workmanager-multiprocess/build.gradle b/work/workmanager-multiprocess/build.gradle
index 76bcadb..596d4cb 100644
--- a/work/workmanager-multiprocess/build.gradle
+++ b/work/workmanager-multiprocess/build.gradle
@@ -50,8 +50,8 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ESPRESSO_CORE)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has its own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has its own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has its own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has its own MockMaker
androidTestImplementation(project(":internal-testutils-runtime"))
testImplementation(KOTLIN_STDLIB)
testImplementation(JUNIT)
diff --git a/work/workmanager-testing/build.gradle b/work/workmanager-testing/build.gradle
index 7018887..745ad5a 100644
--- a/work/workmanager-testing/build.gradle
+++ b/work/workmanager-testing/build.gradle
@@ -38,8 +38,8 @@
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ESPRESSO_CORE)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has it"s own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has it"s own MockMaker
testImplementation(ANDROIDX_TEST_CORE)
testImplementation(JUNIT)
diff --git a/work/workmanager/build.gradle b/work/workmanager/build.gradle
index 2ba9ca2..c97b230 100644
--- a/work/workmanager/build.gradle
+++ b/work/workmanager/build.gradle
@@ -75,8 +75,8 @@
androidTestImplementation(projectOrArtifact(":lifecycle:lifecycle-runtime-testing"))
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ESPRESSO_CORE)
- androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has its own MockMaker
- androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has its own MockMaker
+ androidTestImplementation(MOCKITO_CORE, excludes.bytebuddy) // DexMaker has its own MockMaker
+ androidTestImplementation(DEXMAKER_MOCKITO, excludes.bytebuddy) // DexMaker has its own MockMaker
androidTestImplementation(project(":internal-testutils-runtime"))
testImplementation(JUNIT)
lintPublish(project(":work:work-runtime-lint"))