Skip to content

Commit

Permalink
Merge branch 'release/1.4.1' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
G00fY2 committed Apr 4, 2022
2 parents fabddaf + f50f46d commit 6472318
Show file tree
Hide file tree
Showing 15 changed files with 196 additions and 226 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Run detekt with ktlint
run: ./gradlew detektBundledDebug detektUnbundledDebug

Expand All @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Run bundled and unbundled unit tests
run: ./gradlew test

Expand All @@ -34,7 +34,7 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Build debug bundled sample app
run: ./gradlew :sample:assembleBundledDebug

Expand All @@ -43,6 +43,6 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Build debug unbundled sample app
run: ./gradlew :sample:assembleUnbundledDebug
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ There are two different flavors available on `mavenCentral()`:
| V3 model is used (faster, more accurate) | currently V1 model will be downloaded
```kotlin
// bundled:
implementation("io.github.g00fy2.quickie:quickie-bundled:1.4.0")
implementation("io.github.g00fy2.quickie:quickie-bundled:1.4.1")

// unbundled:
implementation("io.github.g00fy2.quickie:quickie-unbundled:1.4.0")
implementation("io.github.g00fy2.quickie:quickie-unbundled:1.4.1")
```

## Quick Start
Expand Down
30 changes: 22 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,24 @@ import io.gitlab.arturbosch.detekt.Detekt
import io.gitlab.arturbosch.detekt.extensions.DetektExtension
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

@Suppress("DSL_SCOPE_VIOLATION")
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 apply false
id(Plugins.Misc.gradleVersions) version Versions.gradleVersions
alias(libs.plugins.android.application) apply false
alias(libs.plugins.kotlin.androidGradle) apply false
alias(libs.plugins.misc.detekt) apply false
alias(libs.plugins.misc.gradleVersions)
}

subprojects {
apply(plugin = Plugins.Misc.detekt)
apply(plugin = rootProject.libs.plugins.misc.detekt.get().pluginId)
extensions.configure<DetektExtension> {
toolVersion = Versions.detekt
toolVersion = rootProject.libs.versions.detekt.get()
config = files("$rootDir/detekt.yml")
buildUponDefaultConfig = true
ignoredBuildTypes = listOf("release")
}
dependencies {
"detektPlugins"(Plugins.Misc.detektFormatting)
add("detektPlugins", rootProject.libs.misc.detektFormatting)
}
tasks.withType<Detekt>().configureEach {
jvmTarget = "1.8"
Expand All @@ -36,6 +37,12 @@ subprojects {
}
afterEvaluate {
extensions.configure<BaseExtension> {
compileSdkVersion(libs.versions.androidconfig.compileSdk.get().toInt())
buildToolsVersion(libs.versions.androidconfig.buildTools.get())
defaultConfig {
minSdk = libs.versions.androidconfig.minSdk.get().toInt()
targetSdk = libs.versions.androidconfig.targetSdk.get().toInt()
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
Expand All @@ -46,7 +53,14 @@ subprojects {

tasks.dependencyUpdates.configure {
gradleReleaseChannel = "current"
rejectVersionIf { Versions.maturityLevel(candidate.version) < Versions.maturityLevel(currentVersion) }

fun releaseType(version: String): Int {
val qualifiers = listOf("alpha", "beta", "m", "rc")
val index = qualifiers.indexOfFirst { version.matches(".*[.\\-]$it[.\\-\\d]*".toRegex(RegexOption.IGNORE_CASE)) }
return if (index < 0) qualifiers.size else index
}

rejectVersionIf { releaseType(candidate.version) < releaseType(currentVersion) }
}

tasks.register<Delete>("clean") {
Expand Down
12 changes: 0 additions & 12 deletions buildSrc/build.gradle.kts

This file was deleted.

25 changes: 0 additions & 25 deletions buildSrc/src/main/kotlin/Deps.kt

This file was deleted.

20 changes: 0 additions & 20 deletions buildSrc/src/main/kotlin/Plugins.kt

This file was deleted.

36 changes: 0 additions & 36 deletions buildSrc/src/main/kotlin/Versions.kt

This file was deleted.

54 changes: 54 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[versions]
quickie = "1.4.1"

androidconfig-minSdk = "21"
androidconfig-compileSdk = "31"
androidconfig-targetSdk = "31"
androidconfig-buildTools = "31.0.0"

androidGradle = "7.1.2"
kotlin = "1.6.20"

appcompat = "1.4.1"

cameraX = "1.0.2"
cameraView = "1.0.0-alpha32"

barcodeScanning = "17.0.2"
barcodeScanningGms = "18.0.0"

materialDesign = "1.5.0"

detekt = "1.19.0"
gradleVersions = "0.42.0"
dokka = "1.6.10"

junit = "5.8.2"

[libraries]
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
androidx-camera = { module = "androidx.camera:camera-camera2", version.ref = "cameraX" }
androidx-cameraLifecycle = { module = "androidx.camera:camera-lifecycle", version.ref = "cameraX" }
androidx-cameraPreview = { module = "androidx.camera:camera-view", version.ref = "cameraView" }

mlkit-barcodeScanning = { module = "com.google.mlkit:barcode-scanning", version.ref = "barcodeScanning" }
mlkit-barcodeScanningGms = { module = "com.google.android.gms:play-services-mlkit-barcode-scanning", version.ref = "barcodeScanningGms" }

google-materialDesign = { module = "com.google.android.material:material", version.ref = "materialDesign" }

test-junitApi = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit" }
test-junitEngine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit" }

misc-detektFormatting = { module = "io.gitlab.arturbosch.detekt:detekt-formatting", version.ref = "detekt" }

[plugins]
android-application = { id = "com.android.application", version.ref = "androidGradle" }
android-library = { id = "com.android.library", version.ref = "androidGradle" }

kotlin-androidGradle = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-android = { id = "kotlin-android", version.ref = "kotlin" }
kotlin-parcelize = { id = "kotlin-parcelize", version.ref = "kotlin" }
kotlin-dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }

misc-detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
misc-gradleVersions = { id = "com.github.ben-manes.versions", version.ref = "gradleVersions" }
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 6472318

Please sign in to comment.