diff --git a/.github/workflows/actions/build/action.yml b/.github/workflows/actions/build/action.yml index ea4570e..09ab4e1 100644 --- a/.github/workflows/actions/build/action.yml +++ b/.github/workflows/actions/build/action.yml @@ -13,4 +13,4 @@ runs: run: ./gradlew -p sample-app assembleRelease - name: Build dokka shell: bash - run: ./gradlew dokkaHtmlCollector \ No newline at end of file + run: ./gradlew dokkaGeneratePublicationHtml \ No newline at end of file diff --git a/.github/workflows/actions/doc/action.yml b/.github/workflows/actions/doc/action.yml index fab0171..767e3b1 100644 --- a/.github/workflows/actions/doc/action.yml +++ b/.github/workflows/actions/doc/action.yml @@ -7,7 +7,7 @@ runs: - uses: ./.github/workflows/actions/prepare - name: Build dokka shell: bash - run: ./gradlew dokkaHtmlCollector + run: ./gradlew dokkaGeneratePublicationHtml - uses: actions/upload-artifact@v4 with: name: easyqrscan-dokka diff --git a/README.md b/README.md index d54492f..c715acf 100644 --- a/README.md +++ b/README.md @@ -15,17 +15,18 @@ Supported Compose version: | 1.6.x | 0.1.0+ | | 1.7 | 0.2 - 0.3 | | 1.8 | 0.4.0 | +| 1.9 | 0.5.0 | # Dependency Add the dependency to your commonMain sourceSet (KMP) / Android dependencies (android only): ```kotlin -implementation("io.github.kalinjul.easyqrscan:scanner:0.4.0") +implementation("io.github.kalinjul.easyqrscan:scanner:0.5.0") ``` Or, for your libs.versions.toml: ```toml [versions] -easyqrscan = "0.4.0" +easyqrscan = "0.5.0" [libraries] easyqrscan = { module = "io.github.kalinjul.easyqrscan:scanner", version.ref = "easyqrscan" } ``` diff --git a/build-logic/convention/src/main/kotlin/org/publicvalue/convention/MavenCentralPublishConventionPlugin.kt b/build-logic/convention/src/main/kotlin/org/publicvalue/convention/MavenCentralPublishConventionPlugin.kt index ea989af..11ffe50 100644 --- a/build-logic/convention/src/main/kotlin/org/publicvalue/convention/MavenCentralPublishConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/org/publicvalue/convention/MavenCentralPublishConventionPlugin.kt @@ -33,7 +33,7 @@ class MavenCentralPublishConventionPlugin : Plugin { val javadocJar = tasks.register("javadocJar", Jar::class.java) { archiveClassifier.set("javadoc") - from(tasks.getByName("dokkaHtml")) + from(tasks.getByName("dokkaGeneratePublicationHtml")) } extensions.configure { diff --git a/gradle.properties b/gradle.properties index 46c41d3..8371870 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,4 +18,6 @@ kotlin.native.cacheKind.iosSimulatorArm64=none compose.kotlin.native.manageCacheKind=false # ok with "new" memory model -kotlin.native.binary.objcExportSuspendFunctionLaunchThreadRestriction=none \ No newline at end of file +kotlin.native.binary.objcExportSuspendFunctionLaunchThreadRestriction=none + +org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index c71ebe6..ac3fe9f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,29 +1,30 @@ [versions] -compileSdk = "35" -targetSdk = "35" +compileSdk = "36" +targetSdk = "36" minSdk = "21" jvmTarget = "17" # https://developer.android.com/build/releases/gradle-plugin#compatibility -agp = "8.7.3" +agp = "8.11.1" #https://github.com/JetBrains/compose-multiplatform -compose-multiplatform = "1.8.0" -kotlin = "2.1.20" +compose-multiplatform = "1.9.0" +#https://kotlinlang.org/docs/multiplatform-compatibility-guide.html +kotlin = "2.2.20" # https://github.com/google/ksp -ksp = "2.1.20-1.0.32" +ksp = "2.2.20-2.0.3" #https://mvnrepository.com/artifact/org.jetbrains.compose.compiler/compiler #composeCompiler = "1.5.8.1" # https://developer.android.com/jetpack/androidx/releases/activity -androidxActivity = "1.10.1" +androidxActivity = "1.11.0" # https://developer.android.com/jetpack/androidx/releases/appcompat -androidxAppCompat = "1.7.0" -coreKtx = "1.16.0" +androidxAppCompat = "1.7.1" +coreKtx = "1.17.0" -dokka = "1.9.10" -nexus-publish-plugin = "1.3.0" +dokka = "2.0.0" +nexus-publish-plugin = "2.0.0" accompanist = "0.37.3" androidxCamera = "1.4.2" mlkit = "17.3.0" diff --git a/local.properties b/local.properties new file mode 100644 index 0000000..e714b91 --- /dev/null +++ b/local.properties @@ -0,0 +1,8 @@ +## This file must *NOT* be checked into Version Control Systems, +# as it contains information specific to your local configuration. +# +# Location of the SDK. This is only used by Gradle. +# For customization when using a Version Control System, please read the +# header note. +#Mon Sep 29 13:54:55 CEST 2025 +sdk.dir=/Users/KalinJul/Library/Android/sdk diff --git a/sample-app/shared/build.gradle.kts b/sample-app/shared/build.gradle.kts index ad64740..9495baf 100644 --- a/sample-app/shared/build.gradle.kts +++ b/sample-app/shared/build.gradle.kts @@ -11,7 +11,7 @@ plugins { kotlin { configureIosTargets() sourceSets { - val commonMain by getting { + commonMain { dependencies { implementation(compose.runtime) implementation(compose.foundation) @@ -20,21 +20,10 @@ kotlin { implementation(projects.scanner) } } - val androidMain by getting { + androidMain { dependencies { -// api(libs.androidx.activity.compose) -// api(libs.androidx.core.ktx) } } - val iosX64Main by getting - val iosArm64Main by getting - val iosSimulatorArm64Main by getting - val iosMain by getting { - dependsOn(commonMain) - iosX64Main.dependsOn(this) - iosArm64Main.dependsOn(this) - iosSimulatorArm64Main.dependsOn(this) - } } targets.withType().configureEach { diff --git a/scanner/src/androidMain/kotlin/BarcodeAnalyzer.kt b/scanner/src/androidMain/kotlin/BarcodeAnalyzer.kt index 93f5db3..f9aef03 100644 --- a/scanner/src/androidMain/kotlin/BarcodeAnalyzer.kt +++ b/scanner/src/androidMain/kotlin/BarcodeAnalyzer.kt @@ -29,9 +29,7 @@ class BarcodeAnalyzer( ).addOnSuccessListener { barcode -> barcode?.takeIf { it.isNotEmpty() } ?.mapNotNull { it.rawValue } - ?.joinToString(",") - ?.let { -// Toast.makeText(context, it, Toast.LENGTH_SHORT).show() + ?.forEach { if (onScanned(it)) { scanner.close() } diff --git a/scanner/src/androidMain/kotlin/Scanner.android.kt b/scanner/src/androidMain/kotlin/Scanner.android.kt index f01156d..2bbab8f 100644 --- a/scanner/src/androidMain/kotlin/Scanner.android.kt +++ b/scanner/src/androidMain/kotlin/Scanner.android.kt @@ -50,7 +50,7 @@ class AccompanistPermissionWrapper (val accPermissionState: PermissionState, pri override fun goToSettings() { val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS) intent.data = Uri.parse("package:" + context.packageName) - ContextCompat.startActivity(context, intent, null) + context.startActivity(intent, null) } }