[Android] Remove deprecated buildToolsVersion and fix the compileSdk deprecation

Nicolas Pomepuy git at videolan.org
Wed Dec 20 08:52:48 UTC 2023


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Dec 13 08:46:04 2023 +0100| [d5e23571d3c0822e567030d4e48557d8ce2d23bc] | committer: Duncan McNamara

Remove deprecated buildToolsVersion and fix the compileSdk deprecation

> https://code.videolan.org/videolan/vlc-android/commit/d5e23571d3c0822e567030d4e48557d8ce2d23bc
---

 application/app/build.gradle             | 3 +--
 application/donations/build.gradle       | 3 +--
 application/live-plot-graph/build.gradle | 3 +--
 application/mediadb/build.gradle         | 3 +--
 application/moviepedia/build.gradle      | 6 +++---
 application/resources/build.gradle       | 4 +---
 application/television/build.gradle      | 3 +--
 application/tools/build.gradle           | 3 +--
 application/vlc-android/build.gradle     | 3 +--
 application/webserver/build.gradle       | 2 +-
 build.gradle                             | 1 -
 medialibrary/build.gradle                | 3 +--
 12 files changed, 13 insertions(+), 24 deletions(-)

diff --git a/application/app/build.gradle b/application/app/build.gradle
index 8e59d9215e..ec6048049d 100644
--- a/application/app/build.gradle
+++ b/application/app/build.gradle
@@ -7,8 +7,6 @@ android {
         sourceCompatibility JavaVersion.VERSION_1_8
         targetCompatibility JavaVersion.VERSION_1_8
     }
-    compileSdkVersion rootProject.ext.compileSdkVersion
-    buildToolsVersion rootProject.ext.buildToolsVersion
 
     packagingOptions {
         jniLibs {
@@ -29,6 +27,7 @@ android {
         applicationId rootProject.ext.appId
         minSdkVersion rootProject.ext.minSdkVersion
         targetSdkVersion rootProject.ext.targetSdkVersion
+        compileSdk rootProject.ext.compileSdkVersion
         versionCode rootProject.ext.versionCode
         versionName rootProject.ext.versionName
         vectorDrawables.useSupportLibrary = true
diff --git a/application/donations/build.gradle b/application/donations/build.gradle
index cab4ed433e..5194fdbde9 100644
--- a/application/donations/build.gradle
+++ b/application/donations/build.gradle
@@ -26,8 +26,6 @@ apply plugin: 'com.android.library'
 apply plugin: 'kotlin-android'
 
 android {
-    compileSdkVersion rootProject.ext.compileSdkVersion
-    buildToolsVersion rootProject.ext.buildToolsVersion
 
     dataBinding {
         enabled = true
@@ -42,6 +40,7 @@ android {
     defaultConfig {
         minSdkVersion rootProject.ext.minSdkVersion
         targetSdkVersion rootProject.ext.targetSdkVersion
+        compileSdk rootProject.ext.compileSdkVersion
 
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
         consumerProguardFiles 'consumer-rules.pro'
diff --git a/application/live-plot-graph/build.gradle b/application/live-plot-graph/build.gradle
index 148b312464..fad7cc6425 100644
--- a/application/live-plot-graph/build.gradle
+++ b/application/live-plot-graph/build.gradle
@@ -26,12 +26,11 @@ apply plugin: 'com.android.library'
 apply plugin: 'kotlin-android'
 
 android {
-    compileSdkVersion rootProject.ext.compileSdkVersion
-    buildToolsVersion rootProject.ext.buildToolsVersion
 
     defaultConfig {
         minSdkVersion rootProject.ext.minSdkVersion
         targetSdkVersion rootProject.ext.targetSdkVersion
+        compileSdk rootProject.ext.compileSdkVersion
 
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
         consumerProguardFiles 'consumer-rules.pro'
diff --git a/application/mediadb/build.gradle b/application/mediadb/build.gradle
index 215938d422..881e8ae337 100644
--- a/application/mediadb/build.gradle
+++ b/application/mediadb/build.gradle
@@ -27,8 +27,6 @@ apply plugin: 'kotlin-android'
 apply plugin: 'kotlin-kapt'
 
 android {
-    compileSdkVersion rootProject.ext.compileSdkVersion
-    buildToolsVersion rootProject.ext.buildToolsVersion
 
     packagingOptions {
         jniLibs {
@@ -40,6 +38,7 @@ android {
     defaultConfig {
         minSdkVersion rootProject.ext.minSdkVersion
         targetSdkVersion rootProject.ext.targetSdkVersion
+        compileSdk rootProject.ext.compileSdkVersion
 
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
         consumerProguardFiles 'consumer-rules.pro'
diff --git a/application/moviepedia/build.gradle b/application/moviepedia/build.gradle
index d848df643f..c872c874b6 100644
--- a/application/moviepedia/build.gradle
+++ b/application/moviepedia/build.gradle
@@ -3,8 +3,6 @@ apply plugin: 'kotlin-android'
 apply plugin: 'kotlin-kapt'
 
 android {
-    compileSdkVersion rootProject.ext.compileSdkVersion
-    buildToolsVersion rootProject.ext.buildToolsVersion
 
     dataBinding {
         enabled = true
@@ -19,10 +17,12 @@ android {
     defaultConfig {
         minSdkVersion rootProject.ext.minSdkVersion
         targetSdkVersion rootProject.ext.targetSdkVersion
-        buildConfigField 'int', 'VLC_VERSION_CODE', "${rootProject.ext.versionCode}"
+        compileSdk rootProject.ext.compileSdkVersion
 
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
         consumerProguardFiles 'consumer-rules.pro'
+
+        buildConfigField 'int', 'VLC_VERSION_CODE', "${rootProject.ext.versionCode}"
         buildConfigField "String", "MOVIEPEDIA_API_URL", "\"${getMoviepediaUrl(project)}\""
         multiDexEnabled true
     }
diff --git a/application/resources/build.gradle b/application/resources/build.gradle
index 54e89b1949..26c7b02e19 100644
--- a/application/resources/build.gradle
+++ b/application/resources/build.gradle
@@ -2,8 +2,6 @@ apply plugin: 'com.android.library'
 apply plugin: 'kotlin-android'
 
 android {
-    compileSdkVersion rootProject.ext.compileSdkVersion
-    buildToolsVersion rootProject.ext.buildToolsVersion
 
     packagingOptions {
         jniLibs {
@@ -14,7 +12,7 @@ android {
 
     defaultConfig {
         minSdkVersion rootProject.ext.minSdkVersion
-
+        compileSdk rootProject.ext.compileSdkVersion
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
         buildConfigField "String", "APP_ID", "\"${rootProject.ext.appId}\""
         vectorDrawables.useSupportLibrary = true
diff --git a/application/television/build.gradle b/application/television/build.gradle
index 1baee141ac..e67465e1e7 100644
--- a/application/television/build.gradle
+++ b/application/television/build.gradle
@@ -4,8 +4,6 @@ apply plugin: 'kotlin-kapt'
 apply plugin: 'kotlin-parcelize'
 
 android {
-    compileSdkVersion rootProject.ext.compileSdkVersion
-    buildToolsVersion rootProject.ext.buildToolsVersion
 
     packagingOptions {
         jniLibs {
@@ -20,6 +18,7 @@ android {
     defaultConfig {
         minSdkVersion rootProject.ext.minSdkVersion
         targetSdkVersion rootProject.ext.targetSdkVersion
+        compileSdk rootProject.ext.compileSdkVersion
 
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
         consumerProguardFiles 'consumer-rules.pro'
diff --git a/application/tools/build.gradle b/application/tools/build.gradle
index e870e2cadb..de61fa07b1 100644
--- a/application/tools/build.gradle
+++ b/application/tools/build.gradle
@@ -2,12 +2,11 @@ apply plugin: 'com.android.library'
 apply plugin: 'kotlin-android'
 
 android {
-    compileSdkVersion rootProject.ext.compileSdkVersion
-    buildToolsVersion rootProject.ext.buildToolsVersion
 
     defaultConfig {
         minSdkVersion rootProject.ext.minSdkVersion
         targetSdkVersion rootProject.ext.targetSdkVersion
+        compileSdk rootProject.ext.compileSdkVersion
 
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
 
diff --git a/application/vlc-android/build.gradle b/application/vlc-android/build.gradle
index e71e8e6f9a..d0def83fee 100644
--- a/application/vlc-android/build.gradle
+++ b/application/vlc-android/build.gradle
@@ -4,8 +4,6 @@ apply plugin: 'kotlin-kapt'
 apply plugin: 'kotlin-parcelize'
 
 android {
-    compileSdkVersion rootProject.ext.compileSdkVersion
-    buildToolsVersion rootProject.ext.buildToolsVersion
 
     dataBinding {
         enabled = true
@@ -41,6 +39,7 @@ android {
 
         minSdkVersion rootProject.ext.minSdkVersion
         targetSdkVersion rootProject.ext.targetSdkVersion
+        compileSdk rootProject.ext.compileSdkVersion
         vectorDrawables.useSupportLibrary = true
     }
 
diff --git a/application/webserver/build.gradle b/application/webserver/build.gradle
index 80e9abf91e..898aa0af3e 100644
--- a/application/webserver/build.gradle
+++ b/application/webserver/build.gradle
@@ -5,7 +5,6 @@ plugins {
 
 android {
     namespace 'org.videolan.vlc.webserver'
-    compileSdkVersion rootProject.ext.compileSdkVersion
 
     dataBinding {
         enabled = true
@@ -15,6 +14,7 @@ android {
         multiDexEnabled true
         minSdkVersion rootProject.ext.minSdkVersion
         targetSdkVersion rootProject.ext.targetSdkVersion
+        compileSdk rootProject.ext.compileSdkVersion
 
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
         consumerProguardFiles "consumer-rules.pro"
diff --git a/build.gradle b/build.gradle
index c447403fa8..1e627852f4 100644
--- a/build.gradle
+++ b/build.gradle
@@ -47,7 +47,6 @@ ext {
     minSdkVersion = 17
     targetSdkVersion = 34
     compileSdkVersion = 34
-    buildToolsVersion = '33.0.1'
     androidxLegacyVersion = '1.0.0'
     androidxCoreVersion = '1.7.0'
     appCompatVersion = '1.4.1'
diff --git a/medialibrary/build.gradle b/medialibrary/build.gradle
index b21cf8d1fc..497290338c 100644
--- a/medialibrary/build.gradle
+++ b/medialibrary/build.gradle
@@ -33,12 +33,11 @@ android {
         sourceCompatibility JavaVersion.VERSION_1_8
         targetCompatibility JavaVersion.VERSION_1_8
     }
-    compileSdkVersion rootProject.ext.compileSdkVersion
-    buildToolsVersion rootProject.ext.buildToolsVersion
 
     defaultConfig {
         minSdkVersion rootProject.ext.minSdkVersion
         targetSdkVersion rootProject.ext.targetSdkVersion
+        compileSdk rootProject.ext.compileSdkVersion
     }
 
     sourceSets {



More information about the Android mailing list