Skip to content

Commit

Permalink
add empty implementation for jvm
Browse files Browse the repository at this point in the history
  • Loading branch information
kalinjul committed Mar 13, 2024
1 parent 965fcdf commit 220414d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ Currently, the implementation is rather rudimentary.
# Dependency
Add the dependency to your commonMain sourceSet (KMP) / Android dependencies (android only):
```kotlin
implementation("io.github.kalinjul.easyqrscan:scanner:0.1.1")
implementation("io.github.kalinjul.easyqrscan:scanner:0.1.3")
```

Or, for your libs.versions.toml:
```toml
[versions]
easyqrscan = "0.1.0"
easyqrscan = "0.1.2"
[libraries]
easyqrscan = { module = "io.github.kalinjul.easyqrscan:scanner", version.ref = "easyqrscan" }
```
Expand Down
6 changes: 6 additions & 0 deletions scanner/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ description = "Compose Multiplatform QR Code Scanner for Android/iOS"

kotlin {
configureIosTargets()
jvm()

sourceSets {
commonMain {
Expand All @@ -30,5 +31,10 @@ kotlin {
implementation(libs.mlkit.barcode.scanning)
}
}

jvmMain {
dependencies {
}
}
}
}
14 changes: 14 additions & 0 deletions scanner/src/jvmMain/kotlin/Scanner.jvm.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package org.publicvalue.multiplatform.qrcode

import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier

@Composable
actual fun Scanner(
modifier: Modifier,
onScanned: (String) -> Boolean,
types: List<CodeType>
) {
Text("Scanner not implemented for JVM")
}

0 comments on commit 220414d

Please sign in to comment.