Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ runs:
run: ./gradlew -p sample-app assembleRelease
- name: Build dokka
shell: bash
run: ./gradlew dokkaHtmlCollector
run: ./gradlew dokkaGeneratePublicationHtml
2 changes: 1 addition & 1 deletion .github/workflows/actions/doc/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class MavenCentralPublishConventionPlugin : Plugin<Project> {

val javadocJar = tasks.register("javadocJar", Jar::class.java) {
archiveClassifier.set("javadoc")
from(tasks.getByName("dokkaHtml"))
from(tasks.getByName("dokkaGeneratePublicationHtml"))
}

extensions.configure<PublishingExtension> {
Expand Down
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ kotlin.native.cacheKind.iosSimulatorArm64=none
compose.kotlin.native.manageCacheKind=false

# ok with "new" memory model
kotlin.native.binary.objcExportSuspendFunctionLaunchThreadRestriction=none
kotlin.native.binary.objcExportSuspendFunctionLaunchThreadRestriction=none

org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
23 changes: 12 additions & 11 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
8 changes: 8 additions & 0 deletions local.properties
Original file line number Diff line number Diff line change
@@ -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
15 changes: 2 additions & 13 deletions sample-app/shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
kotlin {
configureIosTargets()
sourceSets {
val commonMain by getting {
commonMain {
dependencies {
implementation(compose.runtime)
implementation(compose.foundation)
Expand All @@ -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<KotlinNativeTarget>().configureEach {
Expand Down
4 changes: 1 addition & 3 deletions scanner/src/androidMain/kotlin/BarcodeAnalyzer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down
2 changes: 1 addition & 1 deletion scanner/src/androidMain/kotlin/Scanner.android.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down