diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 44b09dd..c7dcd16 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,7 @@ jobs: java-version: '12.x' - uses: subosito/flutter-action@v2 with: - flutter-version: '3.10.0' + flutter-version: '3.24.3' - run: dart --version - run: flutter --version - run: flutter pub get @@ -49,7 +49,7 @@ jobs: java-version: '12.x' - uses: subosito/flutter-action@v2 with: - flutter-version: '3.10.0' + flutter-version: '3.24.3' - run: dart --version - run: flutter --version - run: flutter pub get diff --git a/.gitignore b/.gitignore index 9e2922e..6a26ecc 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,5 @@ build/ pubspec.lock podfile.lock -local.properties \ No newline at end of file +local.properties +.vscode \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a83760..95c914a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.3.3 + +* Bump Android to 3.1.10 +* Now use Gradle declarative plugin in Android Example. + ## 0.3.2 * Bump Android to 3.1.8 diff --git a/android/build.gradle b/android/build.gradle index bf471a3..1cd6495 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -67,7 +67,7 @@ android { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - def fallbackKlippaScannerVersion = "3.1.8" + def fallbackKlippaScannerVersion = "3.1.10" def klippaScannerVersion = project.hasProperty('klippaScannerVersion') ? project.klippaScannerVersion : fallbackKlippaScannerVersion implementation "com.klippa:scanner:$klippaScannerVersion" implementation 'com.google.android.material:material:1.6.1' diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index c43fc9d..f6d1ebd 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -1,3 +1,9 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) { } } -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '1' @@ -21,10 +22,6 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { compileSdk 34 @@ -65,7 +62,3 @@ android { flutter { source '../..' } - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/example/android/build.gradle b/example/android/build.gradle index b387281..18437ee 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -1,16 +1,3 @@ -buildscript { - ext.kotlin_version = '1.8.0' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:7.0.2' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - allprojects { repositories { google() diff --git a/example/android/settings.gradle b/example/android/settings.gradle index 44e62bc..7eef9f7 100644 --- a/example/android/settings.gradle +++ b/example/android/settings.gradle @@ -1,11 +1,25 @@ -include ':app' +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + }() -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "7.0.2" apply false + id "org.jetbrains.kotlin.android" version "1.8.0" apply false +} + +include ":app" \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 8fc2dab..842df19 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: klippa_scanner_sdk description: Allows you to do document scanning with the Klippa Scanner SDK from Flutter apps. -version: 0.3.2 +version: 0.3.3 homepage: https://github.com/klippa-app/flutter-klippa-scanner-sdk environment: