From 2fbd79b3e9196937eda6839f58ec87685e04ae43 Mon Sep 17 00:00:00 2001 From: Alexandre Jacinto Date: Tue, 21 May 2024 15:37:54 +0100 Subject: [PATCH 1/4] fix: add SeralizedName annotation to because of code obfuscation Context: When using code obfuscation, we need the use the SeralizedName annotation so that this object is correctly parsed. References: https://outsystemsrd.atlassian.net/browse/RMET-3394 --- build.gradle | 1 + .../plugins/barcode/model/OSBARCScanParameters.kt | 15 ++++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 7afca49..1c8922e 100644 --- a/build.gradle +++ b/build.gradle @@ -121,6 +121,7 @@ dependencies { implementation 'androidx.camera:camera-core:1.0.0' implementation 'com.google.zxing:core:3.4.1' implementation 'com.google.mlkit:barcode-scanning:17.2.0' + implementation 'com.google.code.gson:gson:2.10.1' testImplementation "org.mockito:mockito-core:4.3.0" testImplementation 'org.mockito:mockito-inline:4.3.0' diff --git a/src/main/kotlin/com/outsystems/plugins/barcode/model/OSBARCScanParameters.kt b/src/main/kotlin/com/outsystems/plugins/barcode/model/OSBARCScanParameters.kt index 3219f0b..502efb2 100644 --- a/src/main/kotlin/com/outsystems/plugins/barcode/model/OSBARCScanParameters.kt +++ b/src/main/kotlin/com/outsystems/plugins/barcode/model/OSBARCScanParameters.kt @@ -1,16 +1,17 @@ package com.outsystems.plugins.barcode.model import java.io.Serializable +import com.google.gson.annotations.SerializedName /** * Data class that represents the object with the scan parameters. */ data class OSBARCScanParameters( - val scanInstructions: String?, - val cameraDirection: Int?, - val scanOrientation: Int?, - val scanButton: Boolean, - val scanText: String, - val hint: Int?, - val androidScanningLibrary: String? + @SerializedName("scanInstructions") val scanInstructions: String?, + @SerializedName("cameraDirection") val cameraDirection: Int?, + @SerializedName("scanOrientation") val scanOrientation: Int?, + @SerializedName("scanButton") val scanButton: Boolean, + @SerializedName("scanText") val scanText: String, + @SerializedName("hint") val hint: Int?, + @SerializedName("androidScanningLibrary") val androidScanningLibrary: String? ) : Serializable \ No newline at end of file From 4d57e2e827a6e06f09d3452a9352f63ebbf8906d Mon Sep 17 00:00:00 2001 From: Alexandre Jacinto Date: Tue, 21 May 2024 15:38:55 +0100 Subject: [PATCH 2/4] chore: raise version to 1.1.1.1 References: https://outsystemsrd.atlassian.net/browse/RMET-3394 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c1b4b98..56c5638 100644 --- a/pom.xml +++ b/pom.xml @@ -7,5 +7,5 @@ 4.0.0 com.github.outsystems osbarcode-android - 1.1.1 + 1.1.1.1 From 962f37794ce1d4caca53b70bee15b51768994ee8 Mon Sep 17 00:00:00 2001 From: Alexandre Jacinto Date: Tue, 21 May 2024 16:08:49 +0100 Subject: [PATCH 3/4] chore: raise to version 1.1.2 References: https://outsystemsrd.atlassian.net/browse/RMET-3394 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 56c5638..d6ccf5a 100644 --- a/pom.xml +++ b/pom.xml @@ -7,5 +7,5 @@ 4.0.0 com.github.outsystems osbarcode-android - 1.1.1.1 + 1.1.2 From 0ca7e68eb617f9f7a66d9afef0272bd4d9959ac8 Mon Sep 17 00:00:00 2001 From: Alexandre Jacinto Date: Tue, 21 May 2024 16:09:08 +0100 Subject: [PATCH 4/4] chore: update changelog References: https://outsystemsrd.atlassian.net/browse/RMET-3394 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d90dd9..690a48f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 The changes documented here do not include those from the original repository. +## [1.1.2] + +### 21-05-2024 +- Fix: Adds serializable annotation to avoid problems with code obfuscation (https://outsystemsrd.atlassian.net/browse/RMET-3394). + ## [1.1.1] ### 30-04-2024