Skip to content

Commit

Permalink
Target SDK 35 & Minimum SDK 19
Browse files Browse the repository at this point in the history
Build tools 35.0.0.
Update `sdk` utils to detect API 35.
  • Loading branch information
pranavpandey committed Jul 21, 2024
1 parent 5ef756c commit 8cddd26
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
* <p>{@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);
}
}

0 comments on commit 8cddd26

Please sign in to comment.