diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b5dfeb64..81376915 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,7 +13,7 @@ jobs: - name: checkout uses: actions/checkout@v2 with: - ref: "master" + ref: ${{ github.event.release.target_commitish }} token: ${{secrets.SERVICE_PERSONAL_ACCESS_TOKEN}} submodules: recursive @@ -40,7 +40,7 @@ jobs: - name: checkout uses: actions/checkout@v2 with: - ref: "master" + ref: ${{ github.event.release.target_commitish }} token: ${{secrets.SERVICE_PERSONAL_ACCESS_TOKEN}} submodules: recursive @@ -83,7 +83,7 @@ jobs: id: commit uses: stefanzweifel/git-auto-commit-action@v4 with: - branch: master + branch: ${{ github.event.release.target_commitish }} commit_message: "Automatic changelog update" file_pattern: "gradle.properties CHANGELOG.md" @@ -96,7 +96,7 @@ jobs: - name: checkout uses: actions/checkout@v2 with: - ref: "master" + ref: ${{ github.event.release.target_commitish }} token: ${{secrets.SERVICE_PERSONAL_ACCESS_TOKEN}} submodules: recursive diff --git a/build.gradle b/build.gradle index 4450ac64..7d4cd599 100644 --- a/build.gradle +++ b/build.gradle @@ -10,14 +10,14 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:4.2.2' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21" + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.32" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } plugins { - id 'org.jetbrains.kotlin.plugin.serialization' version "1.5.21" + id 'org.jetbrains.kotlin.plugin.serialization' version "1.4.32" id 'org.jetbrains.dokka' version '1.5.0' id "io.github.gradle-nexus.publish-plugin" version "1.1.0" } diff --git a/cardscan-demo/build.gradle b/cardscan-demo/build.gradle index 04796665..3b6766e0 100644 --- a/cardscan-demo/build.gradle +++ b/cardscan-demo/build.gradle @@ -52,11 +52,11 @@ dependencies { testImplementation "androidx.test:core:1.4.0" testImplementation "androidx.test:runner:1.4.0" testImplementation "junit:junit:4.13.2" - testImplementation "org.jetbrains.kotlin:kotlin-test:1.5.21" + testImplementation "org.jetbrains.kotlin:kotlin-test:1.4.32" } dependencies { androidTestImplementation "androidx.test.ext:junit:1.1.3" androidTestImplementation "androidx.test.espresso:espresso-core:3.4.0" - androidTestImplementation "org.jetbrains.kotlin:kotlin-test:1.5.21" + androidTestImplementation "org.jetbrains.kotlin:kotlin-test:1.4.32" } diff --git a/cardscan-ui/build.gradle b/cardscan-ui/build.gradle index 78a2a2f1..091f1abd 100644 --- a/cardscan-ui/build.gradle +++ b/cardscan-ui/build.gradle @@ -54,14 +54,14 @@ dependencies { testImplementation "androidx.test:core:1.4.0" testImplementation "androidx.test:runner:1.4.0" testImplementation "junit:junit:4.13.2" - testImplementation "org.jetbrains.kotlin:kotlin-test:1.5.21" + testImplementation "org.jetbrains.kotlin:kotlin-test:1.4.32" testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.4.3" } dependencies { androidTestImplementation "androidx.test.ext:junit:1.1.3" androidTestImplementation "androidx.test.espresso:espresso-core:3.4.0" - androidTestImplementation "org.jetbrains.kotlin:kotlin-test:1.5.21" + androidTestImplementation "org.jetbrains.kotlin:kotlin-test:1.4.32" } apply from: 'deploy.gradle' diff --git a/scan-camera/build.gradle b/scan-camera/build.gradle index 70408fc1..6b197d51 100644 --- a/scan-camera/build.gradle +++ b/scan-camera/build.gradle @@ -47,14 +47,14 @@ dependencies { testImplementation "androidx.test:core:1.4.0" testImplementation "androidx.test:runner:1.4.0" testImplementation "junit:junit:4.13.2" - testImplementation "org.jetbrains.kotlin:kotlin-test:1.5.21" + testImplementation "org.jetbrains.kotlin:kotlin-test:1.4.32" testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.4.3" } dependencies { androidTestImplementation "androidx.test.ext:junit:1.1.3" androidTestImplementation "androidx.test.espresso:espresso-core:3.4.0" - androidTestImplementation "org.jetbrains.kotlin:kotlin-test:1.5.21" + androidTestImplementation "org.jetbrains.kotlin:kotlin-test:1.4.32" } apply from: 'deploy.gradle' diff --git a/scan-camera2/build.gradle b/scan-camera2/build.gradle index 7e7e9ed8..44af3d86 100644 --- a/scan-camera2/build.gradle +++ b/scan-camera2/build.gradle @@ -47,13 +47,13 @@ dependencies { testImplementation "androidx.test:core:1.4.0" testImplementation "androidx.test:runner:1.4.0" testImplementation "junit:junit:4.13.2" - testImplementation "org.jetbrains.kotlin:kotlin-test:1.5.21" + testImplementation "org.jetbrains.kotlin:kotlin-test:1.4.32" } dependencies { androidTestImplementation "androidx.test.ext:junit:1.1.3" androidTestImplementation "androidx.test.espresso:espresso-core:3.4.0" - androidTestImplementation "org.jetbrains.kotlin:kotlin-test:1.5.21" + androidTestImplementation "org.jetbrains.kotlin:kotlin-test:1.4.32" } apply from: 'deploy.gradle' diff --git a/scan-camerax/build.gradle b/scan-camerax/build.gradle index 82a4ffaf..81dcbef8 100644 --- a/scan-camerax/build.gradle +++ b/scan-camerax/build.gradle @@ -51,13 +51,13 @@ dependencies { testImplementation "androidx.test:core:1.4.0" testImplementation "androidx.test:runner:1.4.0" testImplementation "junit:junit:4.13.2" - testImplementation "org.jetbrains.kotlin:kotlin-test:1.5.21" + testImplementation "org.jetbrains.kotlin:kotlin-test:1.4.32" } dependencies { androidTestImplementation "androidx.test.ext:junit:1.1.3" androidTestImplementation "androidx.test.espresso:espresso-core:3.4.0" - androidTestImplementation "org.jetbrains.kotlin:kotlin-test:1.5.21" + androidTestImplementation "org.jetbrains.kotlin:kotlin-test:1.4.32" } apply from: 'deploy.gradle' diff --git a/scan-framework/build.gradle b/scan-framework/build.gradle index 4294a99a..268e6955 100644 --- a/scan-framework/build.gradle +++ b/scan-framework/build.gradle @@ -58,14 +58,14 @@ dependencies { testImplementation "androidx.test:core:1.4.0" testImplementation "androidx.test:runner:1.4.0" testImplementation "junit:junit:4.13.2" - testImplementation "org.jetbrains.kotlin:kotlin-test:1.5.21" + testImplementation "org.jetbrains.kotlin:kotlin-test:1.4.32" testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.4.3" } dependencies { androidTestImplementation "androidx.test.espresso:espresso-core:3.4.0" androidTestImplementation "androidx.test.ext:junit:1.1.3" - androidTestImplementation "org.jetbrains.kotlin:kotlin-test:1.5.21" + androidTestImplementation "org.jetbrains.kotlin:kotlin-test:1.4.32" androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.4.3" } diff --git a/scan-framework/src/main/java/com/getbouncer/scan/framework/util/Device.kt b/scan-framework/src/main/java/com/getbouncer/scan/framework/util/Device.kt index 78b41d42..671cd51d 100644 --- a/scan-framework/src/main/java/com/getbouncer/scan/framework/util/Device.kt +++ b/scan-framework/src/main/java/com/getbouncer/scan/framework/util/Device.kt @@ -110,8 +110,11 @@ fun getPlatform() = "android" * from https://stackoverflow.com/a/27836910/947883 */ fun getDeviceName(): String { - val manufacturer = Build.MANUFACTURER?.lowercase() ?: "" - val model = Build.MODEL?.lowercase() ?: "" + // TODO: change this back once we can support newer kotlin versions +// val manufacturer = Build.MANUFACTURER?.lowercase() ?: "" +// val model = Build.MODEL?.lowercase() ?: "" + val manufacturer = Build.MANUFACTURER?.toLowerCase(Locale.ROOT) ?: "" + val model = Build.MODEL?.toLowerCase(Locale.ROOT) ?: "" return if (model.startsWith(manufacturer)) { model } else { diff --git a/scan-payment-full/build.gradle b/scan-payment-full/build.gradle index 2c22973a..107017cc 100644 --- a/scan-payment-full/build.gradle +++ b/scan-payment-full/build.gradle @@ -58,13 +58,13 @@ dependencies { testImplementation "androidx.test:core:1.4.0" testImplementation "androidx.test:runner:1.4.0" testImplementation "junit:junit:4.13.2" - testImplementation "org.jetbrains.kotlin:kotlin-test:1.5.21" + testImplementation "org.jetbrains.kotlin:kotlin-test:1.4.32" } dependencies { androidTestImplementation "androidx.test.espresso:espresso-core:3.4.0" androidTestImplementation "androidx.test.ext:junit:1.1.3" - androidTestImplementation "org.jetbrains.kotlin:kotlin-test:1.5.21" + androidTestImplementation "org.jetbrains.kotlin:kotlin-test:1.4.32" androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.4.3" } diff --git a/scan-payment-minimal/build.gradle b/scan-payment-minimal/build.gradle index 12afb77a..8ba0454b 100644 --- a/scan-payment-minimal/build.gradle +++ b/scan-payment-minimal/build.gradle @@ -54,13 +54,13 @@ dependencies { testImplementation "androidx.test:core:1.4.0" testImplementation "androidx.test:runner:1.4.0" testImplementation "junit:junit:4.13.2" - testImplementation "org.jetbrains.kotlin:kotlin-test:1.5.21" + testImplementation "org.jetbrains.kotlin:kotlin-test:1.4.32" } dependencies { androidTestImplementation "androidx.test.espresso:espresso-core:3.4.0" androidTestImplementation "androidx.test.ext:junit:1.1.3" - androidTestImplementation "org.jetbrains.kotlin:kotlin-test:1.5.21" + androidTestImplementation "org.jetbrains.kotlin:kotlin-test:1.4.32" androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.4.3" } diff --git a/scan-payment/build.gradle b/scan-payment/build.gradle index c4a26d87..dc39eb47 100644 --- a/scan-payment/build.gradle +++ b/scan-payment/build.gradle @@ -53,13 +53,13 @@ dependencies { testImplementation "androidx.test:core:1.4.0" testImplementation "androidx.test:runner:1.4.0" testImplementation "junit:junit:4.13.2" - testImplementation "org.jetbrains.kotlin:kotlin-test:1.5.21" + testImplementation "org.jetbrains.kotlin:kotlin-test:1.4.32" } dependencies { androidTestImplementation "androidx.test.espresso:espresso-core:3.4.0" androidTestImplementation "androidx.test.ext:junit:1.1.3" - androidTestImplementation "org.jetbrains.kotlin:kotlin-test:1.5.21" + androidTestImplementation "org.jetbrains.kotlin:kotlin-test:1.4.32" androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.4.3" } diff --git a/scan-payment/src/main/java/com/getbouncer/scan/payment/ml/AlphabetDetect.kt b/scan-payment/src/main/java/com/getbouncer/scan/payment/ml/AlphabetDetect.kt index e899acec..7209dac8 100644 --- a/scan-payment/src/main/java/com/getbouncer/scan/payment/ml/AlphabetDetect.kt +++ b/scan-payment/src/main/java/com/getbouncer/scan/payment/ml/AlphabetDetect.kt @@ -37,7 +37,9 @@ class AlphabetDetect private constructor(interpreter: Interpreter) : val prediction = mlOutput[0] val index = prediction.indexOfMax() val character = if (index != null && index > 0) { - ('A'.code - 1 + index).toChar() + // TODO: change this back once we support newer gradle versions +// ('A'.code - 1 + index).toChar() + ('A'.toInt() - 1 + index).toChar() } else { ' ' } diff --git a/scan-ui/build.gradle b/scan-ui/build.gradle index c1183f3d..3c1a6a85 100644 --- a/scan-ui/build.gradle +++ b/scan-ui/build.gradle @@ -49,13 +49,13 @@ dependencies { testImplementation "androidx.test:core:1.4.0" testImplementation "androidx.test:runner:1.4.0" testImplementation "junit:junit:4.13.2" - testImplementation "org.jetbrains.kotlin:kotlin-test:1.5.21" + testImplementation "org.jetbrains.kotlin:kotlin-test:1.4.32" } dependencies { androidTestImplementation "androidx.test.ext:junit:1.1.3" androidTestImplementation "androidx.test.espresso:espresso-core:3.4.0" - androidTestImplementation "org.jetbrains.kotlin:kotlin-test:1.5.21" + androidTestImplementation "org.jetbrains.kotlin:kotlin-test:1.4.32" } apply from: 'deploy.gradle'