diff --git a/CHANGELOG.md b/CHANGELOG.md index 97fe80c..43c05c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ +## 5.0.0+2 + +* Android: Upgrade AGP, fix building with AGP 8 + ## 5.0.0+1 -* fix building on MacOS +* MacOS: fix building on MacOS ## 5.0.0 diff --git a/android/build.gradle b/android/build.gradle index 6b5233c..2e7a01c 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -2,14 +2,14 @@ group 'design.codeux.biometric_storage' version '1.0-SNAPSHOT' buildscript { - ext.kotlin_version = '1.7.0' + ext.kotlin_version = '1.8.10' repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.1.3' + classpath 'com.android.tools.build:gradle:8.1.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -25,8 +25,13 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' apply plugin: 'kotlin-kapt' +kotlin { + jvmToolchain(17) +} + android { - compileSdkVersion 31 + namespace "design.codeux.biometric_storage" + compileSdk 31 sourceSets { main.java.srcDirs += 'src/main/kotlin' @@ -42,12 +47,11 @@ android { } dependencies { - def biometric_version = "1.2.0-alpha04" + def biometric_version = "1.2.0-alpha05" - api "androidx.core:core-ktx:1.8.0" - api "androidx.fragment:fragment-ktx:1.5.0" + api "androidx.core:core-ktx:1.10.1" + api "androidx.fragment:fragment-ktx:1.6.1" - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "androidx.biometric:biometric:$biometric_version" - implementation "io.github.microutils:kotlin-logging:1.7.6" + implementation "io.github.oshai:kotlin-logging-jvm:5.0.1" } diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index 608cbe4..4f4e4ed 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ - + diff --git a/android/src/main/kotlin/design/codeux/biometric_storage/BiometricStorageFile.kt b/android/src/main/kotlin/design/codeux/biometric_storage/BiometricStorageFile.kt index 086752e..d2ab600 100644 --- a/android/src/main/kotlin/design/codeux/biometric_storage/BiometricStorageFile.kt +++ b/android/src/main/kotlin/design/codeux/biometric_storage/BiometricStorageFile.kt @@ -4,7 +4,7 @@ import android.content.Context import android.content.pm.PackageManager import android.os.Build import android.security.keystore.KeyProperties -import mu.KotlinLogging +import io.github.oshai.kotlinlogging.KotlinLogging import java.io.File import java.io.IOException import javax.crypto.Cipher diff --git a/android/src/main/kotlin/design/codeux/biometric_storage/BiometricStoragePlugin.kt b/android/src/main/kotlin/design/codeux/biometric_storage/BiometricStoragePlugin.kt index 4548897..176d842 100644 --- a/android/src/main/kotlin/design/codeux/biometric_storage/BiometricStoragePlugin.kt +++ b/android/src/main/kotlin/design/codeux/biometric_storage/BiometricStoragePlugin.kt @@ -16,7 +16,7 @@ import io.flutter.embedding.engine.plugins.activity.* import io.flutter.plugin.common.* import io.flutter.plugin.common.MethodChannel.MethodCallHandler import io.flutter.plugin.common.MethodChannel.Result -import mu.KotlinLogging +import io.github.oshai.kotlinlogging.KotlinLogging import java.io.PrintWriter import java.io.StringWriter import java.util.concurrent.ExecutorService diff --git a/android/src/main/kotlin/design/codeux/biometric_storage/CryptographyManager.kt b/android/src/main/kotlin/design/codeux/biometric_storage/CryptographyManager.kt index d6acd63..2a3ff11 100644 --- a/android/src/main/kotlin/design/codeux/biometric_storage/CryptographyManager.kt +++ b/android/src/main/kotlin/design/codeux/biometric_storage/CryptographyManager.kt @@ -20,7 +20,7 @@ package design.codeux.biometric_storage import android.security.keystore.KeyGenParameterSpec import android.security.keystore.KeyProperties -import mu.KotlinLogging +import io.github.oshai.kotlinlogging.KotlinLogging import java.io.File import java.nio.charset.Charset import java.security.KeyStore diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index eb5242b..6b26b94 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -25,10 +25,19 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" +kotlin { + jvmToolchain(17) +} + android { compileSdkVersion 33 ndkVersion "21.1.6352462" + compileOptions { + sourceCompatibility = 17 + targetCompatibility = 17 + } + sourceSets { main.java.srcDirs += 'src/main/kotlin' } @@ -62,6 +71,7 @@ android { lint { disable 'InvalidPackage' } + namespace 'design.codeux.biometric_storage_example' } flutter { @@ -69,11 +79,10 @@ flutter { } dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'org.slf4j:slf4j-api:1.7.30' - implementation 'com.github.tony19:logback-android:2.0.0' - implementation "io.github.microutils:kotlin-logging:1.7.6" - implementation "androidx.appcompat:appcompat:1.4.1" + implementation 'org.slf4j:slf4j-api:2.0.7' + implementation 'com.github.tony19:logback-android:3.0.0' + implementation "io.github.oshai:kotlin-logging-jvm:5.0.1" + implementation "androidx.appcompat:appcompat:1.6.1" testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test:runner:1.4.0' diff --git a/example/android/app/src/debug/AndroidManifest.xml b/example/android/app/src/debug/AndroidManifest.xml index 9811082..f880684 100644 --- a/example/android/app/src/debug/AndroidManifest.xml +++ b/example/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,4 @@ - + diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index f133692..deb061e 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ - + diff --git a/example/android/build.gradle b/example/android/build.gradle index 48a5fe9..e28edae 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -1,12 +1,12 @@ buildscript { - ext.kotlin_version = '1.7.0' + ext.kotlin_version = '1.8.10' repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.2.1' + classpath 'com.android.tools.build:gradle:8.1.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -26,6 +26,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/example/android/gradle.properties b/example/android/gradle.properties index d172c47..19c4088 100644 --- a/example/android/gradle.properties +++ b/example/android/gradle.properties @@ -1,3 +1,6 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true +android.defaults.buildfeatures.buildconfig=true +android.nonTransitiveRClass=false +android.nonFinalResIds=false diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index 7a3602a..ba7c3aa 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip diff --git a/pubspec.yaml b/pubspec.yaml index b0d97f5..b70d86e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: biometric_storage description: | Secure Storage: Encrypted data store optionally secured by biometric lock with support for iOS, Android, MacOS. Partial support for Linux, Windows and web (localStorage). -version: 5.0.0+1 +version: 5.0.0+2 homepage: https://github.com/authpass/biometric_storage/ environment: