aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorEric Chang <erichang@google.com>2022-07-18 13:17:09 -0700
committerDagger Team <dagger-dev+copybara@google.com>2022-07-18 13:19:15 -0700
commit74ea7653a2a51ccb7246066c548184ce1e899045 (patch)
tree1985cb481a5c11c4e7f76af24a46a4e5a4ffdb66 /util
parent7f6e91bece5e7e4cca6c25a88abb255830c38a6b (diff)
downloaddagger2-74ea7653a2a51ccb7246066c548184ce1e899045.tar.gz
Updates to ViewModel support to use the new CreationExtras.
- Fixes issues with keyed ViewModels. - Fixes issues with using the ViewModel factory with a navigation entry as owner. Now the lazy function hiltNavGraphViewModels() provided by androidx.hilt:hilt-navigation-fragment is no longer needed. - Updates deps on fragment to 1.5.0 and lifecycle to 2.5.0 - That required updating the Android SDK to 31+, so upgrading to 32 and tools to 32.0.0 (besides a bazel example which has issues with that) - This requires AGP 7.0.0 so dropping support for AGP 4.2.0 - AGP 7.0.0 requires Java 11 so dropping support for Java 8 - Targeting 31+ requires updating androidx.text.core to 1.4.0 Fixes #3232. Issue #2152. RELNOTES=Fixes #3232 and #2152 (without hiltNavGraphViewModels). Also, due to the update to the new fragment 1.5.0 version, requires apps using Hilt to use SDK 31+ for the compile SDK. PiperOrigin-RevId: 461696901
Diffstat (limited to 'util')
-rwxr-xr-xutil/run-local-gradle-android-tests.sh12
-rwxr-xr-xutil/run-local-tests.sh2
2 files changed, 2 insertions, 12 deletions
diff --git a/util/run-local-gradle-android-tests.sh b/util/run-local-gradle-android-tests.sh
index 2890849f1..23eb86415 100755
--- a/util/run-local-gradle-android-tests.sh
+++ b/util/run-local-gradle-android-tests.sh
@@ -10,14 +10,6 @@ readonly ANDROID_GRADLE_PROJECTS=(
)
for project in "${ANDROID_GRADLE_PROJECTS[@]}"; do
echo "Running gradle tests for $project with AGP $AGP_VERSION_INPUT"
- # Enable config cache if AGP is 4.2.0 or greater.
- # Note that this is a lexicographical comparison.
- if [[ "$AGP_VERSION_INPUT" > "4.1.0" ]]
- then
- CONFIG_CACHE_ARG="--configuration-cache"
- else
- CONFIG_CACHE_ARG=""
- fi
- AGP_VERSION=$AGP_VERSION_INPUT ./$project/gradlew -p $project assembleDebug --no-daemon --stacktrace $CONFIG_CACHE_ARG
- AGP_VERSION=$AGP_VERSION_INPUT ./$project/gradlew -p $project testDebug --continue --no-daemon --stacktrace $CONFIG_CACHE_ARG
+ AGP_VERSION=$AGP_VERSION_INPUT ./$project/gradlew -p $project assembleDebug --no-daemon --stacktrace --configuration-cache
+ AGP_VERSION=$AGP_VERSION_INPUT ./$project/gradlew -p $project testDebug --continue --no-daemon --stacktrace --configuration-cache
done
diff --git a/util/run-local-tests.sh b/util/run-local-tests.sh
index ee2db4af4..4e81e5fe1 100755
--- a/util/run-local-tests.sh
+++ b/util/run-local-tests.sh
@@ -16,8 +16,6 @@ pushd examples/maven && mvn compile && popd
# Run local gradle tests
util/run-local-gradle-tests.sh
-util/run-local-gradle-android-tests.sh "4.1.0"
-util/run-local-gradle-android-tests.sh "4.2.0"
util/run-local-gradle-android-tests.sh "7.0.0"
util/run-local-gradle-android-tests.sh "7.1.2"