Skip to content

Commit

Permalink
Merge pull request #11 from klippa-app/development
Browse files Browse the repository at this point in the history
Upgrade compile and target SDK Android.
  • Loading branch information
RobinFarmer authored Oct 19, 2022
2 parents 4588ce7 + e39e60d commit 5ac6ce1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- Bump iOS to version 0.5.4
- Bump Android to version 2.1.9
- Bump Android compile and target SDK to 33.

## 0.0.8

Expand Down
16 changes: 14 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
group 'com.klippa.scanner.klippa_scanner_sdk'
version '1.0-SNAPSHOT'

def DEFAULT_COMPILE_SDK_VERSION = 33
def DEFAULT_BUILD_TOOLS_VERSION = '30.0.3'
def DEFAULT_MIN_SDK_VERSION = 21
def DEFAULT_TARGET_SDK_VERSION = 33

def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}


buildscript {
ext.kotlin_version = '1.6.10'
repositories {
Expand Down Expand Up @@ -39,13 +49,15 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 29
compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION)
buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION)

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
minSdkVersion 21
minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION)
targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION)
}
lintOptions {
disable 'InvalidPackage'
Expand Down
4 changes: 2 additions & 2 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 31
compileSdkVersion 33

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -41,7 +41,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.klippa.scanner.examplekotlin"
minSdkVersion 21
targetSdkVersion 31
targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand Down
8 changes: 1 addition & 7 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,8 @@ class _MyAppState extends State<MyApp> {
void _startSession() async {
String sessionResultText = 'Unknown';
var config = CameraConfig();

config.model.fileName = "model";
config.model.modelLabels = "labelmap";
// setup your scanner
config.storeImagesToCameraRol = true;
config.defaultColor = DefaultColor.original;
config.imageColorOriginalText = "original";
config.imageColorGrayscaleText = "grayscale";
config.imageColorEnhancedText = "enhanced";
try {
var result = await KlippaScannerSdk.startSession(config, license);
sessionResultText = 'Finished';
Expand Down

0 comments on commit 5ac6ce1

Please sign in to comment.