From 8cddd2602c47792314956fea3ad768221521bebd Mon Sep 17 00:00:00 2001 From: Pranav Pandey Date: Sun, 21 Jul 2024 22:11:40 +0530 Subject: [PATCH] Target SDK 35 & Minimum SDK 19 Build tools 35.0.0. Update `sdk` utils to detect API 35. --- .travis.yml | 4 ++-- build.gradle | 10 +++++----- .../android/dynamic/util/DynamicSdkUtils.java | 17 +++++++++-------- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index d06332b..e055ebc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,8 +10,8 @@ android: components: - tools - platform-tools - - build-tools-34.0.0 - - android-34 + - build-tools-35.0.0 + - android-35 - extra-android-support - extra-android-m2repository - extra-google-m2repository diff --git a/build.gradle b/build.gradle index 223d23c..06e2350 100644 --- a/build.gradle +++ b/build.gradle @@ -16,12 +16,12 @@ buildscript { ext.versions = [ - 'compileSdk': 34, - 'minSdk' : 14, - 'targetSdk' : 34, - 'buildTools': '34.0.0', + 'compileSdk': 35, + 'minSdk' : 19, + 'targetSdk' : 35, + 'buildTools': '35.0.0', 'androidx' : '1.13.1', - 'kotlin' : '1.9.21' + 'kotlin' : '1.9.24' ] repositories { diff --git a/dynamic-utils/src/main/java/com/pranavpandey/android/dynamic/util/DynamicSdkUtils.java b/dynamic-utils/src/main/java/com/pranavpandey/android/dynamic/util/DynamicSdkUtils.java index e5d9e23..1422ec8 100644 --- a/dynamic-utils/src/main/java/com/pranavpandey/android/dynamic/util/DynamicSdkUtils.java +++ b/dynamic-utils/src/main/java/com/pranavpandey/android/dynamic/util/DynamicSdkUtils.java @@ -516,23 +516,24 @@ public static boolean is34() { } /** - * Detects if the current API version is U or above. + * Detects if the current API version is 35 or above. * * @param equals {@code true} to check for equality. *

{@code false} to match greater than or equal. * - * @return {@code true} if the current API version is U or above. + * @return {@code true} if the current API version is 35 or above. */ - public static boolean isU(boolean equals) { - return is34() || (is33(equals) && isPreview()); + public static boolean is35(boolean equals) { + return equals ? Build.VERSION.SDK_INT == Build.VERSION_CODES.VANILLA_ICE_CREAM + : Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM; } /** - * Detects if the current API version is U or above. + * Detects if the current API version is 35 or above. * - * @return {@code true} if the current API version is U or above. + * @return {@code true} if the current API version is 35 or above. */ - public static boolean isU() { - return isU(false); + public static boolean is35() { + return is35(false); } }