Skip to content

Commit a971f09

Browse files
committed
Merge branch 'release/1.10.0'
# Conflicts: # README.md
2 parents 78cc9ca + 8716a0f commit a971f09

File tree

16 files changed

+84
-40
lines changed

16 files changed

+84
-40
lines changed

.github/CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Make sure to get working code on a personal branch with tests and sanity checks
1515
```shell
1616
./gradlew detektBundledDebug detektUnbundledDebug
1717
./gradlew test
18+
./gradlew :sample:lintBundledDebug
19+
./gradlew :sample:lintUnbundledDebug
1820
./gradlew :sample:assembleBundledDebug
1921
./gradlew :sample:assembleUnbundledDebug
2022
```

.github/workflows/build.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,19 @@ jobs:
3737
- name: Run bundled and unbundled unit tests
3838
run: ./gradlew test
3939

40+
android_lint:
41+
name: Android lint
42+
runs-on: ubuntu-latest
43+
44+
steps:
45+
- uses: actions/checkout@v4
46+
- uses: actions/setup-java@v4
47+
with:
48+
distribution: 'zulu'
49+
java-version: '17'
50+
- name: Run Android lint
51+
run: ./gradlew :sample:lintBundledDebug :sample:lintUnbundledDebug
52+
4053
build_bundled:
4154
name: Build bundled debug
4255
runs-on: ubuntu-latest

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ There are two different flavors available on `mavenCentral()`:
1818

1919
```kotlin
2020
// bundled:
21-
implementation("io.github.g00fy2.quickie:quickie-bundled:1.9.0")
21+
implementation("io.github.g00fy2.quickie:quickie-bundled:1.10.0")
2222

2323
// unbundled:
24-
implementation("io.github.g00fy2.quickie:quickie-unbundled:1.9.0")
24+
implementation("io.github.g00fy2.quickie:quickie-unbundled:1.10.0")
2525
```
2626

2727
## Quick Start
@@ -116,6 +116,7 @@ override fun onCreate(savedInstanceState: Bundle?) {
116116
setShowCloseButton(true) // show or hide (default) close button
117117
setHorizontalFrameRatio(2.2f) // set the horizontal overlay ratio (default is 1 / square frame)
118118
setUseFrontCamera(true) // use the front camera
119+
setKeepScreenOn(true) // keep the device's screen turned on
119120
}
120121
)
121122
}

gradle/libs.versions.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
[versions]
2-
quickie = "1.9.0"
2+
quickie = "1.10.0"
33

44
androidconfig-minSdk = "21"
55
androidconfig-compileSdk = "34"
66
androidconfig-targetSdk = "33"
77
androidconfig-buildTools = "34.0.0"
88

9-
androidGradle = "8.2.0"
10-
kotlin = "1.9.21"
9+
androidGradle = "8.4.0"
10+
kotlin = "1.9.23"
1111

1212
appcompat = "1.6.1"
13-
core = "1.12.0"
13+
core = "1.13.1"
1414

15-
cameraX = "1.3.0"
15+
cameraX = "1.3.3"
1616

1717
barcodeScanning = "17.2.0"
1818
barcodeScanningGms = "18.3.0"
1919

20-
materialDesign = "1.10.0"
20+
materialDesign = "1.12.0"
2121

22-
detekt = "1.23.4"
23-
dokka = "1.9.10"
22+
detekt = "1.23.6"
23+
dokka = "1.9.20"
2424

25-
junit = "5.10.1"
25+
junit = "5.10.2"
2626

2727
[libraries]
2828
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }

gradle/wrapper/gradle-wrapper.jar

-9 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew.bat

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
4343
%JAVA_EXE% -version >NUL 2>&1
4444
if %ERRORLEVEL% equ 0 goto execute
4545

46-
echo.
47-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48-
echo.
49-
echo Please set the JAVA_HOME variable in your environment to match the
50-
echo location of your Java installation.
46+
echo. 1>&2
47+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
48+
echo. 1>&2
49+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
50+
echo location of your Java installation. 1>&2
5151

5252
goto fail
5353

@@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5757

5858
if exist "%JAVA_EXE%" goto execute
5959

60-
echo.
61-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62-
echo.
63-
echo Please set the JAVA_HOME variable in your environment to match the
64-
echo location of your Java installation.
60+
echo. 1>&2
61+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
62+
echo. 1>&2
63+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
64+
echo location of your Java installation. 1>&2
6565

6666
goto fail
6767

quickie/src/main/AndroidManifest.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<manifest xmlns:tools="http://schemas.android.com/tools"
3+
xmlns:android="http://schemas.android.com/apk/res/android">
34

45
<uses-feature
56
android:name="android.hardware.camera"
@@ -12,7 +13,8 @@
1213
<activity
1314
android:name=".QRScannerActivity"
1415
android:screenOrientation="behind"
15-
android:theme="@style/QuickieScannerActivity"/>
16+
android:theme="@style/QuickieScannerActivity"
17+
tools:ignore="DiscouragedApi"/>
1618

1719
</application>
1820

quickie/src/main/kotlin/io/github/g00fy2/quickie/QRResult.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ public sealed class QRResult {
1414
/**
1515
* Activity got cancelled by the user.
1616
*/
17-
public object QRUserCanceled : QRResult()
17+
public data object QRUserCanceled : QRResult()
1818

1919
/**
2020
* Camera permission was not granted.
2121
*/
22-
public object QRMissingPermission : QRResult()
22+
public data object QRMissingPermission : QRResult()
2323

2424
/**
2525
* Error while setting up CameraX or while MLKit analysis.

quickie/src/main/kotlin/io/github/g00fy2/quickie/QRScannerActivity.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import android.util.Size
1010
import android.view.HapticFeedbackConstants
1111
import android.view.KeyEvent
1212
import android.view.View
13+
import android.view.WindowManager
1314
import androidx.activity.result.contract.ActivityResultContracts
1415
import androidx.appcompat.app.AppCompatActivity
1516
import androidx.appcompat.view.ContextThemeWrapper
@@ -195,6 +196,8 @@ internal class QRScannerActivity : AppCompatActivity() {
195196
showTorchToggle = it.showTorchToggle
196197
useFrontCamera = it.useFrontCamera
197198
showCloseButton = it.showCloseButton
199+
200+
if (it.keepScreenOn) window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
198201
}
199202
}
200203

0 commit comments

Comments
 (0)