Skip to content

Commit

Permalink
Upgrade zxing library
Browse files Browse the repository at this point in the history
This is needed to be able to perform fresh builds. jcenter is gone
which means we can't fetch our older zxing dependency anymore.

zxing now requires androidx so use that for the compat library.

The docs for zxing say that this version requires at least sdk
24 so bump our min version to that.

Closes: #46 [via git-merge-pr]
  • Loading branch information
psanford committed Dec 27, 2024
1 parent 1c13ab4 commit d89e49a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
11 changes: 5 additions & 6 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
Expand All @@ -11,7 +11,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
flatDir {
dirs 'libs'
}
Expand All @@ -26,7 +26,7 @@ android {
buildToolsVersion "33.0.2"
compileSdkVersion 30
defaultConfig {
minSdkVersion 22
minSdkVersion 24
targetSdkVersion 34
versionCode 18
versionName "1.0.13"
Expand All @@ -39,7 +39,6 @@ android {

dependencies {
implementation ':wormhole-william@aar'
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.google.zxing:core:3.2.1'
implementation 'com.journeyapps:zxing-android-embedded:3.2.0@aar'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
}
2 changes: 2 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
android.useAndroidX=true

3 changes: 1 addition & 2 deletions android/src/main/java/io/sanford/wormholewilliam/Scan.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ public void run() {

@Override public void onAttach(Context ctx) {
super.onAttach(ctx);

IntentIntegrator integrator = IntentIntegrator.forFragment(this);
integrator.setDesiredBarcodeFormats(IntentIntegrator.QR_CODE_TYPES);
integrator.setDesiredBarcodeFormats(IntentIntegrator.QR_CODE);
integrator.setPrompt("Scan");
integrator.setCameraId(0);
integrator.setBeepEnabled(false);
Expand Down

0 comments on commit d89e49a

Please sign in to comment.