Skip to content

Commit

Permalink
Use desugaring to upgrade zxing without having to increase minSdk
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLastProject committed Jul 28, 2021
1 parent 96bc105 commit cbcf1bc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
10 changes: 7 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ android {
versionName "2.0.4"

vectorDrawables.useSupportLibrary true
multiDexEnabled true
}

buildTypes {
Expand All @@ -38,6 +39,10 @@ android {

compileOptions {
encoding "UTF-8"

// Flag to enable support for the new language APIs
coreLibraryDesugaringEnabled true

sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
Expand Down Expand Up @@ -74,12 +79,11 @@ dependencies {
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.preference:preference:1.1.1'
implementation 'com.google.android.material:material:1.4.0'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'

// Third-party
implementation 'com.journeyapps:zxing-android-embedded:4.1.0@aar'
// Do not upgrade past 3.3.3! Causes a crash on versions before Android Nougat
//noinspection GradleDependency
implementation 'com.google.zxing:core:3.3.3'
implementation 'com.google.zxing:core:3.4.1'
implementation 'org.apache.commons:commons-csv:1.8'
implementation 'com.jaredrummler:colorpicker:1.1.0'
implementation 'com.google.guava:guava:30.1.1-jre'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package protect.card_locker;

import android.app.Application;

import androidx.appcompat.app.AppCompatDelegate;
import androidx.multidex.MultiDexApplication;
import protect.card_locker.preferences.Settings;

public class LoyaltyCardLockerApplication extends Application {
public class LoyaltyCardLockerApplication extends MultiDexApplication {
public void onCreate() {
super.onCreate();

Expand Down

0 comments on commit cbcf1bc

Please sign in to comment.