Julian Steenbakker

refactor: revert gradle version to more compatible versions

@@ -2,6 +2,7 @@ group 'dev.steenbakker.mobile_scanner' @@ -2,6 +2,7 @@ group 'dev.steenbakker.mobile_scanner'
2 version '1.0-SNAPSHOT' 2 version '1.0-SNAPSHOT'
3 3
4 buildscript { 4 buildscript {
  5 + ext.kotlin_version = '1.7.22'
5 repositories { 6 repositories {
6 google() 7 google()
7 mavenCentral() 8 mavenCentral()
@@ -9,7 +10,7 @@ buildscript { @@ -9,7 +10,7 @@ buildscript {
9 10
10 dependencies { 11 dependencies {
11 classpath 'com.android.tools.build:gradle:8.3.2' 12 classpath 'com.android.tools.build:gradle:8.3.2'
12 - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.22" 13 + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
13 } 14 }
14 } 15 }
15 16
@@ -31,12 +32,12 @@ android { @@ -31,12 +32,12 @@ android {
31 compileSdk 34 32 compileSdk 34
32 33
33 compileOptions { 34 compileOptions {
34 - sourceCompatibility JavaVersion.VERSION_17  
35 - targetCompatibility JavaVersion.VERSION_17 35 + sourceCompatibility JavaVersion.VERSION_1_8
  36 + targetCompatibility JavaVersion.VERSION_1_8
36 } 37 }
37 38
38 kotlinOptions { 39 kotlinOptions {
39 - jvmTarget = '17' 40 + jvmTarget = '1.8'
40 } 41 }
41 42
42 sourceSets { 43 sourceSets {
@@ -72,8 +73,12 @@ dependencies { @@ -72,8 +73,12 @@ dependencies {
72 implementation 'com.google.mlkit:barcode-scanning:17.2.0' 73 implementation 'com.google.mlkit:barcode-scanning:17.2.0'
73 } 74 }
74 75
75 - implementation 'androidx.camera:camera-lifecycle:1.3.2'  
76 - implementation 'androidx.camera:camera-camera2:1.3.2' 76 + // org.jetbrains.kotlin:kotlin-bom artifact purpose is to align kotlin stdlib and related code versions.
  77 + // See: https://youtrack.jetbrains.com/issue/KT-55297/kotlin-stdlib-should-declare-constraints-on-kotlin-stdlib-jdk8-and-kotlin-stdlib-jdk7
  78 + implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.22"))
  79 +
  80 + implementation 'androidx.camera:camera-lifecycle:1.3.3'
  81 + implementation 'androidx.camera:camera-camera2:1.3.3'
77 82
78 testImplementation 'org.jetbrains.kotlin:kotlin-test' 83 testImplementation 'org.jetbrains.kotlin:kotlin-test'
79 testImplementation 'org.mockito:mockito-core:5.11.0' 84 testImplementation 'org.mockito:mockito-core:5.11.0'
@@ -25,16 +25,14 @@ if (flutterVersionName == null) { @@ -25,16 +25,14 @@ if (flutterVersionName == null) {
25 android { 25 android {
26 namespace "dev.steenbakker.mobile_scanner_example" 26 namespace "dev.steenbakker.mobile_scanner_example"
27 compileSdk 34 27 compileSdk 34
28 - ndkVersion "25.1.8937393"  
29 -// ndkVersion flutter.ndkVersion  
30 28
31 compileOptions { 29 compileOptions {
32 - sourceCompatibility JavaVersion.VERSION_17  
33 - targetCompatibility JavaVersion.VERSION_17 30 + sourceCompatibility JavaVersion.VERSION_1_8
  31 + targetCompatibility JavaVersion.VERSION_1_8
34 } 32 }
35 33
36 kotlinOptions { 34 kotlinOptions {
37 - jvmTarget = '17' 35 + jvmTarget = '1.8'
38 } 36 }
39 37
40 sourceSets { 38 sourceSets {
  1 +#Thu May 02 10:24:49 CEST 2024
1 distributionBase=GRADLE_USER_HOME 2 distributionBase=GRADLE_USER_HOME
2 distributionPath=wrapper/dists 3 distributionPath=wrapper/dists
3 -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip 4 +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
4 zipStoreBase=GRADLE_USER_HOME 5 zipStoreBase=GRADLE_USER_HOME
5 zipStorePath=wrapper/dists 6 zipStorePath=wrapper/dists
@@ -18,8 +18,8 @@ pluginManagement { @@ -18,8 +18,8 @@ pluginManagement {
18 18
19 plugins { 19 plugins {
20 id "dev.flutter.flutter-plugin-loader" version "1.0.0" 20 id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21 - id "com.android.application" version "8.2.2" apply false  
22 - id "org.jetbrains.kotlin.android" version "1.9.22" apply false 21 + id "com.android.application" version "7.3.0" apply false
  22 + id "org.jetbrains.kotlin.android" version "1.7.22" apply false
23 } 23 }
24 24
25 include ":app" 25 include ":app"