From c1c4ef13bd953f18c6e7d9835481ac230f9d3321 Mon Sep 17 00:00:00 2001 From: Petros Douvantzis Date: Fri, 12 Dec 2025 12:32:55 +0200 Subject: [PATCH] Update Gradle Android unit test deployment was broken at some point. Updating Gradle and some other changed helped. Updated to Gradle 8.2 and AGP 8.2.2 --- TransifexNativeSDK/app/build.gradle | 5 ++++- TransifexNativeSDK/build.gradle | 2 +- TransifexNativeSDK/gradle.properties | 2 -- TransifexNativeSDK/gradle/wrapper/gradle-wrapper.properties | 6 +++--- TransifexNativeSDK/txsdk/build.gradle | 5 ++++- .../com/transifex/txnative/cache/TxStandardCacheTest.java | 2 +- 6 files changed, 13 insertions(+), 9 deletions(-) diff --git a/TransifexNativeSDK/app/build.gradle b/TransifexNativeSDK/app/build.gradle index 33e24dc..d72766d 100644 --- a/TransifexNativeSDK/app/build.gradle +++ b/TransifexNativeSDK/app/build.gradle @@ -39,6 +39,10 @@ android { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } + + buildFeatures { + buildConfig = true + } } // Uncomment in combination with "setCompatVectorFromResourcesEnabled()" in "MyApplication" to @@ -50,7 +54,6 @@ android { //} dependencies { - implementation fileTree(dir: "libs", include: ["*.jar"]) implementation "androidx.appcompat:appcompat:$versions.appcompat" implementation "com.google.android.material:material:$versions.material" implementation 'androidx.constraintlayout:constraintlayout:2.1.4' diff --git a/TransifexNativeSDK/build.gradle b/TransifexNativeSDK/build.gradle index 657096d..2ca24e1 100644 --- a/TransifexNativeSDK/build.gradle +++ b/TransifexNativeSDK/build.gradle @@ -33,7 +33,7 @@ buildscript { plugins { id "io.github.gradle-nexus.publish-plugin" version "2.0.0" - id 'com.android.application' version '8.1.0' apply false + id 'com.android.application' version '8.2.2' apply false id 'com.android.library' version '8.1.0' apply false id 'org.jetbrains.kotlin.android' version '1.9.20' apply false } diff --git a/TransifexNativeSDK/gradle.properties b/TransifexNativeSDK/gradle.properties index 99bd2ad..8cd4f06 100644 --- a/TransifexNativeSDK/gradle.properties +++ b/TransifexNativeSDK/gradle.properties @@ -18,7 +18,5 @@ android.useAndroidX=true # Automatically convert third-party libraries to use AndroidX android.enableJetifier=true -# https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes#default-changes -android.defaults.buildfeatures.buildconfig=true android.nonTransitiveRClass=false android.nonFinalResIds=false \ No newline at end of file diff --git a/TransifexNativeSDK/gradle/wrapper/gradle-wrapper.properties b/TransifexNativeSDK/gradle/wrapper/gradle-wrapper.properties index a9b6427..243d0cf 100644 --- a/TransifexNativeSDK/gradle/wrapper/gradle-wrapper.properties +++ b/TransifexNativeSDK/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Sep 20 14:45:43 EEST 2021 +#Fri Dec 12 11:57:17 EET 2025 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip distributionPath=wrapper/dists -zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/TransifexNativeSDK/txsdk/build.gradle b/TransifexNativeSDK/txsdk/build.gradle index 2855e0c..bdcc9f3 100644 --- a/TransifexNativeSDK/txsdk/build.gradle +++ b/TransifexNativeSDK/txsdk/build.gradle @@ -50,6 +50,10 @@ android { withSourcesJar() } } + + buildFeatures { + buildConfig = true + } } tasks.withType(Test).configureEach { @@ -63,7 +67,6 @@ configurations.configureEach { } dependencies { - implementation fileTree(dir: "libs", include: ["*.jar"]) compileOnly "androidx.annotation:annotation:$versions.androidXAnnotation" implementation "androidx.appcompat:appcompat:$versions.appcompat" compileOnly "com.google.android.material:material:$versions.material" diff --git a/TransifexNativeSDK/txsdk/src/androidTest/java/com/transifex/txnative/cache/TxStandardCacheTest.java b/TransifexNativeSDK/txsdk/src/androidTest/java/com/transifex/txnative/cache/TxStandardCacheTest.java index 2544c98..dea54bf 100644 --- a/TransifexNativeSDK/txsdk/src/androidTest/java/com/transifex/txnative/cache/TxStandardCacheTest.java +++ b/TransifexNativeSDK/txsdk/src/androidTest/java/com/transifex/txnative/cache/TxStandardCacheTest.java @@ -14,7 +14,7 @@ import java.io.File; import java.lang.reflect.Field; -import androidx.test.espresso.core.internal.deps.guava.util.concurrent.MoreExecutors; +import com.google.common.util.concurrent.MoreExecutors; import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.filters.SmallTest; import androidx.test.platform.app.InstrumentationRegistry;