Skip to content

Commit

Permalink
Merge branch '1.0.0' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
G00fY2 committed May 5, 2021
2 parents 2b8fc53 + cc1e69c commit 5928197
Show file tree
Hide file tree
Showing 91 changed files with 1,615 additions and 126 deletions.
15 changes: 4 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<img width="345" height="120" src="https://raw.githubusercontent.com/G00fY2/Quickie/gh-pages/media/logo.png">
<img width="345" height="120" src="https://raw.githubusercontent.com/G00fY2/quickie/gh-pages/media/logo.png">
</p>

**quickie** is a Quick Response (QR) Code scanning library for Android that is based on CameraX and ML Kit on-device barcode detection. It's an alternative to ZXing based libraries and written in Kotlin. **quickie** features:
Expand All @@ -18,10 +18,10 @@ There are two different flavors available on `mavenCentral()`:
| V2 model is used (possibly faster, more accurate) | currently V1 model will be downloaded
```kotlin
// bundled:
implementation("io.github.g00fy2.quickie:quickie-bundled:0.7.2")
implementation("io.github.g00fy2.quickie:quickie-bundled:1.0.0")

// unbundled:
implementation("io.github.g00fy2.quickie:quickie-unbundled:0.7.2")
implementation("io.github.g00fy2.quickie:quickie-unbundled:1.0.0")
```

## Quick Start
Expand Down Expand Up @@ -66,14 +66,7 @@ The library is designed to behave and look as generic as possible while matching
## Screenshots / Sample App
You can find the sample app APKs inside the [release](https://github.com/G00fY2/quickie/releases) assets.
![Image](https://raw.githubusercontent.com/G00fY2/Quickie/gh-pages/media/quickie-device-demo.png)
## Release state
**quickie** relies on CameraX which is currently available as a release candidate. Here is what Google says about this release state:
* A release candidate is a prospective stable release.
* It may contain critical last-minute fixes.
Even though **quickie** is battle-tested (used in apps with 500k+ users) you should consider this library to be in pre-release state too. This will change once the dependent libraries hit stable.
![Image](https://raw.githubusercontent.com/G00fY2/quickie/gh-pages/media/quickie-device-demo.png)
## Requirements
* AndroidX
Expand Down
11 changes: 6 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,36 +1,37 @@
import com.android.build.gradle.BaseExtension
import io.gitlab.arturbosch.detekt.Detekt
import io.gitlab.arturbosch.detekt.extensions.DetektExtension
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
id(Plugins.Android.application) version Versions.androidGradle apply false
kotlin(Plugins.Kotlin.androidGradle) version Versions.kotlin apply false
id(Plugins.Misc.detekt) version Versions.detekt
id(Plugins.Misc.detekt) version Versions.detekt apply false
id(Plugins.Misc.gradleVersions) version Versions.gradleVersions
}

subprojects {
apply(plugin = Plugins.Misc.detekt)
detekt {
extensions.configure<DetektExtension> {
toolVersion = Versions.detekt
config = files("$rootDir/config/detekt/detekt.yml")
baseline = file("$projectDir/config/detekt/baseline.xml")
buildUponDefaultConfig = true
ignoredBuildTypes = listOf("release")
}
dependencies {
detektPlugins(Plugins.Misc.detektFormatting)
"detektPlugins"(Plugins.Misc.detektFormatting)
}
tasks.withType<Detekt>().configureEach {
jvmTarget = JavaVersion.VERSION_1_8.toString()
jvmTarget = "1.8"
}
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
allWarningsAsErrors = true
val arguments = mutableListOf("-progressive")
if (this@subprojects.name != "sample") arguments += "-Xexplicit-api=strict"
freeCompilerArgs = freeCompilerArgs + arguments
jvmTarget = JavaVersion.VERSION_1_8.toString()
jvmTarget = "1.8"
}
}
afterEvaluate {
Expand Down
4 changes: 0 additions & 4 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,4 @@ plugins {

repositories {
mavenCentral()
}

kotlinDslPluginOptions {
experimentalWarning.set(false)
}
12 changes: 6 additions & 6 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@ object Versions {
const val androidTargetSdk = 30
const val androidBuildTools = "30.0.3"

const val androidGradle = "4.1.3"
const val kotlin = "1.4.32"
const val androidGradle = "4.2.0"
const val kotlin = "1.5.0"

const val activity = "1.2.2"
const val activity = "1.2.3"
const val fragment = "1.3.3"
const val appcompat = "1.2.0"
const val core = "1.3.2"

const val cameraX = "1.0.0-rc05"
const val cameraX = "1.0.0"
const val cameraView = "1.0.0-alpha24"

const val materialDesign = "1.3.0"

const val barcodeScanning = "16.1.1"
const val barcodeScanningGms = "16.1.4"

const val detekt = "1.16.0"
const val detekt = "1.17.0-RC2"
const val gradleVersions = "0.38.0"
const val dokka = "1.4.30"
const val dokka = "1.4.32"

fun maturityLevel(version: String): Int {
val levels = listOf("alpha", "beta", "m", "rc")
Expand Down
18 changes: 9 additions & 9 deletions quickie/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ dependencies {
}

group = "io.github.g00fy2.quickie"
version = "0.7.2"
version = "1.0.0"

tasks.register<Jar>("androidJavadocJar") {
archiveClassifier.set("javadoc")
Expand Down Expand Up @@ -95,8 +95,8 @@ fun MavenPublication.commonConfig(artifactName: String) {
artifact(tasks.named("androidSourcesJar"))
pom {
name.set(artifactName)
description.set("Android QR code scanner library")
url.set("https://github.com/G00fY2/Quickie")
description.set("Android QR code scanning library")
url.set("https://github.com/G00fY2/quickie")
licenses {
license {
name.set("MIT License")
Expand All @@ -111,16 +111,16 @@ fun MavenPublication.commonConfig(artifactName: String) {
}
}
scm {
connection.set("https://github.com/G00fY2/Quickie.git")
developerConnection.set("https://github.com/G00fY2/Quickie.git")
url.set("https://github.com/G00fY2/Quickie")
connection.set("https://github.com/G00fY2/quickie.git")
developerConnection.set("https://github.com/G00fY2/quickie.git")
url.set("https://github.com/G00fY2/quickie")
}
}
}

fun Project.findStringProperty(propertyName: String): String? {
return findProperty(propertyName) as String? ?: {
logger.error("$propertyName missing in gradle.properties")
return findProperty(propertyName) as String? ?: run {
println("$propertyName missing in gradle.properties")
null
}()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import android.view.View
import android.widget.FrameLayout
import androidx.appcompat.widget.AppCompatTextView
import androidx.core.content.ContextCompat
import androidx.core.graphics.ColorUtils
import io.github.g00fy2.quickie.databinding.QuickieTextviewBinding
import kotlin.math.min
import kotlin.math.roundToInt
Expand All @@ -26,10 +27,11 @@ internal class QROverlayView @JvmOverloads constructor(
defStyleAttr: Int = 0
) : FrameLayout(context, attrs, defStyleAttr) {

private val strokeColor = ContextCompat.getColor(context, R.color.quickie_stroke_color)
private val strokeColor = ContextCompat.getColor(context, R.color.quickie_stroke)
private val highlightedStrokeColor = getAccentColor()
private val backgroundColor = ContextCompat.getColor(context, R.color.quickie_background_color)
private val alphaPaint = Paint().apply { alpha = Color.alpha(backgroundColor) }
private val backgroundColor =
ColorUtils.setAlphaComponent(ContextCompat.getColor(context, R.color.quickie_black), BACKGROUND_ALPHA.roundToInt())
private val alphaPaint = Paint().apply { alpha = BACKGROUND_ALPHA.roundToInt() }
private val strokePaint = Paint(Paint.ANTI_ALIAS_FLAG)
private val transparentPaint = Paint(Paint.ANTI_ALIAS_FLAG).apply {
color = ContextCompat.getColor(context, R.color.quickie_transparent)
Expand Down Expand Up @@ -113,6 +115,7 @@ internal class QROverlayView @JvmOverloads constructor(
}

companion object {
private const val BACKGROUND_ALPHA = 0.77 * 255
private const val STROKE_WIDTH = 4f
private const val OUT_RADIUS = 16f
private const val FRAME_MARGIN_RATIO = 1f / 4
Expand Down
21 changes: 20 additions & 1 deletion quickie/src/main/res/values-af/strings.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Copyright (C) 2021 Thomas Wirth
Copyright (C) 2007 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
This file has been modified by Thomas Wirth to only keep the
wifi_dpp_scan_qr_code wording form the aosp settings app strings.
-->
<resources>
<string name="quickie_scan_qr_code">"Skandeer QR-kode"</string>
</resources>
21 changes: 20 additions & 1 deletion quickie/src/main/res/values-am/strings.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Copyright (C) 2021 Thomas Wirth
Copyright (C) 2007 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
This file has been modified by Thomas Wirth to only keep the
wifi_dpp_scan_qr_code wording form the aosp settings app strings.
-->
<resources>
<string name="quickie_scan_qr_code">"QR ኮድን ይቃኙ"</string>
</resources>
21 changes: 20 additions & 1 deletion quickie/src/main/res/values-ar/strings.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Copyright (C) 2021 Thomas Wirth
Copyright (C) 2007 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
This file has been modified by Thomas Wirth to only keep the
wifi_dpp_scan_qr_code wording form the aosp settings app strings.
-->
<resources>
<string name="quickie_scan_qr_code">"مسح رمز الاستجابة السريعة"</string>
</resources>
21 changes: 20 additions & 1 deletion quickie/src/main/res/values-as/strings.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Copyright (C) 2021 Thomas Wirth
Copyright (C) 2007 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
This file has been modified by Thomas Wirth to only keep the
wifi_dpp_scan_qr_code wording form the aosp settings app strings.
-->
<resources>
<string name="quickie_scan_qr_code">"কিউআৰ ক’ড স্কেন কৰক"</string>
</resources>
21 changes: 20 additions & 1 deletion quickie/src/main/res/values-az/strings.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Copyright (C) 2021 Thomas Wirth
Copyright (C) 2007 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
This file has been modified by Thomas Wirth to only keep the
wifi_dpp_scan_qr_code wording form the aosp settings app strings.
-->
<resources>
<string name="quickie_scan_qr_code">"QR kodunu skan edin"</string>
</resources>
21 changes: 20 additions & 1 deletion quickie/src/main/res/values-be/strings.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Copyright (C) 2021 Thomas Wirth
Copyright (C) 2007 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
This file has been modified by Thomas Wirth to only keep the
wifi_dpp_scan_qr_code wording form the aosp settings app strings.
-->
<resources>
<string name="quickie_scan_qr_code">"Сканіраваць QR-код"</string>
</resources>
21 changes: 20 additions & 1 deletion quickie/src/main/res/values-bg/strings.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Copyright (C) 2021 Thomas Wirth
Copyright (C) 2007 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
This file has been modified by Thomas Wirth to only keep the
wifi_dpp_scan_qr_code wording form the aosp settings app strings.
-->
<resources>
<string name="quickie_scan_qr_code">"Сканиране на QR кода"</string>
</resources>
21 changes: 20 additions & 1 deletion quickie/src/main/res/values-bn/strings.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Copyright (C) 2021 Thomas Wirth
Copyright (C) 2007 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
This file has been modified by Thomas Wirth to only keep the
wifi_dpp_scan_qr_code wording form the aosp settings app strings.
-->
<resources>
<string name="quickie_scan_qr_code">"QR কোড স্ক্যান করুন"</string>
</resources>
Loading

0 comments on commit 5928197

Please sign in to comment.