From 60bb27fa943569189e463cfe989917008fbd92cd Mon Sep 17 00:00:00 2001 From: jackkray Date: Wed, 3 Jul 2024 10:46:12 +0200 Subject: [PATCH 1/9] feat(health-sdk): Upgrade targetSdk PM-92 --- health-sdk/sdk/build.gradle.kts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/health-sdk/sdk/build.gradle.kts b/health-sdk/sdk/build.gradle.kts index 4161936612..406c38767a 100644 --- a/health-sdk/sdk/build.gradle.kts +++ b/health-sdk/sdk/build.gradle.kts @@ -19,7 +19,8 @@ android { } defaultConfig { minSdk = libs.versions.android.minSdk.get().toInt() - targetSdk = libs.versions.android.targetSdk.get().toInt() + testOptions.targetSdk = libs.versions.android.targetSdk.get().toInt() + lint.targetSdk = libs.versions.android.targetSdk.get().toInt() // Use the test runner with JUnit4 support testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" From fc2833dc67a74cd856632f0c43996d5a0c2700b5 Mon Sep 17 00:00:00 2001 From: jackkray Date: Wed, 3 Jul 2024 10:47:23 +0200 Subject: [PATCH 2/9] feat(core-api-library): Upgrade targetSdk PM-92 --- core-api-library/shared-tests/build.gradle.kts | 3 ++- health-api-library/library/build.gradle.kts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core-api-library/shared-tests/build.gradle.kts b/core-api-library/shared-tests/build.gradle.kts index b112ac1b65..3e274d9a70 100644 --- a/core-api-library/shared-tests/build.gradle.kts +++ b/core-api-library/shared-tests/build.gradle.kts @@ -14,7 +14,8 @@ android { } defaultConfig { minSdk = libs.versions.android.minSdk.get().toInt() - targetSdk = libs.versions.android.targetSdk.get().toInt() + testOptions.targetSdk = libs.versions.android.targetSdk.get().toInt() + lint.targetSdk = libs.versions.android.targetSdk.get().toInt() // Use the test runner with JUnit4 support testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" diff --git a/health-api-library/library/build.gradle.kts b/health-api-library/library/build.gradle.kts index ceed6bda6e..99e2f041d3 100644 --- a/health-api-library/library/build.gradle.kts +++ b/health-api-library/library/build.gradle.kts @@ -24,7 +24,8 @@ android { } defaultConfig { minSdk = libs.versions.android.minSdk.get().toInt() - targetSdk = libs.versions.android.targetSdk.get().toInt() + testOptions.targetSdk = libs.versions.android.targetSdk.get().toInt() + lint.targetSdk = libs.versions.android.targetSdk.get().toInt() // Use the test runner with JUnit4 support testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" From fea9c0733a6fbb0b08f950543547bc1aced061c9 Mon Sep 17 00:00:00 2001 From: jackkray Date: Wed, 3 Jul 2024 10:49:06 +0200 Subject: [PATCH 3/9] feat(core-api-library): Upgrade targetSd, fix related test PM-92 --- core-api-library/library/build.gradle.kts | 3 ++- .../gini/android/core/api/DocumentRemoteSourceTest.kt | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/core-api-library/library/build.gradle.kts b/core-api-library/library/build.gradle.kts index b39e4c95d2..fb9bfba157 100644 --- a/core-api-library/library/build.gradle.kts +++ b/core-api-library/library/build.gradle.kts @@ -16,7 +16,8 @@ android { } defaultConfig { minSdk = libs.versions.android.minSdk.get().toInt() - targetSdk = libs.versions.android.targetSdk.get().toInt() + testOptions.targetSdk = libs.versions.android.targetSdk.get().toInt() + lint.targetSdk = libs.versions.android.targetSdk.get().toInt() // Use the test runner with JUnit4 support testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" diff --git a/core-api-library/library/src/test/java/net/gini/android/core/api/DocumentRemoteSourceTest.kt b/core-api-library/library/src/test/java/net/gini/android/core/api/DocumentRemoteSourceTest.kt index 6e155d52ab..95a2fdc71d 100644 --- a/core-api-library/library/src/test/java/net/gini/android/core/api/DocumentRemoteSourceTest.kt +++ b/core-api-library/library/src/test/java/net/gini/android/core/api/DocumentRemoteSourceTest.kt @@ -9,6 +9,7 @@ import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.advanceUntilIdle import kotlinx.coroutines.test.runTest import net.gini.android.core.api.response.PaymentRequestResponse +import net.gini.android.core.api.response.PaymentResponse import net.gini.android.core.api.test.DocumentRemoteSourceForTests import net.gini.android.core.api.test.MockGiniApiType import okhttp3.RequestBody @@ -213,6 +214,14 @@ class DocumentRemoteSourceTest { return Response.success(listOf(PaymentRequestResponse(null, null, "", "", null, "", "", ""))) } + override suspend fun getPayment( + bearer: Map, + id: String + ): Response { + bearerAuthHeader = bearer["Authorization"] + return Response.success(PaymentResponse("", "", "", null, "", "" )) + } + override suspend fun getFile(bearer: Map, location: String): Response { bearerAuthHeader = bearer["Authorization"] return Response.success("response".toResponseBody()) From 59a412a230d5637d61b3ff4261f041693022ed19 Mon Sep 17 00:00:00 2001 From: jackkray Date: Wed, 3 Jul 2024 10:52:29 +0200 Subject: [PATCH 4/9] feat(capture-sdk): Upgrade targetSdk PM-92 --- capture-sdk/default-network/build.gradle.kts | 3 ++- capture-sdk/sdk/build.gradle.kts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/capture-sdk/default-network/build.gradle.kts b/capture-sdk/default-network/build.gradle.kts index 1cf57ee0e7..743efb34e2 100644 --- a/capture-sdk/default-network/build.gradle.kts +++ b/capture-sdk/default-network/build.gradle.kts @@ -25,7 +25,8 @@ android { } defaultConfig { minSdk = libs.versions.android.minSdk.get().toInt() - targetSdk = libs.versions.android.targetSdk.get().toInt() + testOptions.targetSdk = libs.versions.android.targetSdk.get().toInt() + lint.targetSdk = libs.versions.android.targetSdk.get().toInt() testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles("consumer-rules.pro") diff --git a/capture-sdk/sdk/build.gradle.kts b/capture-sdk/sdk/build.gradle.kts index e05a32e130..6297c1473b 100644 --- a/capture-sdk/sdk/build.gradle.kts +++ b/capture-sdk/sdk/build.gradle.kts @@ -24,7 +24,8 @@ android { } defaultConfig { minSdk = libs.versions.android.minSdk.get().toInt() - targetSdk = libs.versions.android.targetSdk.get().toInt() + testOptions.targetSdk = libs.versions.android.targetSdk.get().toInt() + lint.targetSdk = libs.versions.android.targetSdk.get().toInt() // Use the test runner with JUnit4 support testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" From 52e1146f442e2045198ef43e64effffb04f12bfd Mon Sep 17 00:00:00 2001 From: jackkray Date: Wed, 3 Jul 2024 10:53:30 +0200 Subject: [PATCH 5/9] feat(bank-sdk): Upgrade targetSdk PM-92 --- bank-sdk/sdk/build.gradle.kts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bank-sdk/sdk/build.gradle.kts b/bank-sdk/sdk/build.gradle.kts index 47789333f2..45da470834 100644 --- a/bank-sdk/sdk/build.gradle.kts +++ b/bank-sdk/sdk/build.gradle.kts @@ -26,7 +26,8 @@ android { } defaultConfig { minSdk = libs.versions.android.minSdk.get().toInt() - targetSdk = libs.versions.android.targetSdk.get().toInt() + testOptions.targetSdk = libs.versions.android.targetSdk.get().toInt() + lint.targetSdk = libs.versions.android.targetSdk.get().toInt() // Use the test runner with JUnit4 support testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" From a2709a16cbca29c4acb386d22d52648e4bfb5fbb Mon Sep 17 00:00:00 2001 From: jackkray Date: Wed, 3 Jul 2024 10:54:57 +0200 Subject: [PATCH 6/9] feat(bank-api): Upgrade targetSdk PM-92 --- bank-api-library/library/build.gradle.kts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bank-api-library/library/build.gradle.kts b/bank-api-library/library/build.gradle.kts index f98be00893..74c6a6b5e5 100644 --- a/bank-api-library/library/build.gradle.kts +++ b/bank-api-library/library/build.gradle.kts @@ -19,7 +19,8 @@ android { } defaultConfig { minSdk = libs.versions.android.minSdk.get().toInt() - targetSdk = libs.versions.android.targetSdk.get().toInt() + testOptions.targetSdk = libs.versions.android.targetSdk.get().toInt() + lint.targetSdk = libs.versions.android.targetSdk.get().toInt() // Use the test runner with JUnit4 support testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" From 9aac2c4e99e3ac40203a323150af367c6826da45 Mon Sep 17 00:00:00 2001 From: jackkray Date: Wed, 3 Jul 2024 10:56:31 +0200 Subject: [PATCH 7/9] feat(gini-mobile-android): Upgrade gradle wrapper, libs targetSdk PM-85 --- gradle/libs.versions.toml | 4 ++-- gradle/wrapper/gradle-wrapper.properties | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ed81015169..5f5c16a257 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,9 +1,9 @@ [versions] android-compileSdk = "34" android-minSdk = "21" -android-targetSdk = "33" +android-targetSdk = "34" kotlin = "1.8.20" -android-gradle-plugin = "8.2.1" +android-gradle-plugin = "8.4.2" dokka = "1.7.20" androidx-lifecycle = "2.7.0" androidx-camera = "1.3.1" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index cbaf4e4640..a6f0bdd495 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Wed Sep 29 16:01:46 CEST 2021 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME From 1e3dda721c79c49cc7fdc5c34a928f77646862cc Mon Sep 17 00:00:00 2001 From: jackkray Date: Wed, 3 Jul 2024 11:55:18 +0200 Subject: [PATCH 8/9] feat(gini_mobile_android): Upgrade roboelectric Old roboelectric lib doesn't support sdk 34, so some unit tests fails PM-92 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 5f5c16a257..9473f032d9 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -83,7 +83,7 @@ mlkit-textrecognition = "com.google.android.gms:play-services-mlkit-text-recogni apachecommons-imaging = "org.apache.commons:commons-imaging:1.0-alpha2" completableFuture = "org.glassfish.jersey.bundles.repackaged:jersey-jsr166e:2.25.1" truth = "com.google.truth:truth:1.1.3" -robolectric = "org.robolectric:robolectric:4.9" +robolectric = "org.robolectric:robolectric:4.12.2" dexter = "com.karumi:dexter:6.2.3" logback-android-core = "com.github.tony19:logback-android-core:1.1.1-6" logback-android-classic = "com.github.tony19:logback-android-classic:1.1.1-6" From 9daed17736f7525f8340d16fc35b6dd9ad869270 Mon Sep 17 00:00:00 2001 From: jackkray Date: Mon, 8 Jul 2024 11:41:03 +0200 Subject: [PATCH 9/9] ci(mobile-android): Change readLocalPropertiesToMap to readLocalPropertiesToMapSilent We need to mute readLocalPropertiesToMap, because during lint check call of injectProperties task throw an error PM-85 --- bank-api-library/library/build.gradle.kts | 2 +- bank-sdk/sdk/build.gradle.kts | 5 +++-- capture-sdk/default-network/build.gradle.kts | 2 +- health-api-library/library/build.gradle.kts | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/bank-api-library/library/build.gradle.kts b/bank-api-library/library/build.gradle.kts index 74c6a6b5e5..2a820657cf 100644 --- a/bank-api-library/library/build.gradle.kts +++ b/bank-api-library/library/build.gradle.kts @@ -114,7 +114,7 @@ tasks.register("injectTestProperties") { doFirst { propertiesMap.clear() - propertiesMap.putAll(readLocalPropertiesToMap(project, + propertiesMap.putAll(readLocalPropertiesToMapSilent(project, listOf("testClientId", "testClientSecret", "testApiUri", "testUserCenterUri", "testHealthApiUri"))) } diff --git a/bank-sdk/sdk/build.gradle.kts b/bank-sdk/sdk/build.gradle.kts index 45da470834..6d137fad0b 100644 --- a/bank-sdk/sdk/build.gradle.kts +++ b/bank-sdk/sdk/build.gradle.kts @@ -148,8 +148,9 @@ tasks.register("injectTestProperties") { doFirst { propertiesMap.clear() - propertiesMap.putAll(readLocalPropertiesToMap(project, - listOf("testClientId", "testClientSecret", "testApiUri", "testUserCenterUri"))) + propertiesMap.putAll(readLocalPropertiesToMapSilent(project, + listOf("testClientId", "testClientSecret", "testApiUri", "testUserCenterUri")) + ) } destinations.put( diff --git a/capture-sdk/default-network/build.gradle.kts b/capture-sdk/default-network/build.gradle.kts index 743efb34e2..98b43ac86c 100644 --- a/capture-sdk/default-network/build.gradle.kts +++ b/capture-sdk/default-network/build.gradle.kts @@ -120,7 +120,7 @@ tasks.register("injectTestProperties") { doFirst { propertiesMap.clear() - propertiesMap.putAll(readLocalPropertiesToMap(project, + propertiesMap.putAll(readLocalPropertiesToMapSilent(project, listOf("testClientId", "testClientSecret", "testApiUri", "testUserCenterUri"))) } diff --git a/health-api-library/library/build.gradle.kts b/health-api-library/library/build.gradle.kts index 99e2f041d3..fc85ee1657 100644 --- a/health-api-library/library/build.gradle.kts +++ b/health-api-library/library/build.gradle.kts @@ -125,7 +125,7 @@ tasks.register("injectTestProperties") { doFirst { propertiesMap.clear() - propertiesMap.putAll(readLocalPropertiesToMap(project, + propertiesMap.putAll(readLocalPropertiesToMapSilent(project, listOf("testClientId", "testClientSecret", "testApiUri", "testUserCenterUri", "testBankApiUri"))) }