@@ -2,7 +2,7 @@ group = 'dev.steenbakker.mobile_scanner'
22version = ' 1.0-SNAPSHOT'
33
44buildscript {
5- ext. kotlin_version = ' 1.8.0 '
5+ ext. kotlin_version = " 2.1.0 "
66 repositories {
77 google()
88 mavenCentral()
@@ -29,15 +29,15 @@ android {
2929 namespace = ' dev.steenbakker.mobile_scanner'
3030 }
3131
32- compileSdk 36
32+ compileSdk = 36
3333
3434 compileOptions {
35- sourceCompatibility JavaVersion . VERSION_17
36- targetCompatibility JavaVersion . VERSION_17
35+ sourceCompatibility = JavaVersion . VERSION_17
36+ targetCompatibility = JavaVersion . VERSION_17
3737 }
3838
3939 kotlinOptions {
40- jvmTarget = ' 17 '
40+ jvmTarget = JavaVersion . VERSION_17 . toString()
4141 }
4242
4343 sourceSets {
@@ -46,10 +46,28 @@ android {
4646 }
4747
4848 defaultConfig {
49- minSdk 23
49+ minSdk = 23
5050 consumerProguardFiles ' proguard-rules.pro'
5151 }
5252
53+ dependencies {
54+ def useUnbundled = project. findProperty(' dev.steenbakker.mobile_scanner.useUnbundled' ) ?: false
55+ if (useUnbundled. toBoolean()) {
56+ // Dynamically downloaded model via Google Play Services
57+ implementation ' com.google.android.gms:play-services-mlkit-barcode-scanning:18.3.1'
58+ } else {
59+ // Bundled model in app
60+ implementation ' com.google.mlkit:barcode-scanning:17.3.0'
61+ }
62+
63+ implementation ' androidx.camera:camera-lifecycle:1.5.1'
64+ implementation ' androidx.camera:camera-camera2:1.5.1'
65+ implementation ' org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2'
66+
67+ testImplementation ' org.jetbrains.kotlin:kotlin-test'
68+ testImplementation ' org.mockito:mockito-core:5.20.0'
69+ }
70+
5371 testOptions {
5472 unitTests. all {
5573 useJUnitPlatform()
@@ -61,22 +79,4 @@ android {
6179 }
6280 }
6381 }
64- }
65-
66- dependencies {
67- def useUnbundled = project. findProperty(' dev.steenbakker.mobile_scanner.useUnbundled' ) ?: false
68- if (useUnbundled. toBoolean()) {
69- // Dynamically downloaded model via Google Play Services
70- implementation ' com.google.android.gms:play-services-mlkit-barcode-scanning:18.3.1'
71- } else {
72- // Bundled model in app
73- implementation ' com.google.mlkit:barcode-scanning:17.3.0'
74- }
75-
76- implementation ' androidx.camera:camera-lifecycle:1.5.1'
77- implementation ' androidx.camera:camera-camera2:1.5.1'
78- implementation ' org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2'
79-
80- testImplementation ' org.jetbrains.kotlin:kotlin-test'
81- testImplementation ' org.mockito:mockito-core:5.19.0'
82- }
82+ }
0 commit comments