diff --git a/bank-api-library/library/build.gradle.kts b/bank-api-library/library/build.gradle.kts index f98be00893..2a820657cf 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" @@ -113,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/example-app/src/main/AndroidManifest.xml b/bank-sdk/example-app/src/main/AndroidManifest.xml index 806bed0e97..0761fff595 100644 --- a/bank-sdk/example-app/src/main/AndroidManifest.xml +++ b/bank-sdk/example-app/src/main/AndroidManifest.xml @@ -4,7 +4,7 @@ ("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 1cf57ee0e7..98b43ac86c 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") @@ -119,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/capture-sdk/sdk/build.gradle.kts b/capture-sdk/sdk/build.gradle.kts index 798801c948..b7e5be420e 100644 --- a/capture-sdk/sdk/build.gradle.kts +++ b/capture-sdk/sdk/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() // Use the test runner with JUnit4 support testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" diff --git a/capture-sdk/sdk/src/main/AndroidManifest.xml b/capture-sdk/sdk/src/main/AndroidManifest.xml index f2d08a4813..605aeb22bb 100644 --- a/capture-sdk/sdk/src/main/AndroidManifest.xml +++ b/capture-sdk/sdk/src/main/AndroidManifest.xml @@ -1,5 +1,6 @@ @@ -18,6 +19,16 @@ + + + + + + + uriList) { + if (mFragment.getActivity() == null) + return; + + handleMultiPageDocumentAndCallListener(mFragment.getActivity(), new Intent(Intent.ACTION_PICK), uriList); + } + private boolean isImage(@NonNull final Intent data, @NonNull final Activity activity) { return IntentHelper.hasMimeTypeWithPrefix(data, activity, MimeType.IMAGE_PREFIX.asString()); } diff --git a/capture-sdk/sdk/src/main/java/net/gini/android/capture/internal/camera/api/camerax/CameraXController.kt b/capture-sdk/sdk/src/main/java/net/gini/android/capture/internal/camera/api/camerax/CameraXController.kt index f76c590713..7ba42658d4 100644 --- a/capture-sdk/sdk/src/main/java/net/gini/android/capture/internal/camera/api/camerax/CameraXController.kt +++ b/capture-sdk/sdk/src/main/java/net/gini/android/capture/internal/camera/api/camerax/CameraXController.kt @@ -135,7 +135,7 @@ internal class CameraXController(val activity: Activity) : CameraInterface { val imageAnalysis = ImageAnalysis.Builder() .setBackpressureStrategy(ImageAnalysis.STRATEGY_KEEP_ONLY_LATEST) - .setTargetResolution(targetResolution) + .setResolutionSelector(resolutionSelector) .setTargetRotation(targetRotation) .build() imageAnalysisUseCase = imageAnalysis diff --git a/capture-sdk/sdk/src/main/java/net/gini/android/capture/internal/fileimport/FileChooserFragment.kt b/capture-sdk/sdk/src/main/java/net/gini/android/capture/internal/fileimport/FileChooserFragment.kt index f70df41fbb..933241dc85 100644 --- a/capture-sdk/sdk/src/main/java/net/gini/android/capture/internal/fileimport/FileChooserFragment.kt +++ b/capture-sdk/sdk/src/main/java/net/gini/android/capture/internal/fileimport/FileChooserFragment.kt @@ -7,6 +7,7 @@ import android.app.Dialog import android.content.Context import android.content.Intent import android.content.pm.ResolveInfo +import android.net.Uri import android.os.Build import android.os.Bundle import android.os.Parcelable @@ -15,7 +16,9 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.activity.result.ActivityResultLauncher +import androidx.activity.result.PickVisualMediaRequest import androidx.activity.result.contract.ActivityResultContracts +import androidx.core.content.ContextCompat import androidx.fragment.app.setFragmentResult import androidx.navigation.fragment.findNavController import androidx.recyclerview.widget.GridLayoutManager @@ -30,6 +33,7 @@ import net.gini.android.capture.R import net.gini.android.capture.databinding.GcFragmentFileChooserBinding import net.gini.android.capture.internal.fileimport.providerchooser.ProvidersAdapter import net.gini.android.capture.internal.fileimport.providerchooser.ProvidersAppItem +import net.gini.android.capture.internal.fileimport.providerchooser.ProvidersAppWrapperItem import net.gini.android.capture.internal.fileimport.providerchooser.ProvidersItem import net.gini.android.capture.internal.fileimport.providerchooser.ProvidersSectionItem import net.gini.android.capture.internal.fileimport.providerchooser.ProvidersSeparatorItem @@ -57,6 +61,7 @@ class FileChooserFragment : BottomSheetDialogFragment() { private var docImportEnabledFileTypes: DocumentImportEnabledFileTypes? = null private var binding: GcFragmentFileChooserBinding by autoCleared() private var chooseFileLauncher: ActivityResultLauncher? = null + private var pickMedia: ActivityResultLauncher? = null private lateinit var mUserAnalyticsEventTracker: UserAnalyticsEventTracker private val screenName: UserAnalyticsScreen = UserAnalyticsScreen.Camera @@ -152,6 +157,46 @@ class FileChooserFragment : BottomSheetDialogFragment() { }) } } + + val photoPickType = + if (FeatureConfiguration.isMultiPageEnabled()) { + ActivityResultContracts.PickMultipleVisualMedia(maxItems = 10) + } else { + ActivityResultContracts.PickVisualMedia() + } + + pickMedia = registerForActivityResult(photoPickType) { activityResultUriList -> + findNavController().popBackStack() + val resultList = handleUriList(activityResultUriList) + setFragmentResult(REQUEST_KEY, Bundle().apply { + putParcelable(RESULT_KEY, resultList) + }) + } + } + + private fun handleUriList(activityResultUriList: Any?): FileChooserResult { + return if (activityResultUriList == null) { + FileChooserResult.Cancelled + } else { + try { + val uriList = when(activityResultUriList){ + is Uri -> listOf(activityResultUriList) + is List<*> -> { + activityResultUriList.filterIsInstance().takeIf { + it.size == activityResultUriList.size + } ?: throw IllegalArgumentException("List contains non-Uri elements") + } + else -> throw IllegalArgumentException("uri is neither Uri nor List") + } + if (uriList.isNotEmpty()) { + FileChooserResult.FilesSelectedUri(uriList) + } else { + FileChooserResult.Cancelled + } + } catch (e: IllegalArgumentException) { + FileChooserResult.Error(GiniCaptureError(GiniCaptureError.ErrorCode.DOCUMENT_IMPORT, e.message)) + } + } } private fun getGridSpanCount(): Int = @@ -164,15 +209,20 @@ class FileChooserFragment : BottomSheetDialogFragment() { private fun populateFileProviders() { val providerItems: MutableList = ArrayList() - var imageProviderItems: List = ArrayList() + var imageProviderItems: List = arrayListOf() var pdfProviderItems: List = ArrayList() if (shouldShowImageProviders()) { val imagePickerResolveInfos = queryImagePickers(requireContext()) val imageProviderResolveInfos = queryImageProviders(requireContext()) - imageProviderItems = getImageProviderItems( - imagePickerResolveInfos, - imageProviderResolveInfos - ) + + imageProviderItems = + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && + ActivityResultContracts.PickVisualMedia.isPhotoPickerAvailable(requireContext()) + ) { + getPhotoPickerProvider() + } else { + getImageProviderItems(imagePickerResolveInfos, imageProviderResolveInfos) + } } if (shouldShowPdfProviders()) { val pdfProviderResolveInfos = queryPdfProviders(requireContext()) @@ -204,12 +254,26 @@ class FileChooserFragment : BottomSheetDialogFragment() { } } - private fun launchApp(item: ProvidersAppItem) { - item.intent.setClassName( - item.resolveInfo.activityInfo.packageName, - item.resolveInfo.activityInfo.name - ) - chooseFileLauncher?.launch(item.intent) + private fun launchApp(item: ProvidersItem) { + when (item) { + is ProvidersAppItem -> { + item.intent.setClassName( + item.resolveInfo.activityInfo.packageName, + item.resolveInfo.activityInfo.name + ) + chooseFileLauncher?.launch(item.intent) + } + + is ProvidersAppWrapperItem -> { + pickMedia?.launch( + PickVisualMediaRequest( + ActivityResultContracts.PickVisualMedia.SingleMimeType( + MimeType.IMAGE_WILDCARD.asString() + ) + ) + ) + } + } } private fun getImageProviderItems( @@ -233,6 +297,23 @@ class FileChooserFragment : BottomSheetDialogFragment() { } } + private fun getPhotoPickerProvider(): List { + val providerList = + ContextCompat.getDrawable(requireContext(), (R.drawable.gc_photo_picker_app_icon)) + ?.let { image -> + listOf( + ProvidersSectionItem(getString(R.string.gc_file_chooser_fotos_section_header)), + ProvidersAppWrapperItem( + image, + getString(R.string.gc_file_chooser_fotos_section_header) + ) + ) + } ?: run { + emptyList() + } + return providerList + } + private fun getPdfProviderItems(pdfProviderResolveInfos: List): List = mutableListOf().apply { if (pdfProviderResolveInfos.isNotEmpty()) { @@ -340,6 +421,7 @@ class FileChooserFragment : BottomSheetDialogFragment() { @Parcelize sealed class FileChooserResult : Parcelable { data class FilesSelected(val dataIntent: Intent) : FileChooserResult() + data class FilesSelectedUri(val list: List) : FileChooserResult() data class Error(val error: GiniCaptureError) : FileChooserResult() object Cancelled : FileChooserResult() } diff --git a/capture-sdk/sdk/src/main/java/net/gini/android/capture/internal/fileimport/providerchooser/ProvidersAdapter.java b/capture-sdk/sdk/src/main/java/net/gini/android/capture/internal/fileimport/providerchooser/ProvidersAdapter.java index 7a672cb21f..8728015502 100644 --- a/capture-sdk/sdk/src/main/java/net/gini/android/capture/internal/fileimport/providerchooser/ProvidersAdapter.java +++ b/capture-sdk/sdk/src/main/java/net/gini/android/capture/internal/fileimport/providerchooser/ProvidersAdapter.java @@ -40,12 +40,14 @@ public int getItemViewType(final int position) { @Override public ProvidersItemViewHolder onCreateViewHolder(final ViewGroup parent, - final int viewType) { + final int viewType) { switch (ProvidersItem.FileProviderItemType.fromOrdinal(viewType)) { case SECTION: return createSectionItemViewHolder(parent); case APP: - return createAppItemViewHolder(parent); + return createAppItemViewHolder(parent, ProvidersItem.FileProviderItemType.APP); + case APP_WRAPPER_PHOTO_PICKER: + return createAppItemViewHolder(parent, ProvidersItem.FileProviderItemType.APP_WRAPPER_PHOTO_PICKER); case SEPARATOR: return createSeparatorItemViewHolder(parent); default: @@ -62,10 +64,12 @@ private ProvidersItemViewHolder createSectionItemViewHolder( } @NonNull - private ProvidersItemViewHolder createAppItemViewHolder(@NonNull final ViewGroup parent) { + private ProvidersItemViewHolder createAppItemViewHolder( + @NonNull final ViewGroup parent, + @NonNull ProvidersItem.FileProviderItemType providerItemType) { final View itemView = LayoutInflater.from(parent.getContext()) .inflate(R.layout.gc_item_file_provider_app, parent, false); - return new ProvidersAppItemViewHolder(itemView); + return new ProvidersAppItemViewHolder(itemView, providerItemType); } private ProvidersItemViewHolder createSeparatorItemViewHolder(@NonNull final ViewGroup parent) { @@ -83,6 +87,9 @@ public void onBindViewHolder(final ProvidersItemViewHolder holder, final int pos case APP: bindAppItemViewHolder((ProvidersAppItemViewHolder) holder, position); break; + case APP_WRAPPER_PHOTO_PICKER: + bindAppWrapperItemViewHolder((ProvidersAppItemViewHolder) holder, position); + break; case SEPARATOR: break; default: @@ -101,13 +108,22 @@ private void bindAppItemViewHolder(@NonNull final ProvidersAppItemViewHolder hol final ProvidersAppItem item = (ProvidersAppItem) mItems.get(position); holder.icon.setImageDrawable(item.getResolveInfo().loadIcon(mContext.getPackageManager())); holder.label.setText(item.getResolveInfo().loadLabel(mContext.getPackageManager())); - holder.itemView.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(final View view) { - final ProvidersAppItem item = - (ProvidersAppItem) mItems.get(holder.getAdapterPosition()); - mItemSelectedListener.onItemSelected(item); - } + holder.itemView.setOnClickListener(view -> { + final ProvidersAppItem selectedItem = + (ProvidersAppItem) mItems.get(holder.getAdapterPosition()); + mItemSelectedListener.onItemSelected(selectedItem); + }); + } + + private void bindAppWrapperItemViewHolder(@NonNull final ProvidersAppItemViewHolder holder, + final int position) { + final ProvidersAppWrapperItem item = (ProvidersAppWrapperItem) mItems.get(position); + holder.icon.setImageDrawable(item.getDrawableIcon()); + holder.label.setText(item.getText()); + holder.itemView.setOnClickListener(view -> { + final ProvidersAppWrapperItem selectedItem = + (ProvidersAppWrapperItem) mItems.get(holder.getAdapterPosition()); + mItemSelectedListener.onItemSelected(selectedItem); }); } @@ -123,8 +139,8 @@ private static class ProvidersAppItemViewHolder extends ProvidersItemViewHolder @NonNull final TextView label; - ProvidersAppItemViewHolder(@NonNull final View itemView) { - super(itemView, ProvidersItem.FileProviderItemType.APP); + ProvidersAppItemViewHolder(@NonNull final View itemView, @NonNull ProvidersItem.FileProviderItemType providerItemType) { + super(itemView, providerItemType); icon = itemView.findViewById(R.id.gc_app_icon); label = itemView.findViewById(R.id.gc_app_label); } diff --git a/capture-sdk/sdk/src/main/java/net/gini/android/capture/internal/fileimport/providerchooser/ProvidersAppItemSelectedListener.java b/capture-sdk/sdk/src/main/java/net/gini/android/capture/internal/fileimport/providerchooser/ProvidersAppItemSelectedListener.java index 9324d0de5b..f6e16751ef 100644 --- a/capture-sdk/sdk/src/main/java/net/gini/android/capture/internal/fileimport/providerchooser/ProvidersAppItemSelectedListener.java +++ b/capture-sdk/sdk/src/main/java/net/gini/android/capture/internal/fileimport/providerchooser/ProvidersAppItemSelectedListener.java @@ -9,5 +9,5 @@ */ public interface ProvidersAppItemSelectedListener { - void onItemSelected(@NonNull final ProvidersAppItem item); + void onItemSelected(@NonNull final ProvidersItem item); } diff --git a/capture-sdk/sdk/src/main/java/net/gini/android/capture/internal/fileimport/providerchooser/ProvidersAppWrapperItem.java b/capture-sdk/sdk/src/main/java/net/gini/android/capture/internal/fileimport/providerchooser/ProvidersAppWrapperItem.java new file mode 100644 index 0000000000..7dee3c5b82 --- /dev/null +++ b/capture-sdk/sdk/src/main/java/net/gini/android/capture/internal/fileimport/providerchooser/ProvidersAppWrapperItem.java @@ -0,0 +1,31 @@ +package net.gini.android.capture.internal.fileimport.providerchooser; + +import android.graphics.drawable.Drawable; + +import androidx.annotation.NonNull; + +/** + * Internal use only. + * + * @suppress + */ +public class ProvidersAppWrapperItem extends ProvidersItem { + + private final Drawable mIcon; + private final String mText; + + public ProvidersAppWrapperItem(@NonNull final Drawable icon, @NonNull final String text) { + super(FileProviderItemType.APP_WRAPPER_PHOTO_PICKER); + mIcon = icon; + mText = text; + } + + public Drawable getDrawableIcon() { + return mIcon; + } + + public String getText() { + return mText; + } + +} diff --git a/capture-sdk/sdk/src/main/java/net/gini/android/capture/internal/fileimport/providerchooser/ProvidersItem.java b/capture-sdk/sdk/src/main/java/net/gini/android/capture/internal/fileimport/providerchooser/ProvidersItem.java index 97749a19a3..408c20573b 100644 --- a/capture-sdk/sdk/src/main/java/net/gini/android/capture/internal/fileimport/providerchooser/ProvidersItem.java +++ b/capture-sdk/sdk/src/main/java/net/gini/android/capture/internal/fileimport/providerchooser/ProvidersItem.java @@ -53,7 +53,8 @@ FileProviderItemType getType() { enum FileProviderItemType { SECTION, SEPARATOR, - APP; + APP, + APP_WRAPPER_PHOTO_PICKER; static FileProviderItemType fromOrdinal(final int ordinal) { if (ordinal >= values().length) { diff --git a/capture-sdk/sdk/src/main/res/drawable/gc_photo_picker_app_icon.xml b/capture-sdk/sdk/src/main/res/drawable/gc_photo_picker_app_icon.xml new file mode 100644 index 0000000000..b0b85b2c1d --- /dev/null +++ b/capture-sdk/sdk/src/main/res/drawable/gc_photo_picker_app_icon.xml @@ -0,0 +1,30 @@ + + + + + + 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()) 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/gradle/libs.versions.toml b/gradle/libs.versions.toml index c0e7bddd92..20e4a7a85a 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" @@ -87,7 +87,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" 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 diff --git a/health-api-library/library/build.gradle.kts b/health-api-library/library/build.gradle.kts index ceed6bda6e..fc85ee1657 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" @@ -124,7 +125,7 @@ tasks.register("injectTestProperties") { doFirst { propertiesMap.clear() - propertiesMap.putAll(readLocalPropertiesToMap(project, + propertiesMap.putAll(readLocalPropertiesToMapSilent(project, listOf("testClientId", "testClientSecret", "testApiUri", "testUserCenterUri", "testBankApiUri"))) } 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"