diff --git a/android-client-sdk/build.gradle b/android-client-sdk/build.gradle index 4af2cdee..200933fd 100644 --- a/android-client-sdk/build.gradle +++ b/android-client-sdk/build.gradle @@ -4,8 +4,8 @@ plugins { id "com.vanniktech.maven.publish" version "0.30.0" id 'de.mannodermaus.android-junit5' } -import com.vanniktech.maven.publish.SonatypeHost +import com.vanniktech.maven.publish.SonatypeHost group = "com.devcycle" version = "2.3.2" @@ -17,11 +17,11 @@ mavenPublishing { } android { - compileSdk 33 + compileSdk 35 defaultConfig { minSdk 23 - targetSdk 33 + targetSdk 35 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testBuildType "minified" @@ -92,29 +92,29 @@ ext { POM_DEVELOPER_NAME='DevCycle SDK Group' POM_DEVELOPER_URL='https://devcycle.com' - androidx_version = '1.8.0' - retrofit_version = "2.9.0" - swagger_annotations_version = '2.2.21' - jackson_version = "2.13.5" - jackson_kotlin_version = "2.13.5" + androidx_version = '1.15.0' + retrofit_version = "2.11.0" + swagger_annotations_version = '2.2.26' + jackson_version = "2.18.2" + jackson_kotlin_version = "2.18.2" //noinspection DuplicatePlatformClasses - jackson_jparser_version = "2.13.5" + jackson_jparser_version = "2.18.2" gson_mapper_version = "2.8.6" - coroutines_version = '1.6.2' - kotlin_reflect_version = '1.9.0' - - junit_version = "5.8.2" - mockito_core_version = '4.6.1' - mockito_inline_version = '2.13.0' - mockk_version = '1.13.10' - hamcrest_version = "2.2" - okhttp_version = "4.9.3" + coroutines_version = '1.10.1' + kotlin_reflect_version = '2.1.20' + + junit_version = "5.11.4" + mockito_core_version = '5.14.2' + mockito_inline_version = '5.2.0' + mockk_version = '1.13.14' + hamcrest_version = "3.0" + okhttp_version = "4.12.0" okhttp_eventsource_version = "4.1.1" - kotlin_version = '1.9.0' + kotlin_version = '2.1.20' android_core_version = "2.2.0" - androidx_junit_version = "1.1.3" - espresso_core_version = "3.4.0" + androidx_junit_version = "1.2.1" + espresso_core_version = "3.6.1" } dependencies { @@ -153,7 +153,7 @@ dependencies { testImplementation("com.squareup.okhttp3:mockwebserver:$okhttp_version") testImplementation("androidx.arch.core:core-testing:$android_core_version") - testImplementation("org.json:json:20190722") + testImplementation("org.json:json:20240303") androidTestImplementation("androidx.test.ext:junit:$androidx_junit_version") androidTestImplementation("androidx.test.espresso:espresso-core:$espresso_core_version") diff --git a/android-client-sdk/proguard-rules.pro b/android-client-sdk/proguard-rules.pro index 34dcac97..3262fc3b 100644 --- a/android-client-sdk/proguard-rules.pro +++ b/android-client-sdk/proguard-rules.pro @@ -22,8 +22,27 @@ # TODO: Update all retrofit rules when retrofit 5 is released. +# Keep essential DevCycle SDK classes and their public APIs -keep class kotlin.Metadata { *; } -keep class com.devcycle.sdk.android.model.** { *; } +-keep class com.devcycle.sdk.android.api.DevCycleClient { *; } +-keep class com.devcycle.sdk.android.api.DevCycleClient$* { *; } +-keep class com.devcycle.sdk.android.api.DevCycleOptions { *; } +-keep class com.devcycle.sdk.android.api.** { *; } + +# Keep utility classes needed for SDK functionality and testing +-keep class com.devcycle.sdk.android.util.** { *; } + +# Keep exception classes +-keep class com.devcycle.sdk.android.exception.** { *; } + +# Keep listener interfaces +-keep class com.devcycle.sdk.android.listener.** { *; } + +# Keep interceptor classes +-keep class com.devcycle.sdk.android.interceptor.** { *; } + +# Jackson and JSON processing -keep class java.beans.Transient.** {*;} -keep class java.beans.ConstructorProperties.** {*;} -keep class java.nio.file.Path.** {*;} @@ -35,6 +54,7 @@ -dontwarn retrofit2.KotlinExtensions -dontwarn retrofit2.KotlinExtensions$* +# OkHttp and networking -dontwarn org.bouncycastle.jsse.BCSSLParameters -dontwarn org.bouncycastle.jsse.BCSSLSocket -dontwarn org.bouncycastle.jsse.provider.BouncyCastleJsseProvider @@ -45,18 +65,13 @@ -dontwarn org.openjsse.javax.net.ssl.SSLSocket -dontwarn org.openjsse.net.ssl.OpenJSSE -# Ignore annotation used for build tooling. -#-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement - +# Retrofit rules -keep,allowobfuscation,allowshrinking interface retrofit2.Call -keep,allowobfuscation,allowshrinking class retrofit2.Response -keep,allowobfuscation,allowshrinking class okhttp3.RequestBody -keep,allowobfuscation,allowshrinking class okhttp3.ResponseBody - -# IMPORTANT: This ensures R8 Will not strip our JSONMapper and Coroutine classes --keep,allowobfuscation,allowshrinking class com.devcycle.sdk.android.** - +# Keep coroutines -keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation # Retrofit does reflection on generic parameters. InnerClasses is required to use Signature and diff --git a/build.gradle b/build.gradle index ccddb5fe..abd61773 100644 --- a/build.gradle +++ b/build.gradle @@ -6,9 +6,9 @@ buildscript { maven { url "https://plugins.gradle.org/m2/" } } dependencies { - classpath 'com.android.tools.build:gradle:8.1.0' - classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0' - classpath "de.mannodermaus.gradle.plugins:android-junit5:1.8.2.1" + classpath 'com.android.tools.build:gradle:8.10.1' + classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:2.1.20' + classpath "de.mannodermaus.gradle.plugins:android-junit5:1.11.2.0" } } task clean(type: Delete) { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3499ded5..4eaec467 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/java-example/build.gradle b/java-example/build.gradle index 8198bc08..b5a5eae8 100644 --- a/java-example/build.gradle +++ b/java-example/build.gradle @@ -3,14 +3,14 @@ plugins { } android { - compileSdk 33 + compileSdk 35 namespace 'com.devcycle.javaexample' defaultConfig { applicationId "com.devcycle.javaexample" minSdk 23 - targetSdk 33 + targetSdk 35 versionCode 1 versionName "1.0" @@ -39,11 +39,11 @@ android { } dependencies { - implementation 'androidx.appcompat:appcompat:1.4.1' - implementation 'com.google.android.material:material:1.5.0' + implementation 'androidx.appcompat:appcompat:1.7.0' + implementation 'com.google.android.material:material:1.12.0' implementation(project(":android-client-sdk")) } -task wrapper(type: Wrapper){ - gradleVersion = '7.4' +task wrapper(type: Wrapper) { + gradleVersion = '8.11.1' } \ No newline at end of file diff --git a/kotlin-example/build.gradle b/kotlin-example/build.gradle index 67277b01..baa24a48 100644 --- a/kotlin-example/build.gradle +++ b/kotlin-example/build.gradle @@ -4,13 +4,13 @@ plugins { } android { - compileSdk 33 + compileSdk 35 namespace 'com.devcycle.kotlinexample' defaultConfig { applicationId "com.devcycle.example" minSdk 23 - targetSdk 33 + targetSdk 35 versionCode 1 versionName "1.0" @@ -45,12 +45,12 @@ android { } dependencies { - implementation 'androidx.core:core-ktx:1.7.0' - implementation 'androidx.appcompat:appcompat:1.4.1' - implementation 'com.google.android.material:material:1.5.0' + implementation 'androidx.core:core-ktx:1.15.0' + implementation 'androidx.appcompat:appcompat:1.7.0' + implementation 'com.google.android.material:material:1.12.0' implementation(project(":android-client-sdk")) } task wrapper(type: Wrapper){ - gradleVersion = '7.4' + gradleVersion = '8.11.1' } \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 8fdabdc1..170765a6 100644 --- a/settings.gradle +++ b/settings.gradle @@ -3,7 +3,6 @@ dependencyResolutionManagement { repositories { google() mavenCentral() - jcenter() // Warning: this repository is going to shut down soon maven { url "https://jitpack.io" } } }