From 18fda14c9740d51d527e0a55c6a99569b85e9694 Mon Sep 17 00:00:00 2001 From: Olga Miller Date: Wed, 14 Aug 2024 20:00:09 +0200 Subject: [PATCH] Updated gradle (SdkVersion 34), replaced deprecated 'buildDir', added (now required) 'buildConfig true', forced a specific version of Kotlin (to avoid the build error "Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules kotlin-stdlib-1.8.22.jar [..]") --- app/build.gradle | 13 ++++++++----- build.gradle | 11 +++++++++-- gradle/wrapper/gradle-wrapper.properties | 2 +- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index a71fdb2..9e9c9c4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,11 +1,11 @@ apply plugin: 'com.android.application' android { - compileSdk 33 + compileSdk 34 defaultConfig { applicationId "om.sstvencoder" - minSdkVersion 21 - targetSdkVersion 33 + minSdk 21 + targetSdk 34 versionCode 31 versionName "2.10" } @@ -16,10 +16,13 @@ android { } } namespace 'om.sstvencoder' + buildFeatures { + buildConfig true + } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation "androidx.exifinterface:exifinterface:1.3.6" + implementation 'androidx.appcompat:appcompat:1.7.0' + implementation "androidx.exifinterface:exifinterface:1.3.7" } diff --git a/build.gradle b/build.gradle index cebf864..eebf2cd 100644 --- a/build.gradle +++ b/build.gradle @@ -4,11 +4,18 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.4.2' + classpath 'com.android.tools.build:gradle:8.5.2' } } allprojects { + configurations.configureEach { + resolutionStrategy.eachDependency { details -> + if (details.requested.group == 'org.jetbrains.kotlin') { + details.useVersion "1.8.22" + } + } + } repositories { google() mavenCentral() @@ -16,5 +23,5 @@ allprojects { } tasks.register('clean', Delete) { - delete rootProject.buildDir + delete rootProject.layout.buildDirectory.get().asFile } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2ec77e5..d951fac 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists