Merge pull request #72 from victoraldir/improvement/migrate-to-androidx

Increase gradle version and migrate to androidx
This commit is contained in:
Matthew Smith 2019-02-06 06:42:54 -08:00 committed by GitHub
commit 5d498e39a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 9 deletions

View File

@ -7,11 +7,12 @@ buildscript {
maven { maven {
url "https://maven.google.com" url "https://maven.google.com"
} }
google()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.1.4' classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.51' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.20"
} }
} }
@ -21,6 +22,7 @@ rootProject.allprojects {
maven { maven {
url "https://maven.google.com" url "https://maven.google.com"
} }
google()
} }
} }
@ -29,7 +31,6 @@ apply plugin: 'kotlin-android'
android { android {
compileSdkVersion 28 compileSdkVersion 28
buildToolsVersion '27.0.3'
sourceSets { sourceSets {
main.java.srcDirs += 'src/main/kotlin' main.java.srcDirs += 'src/main/kotlin'
@ -39,7 +40,7 @@ android {
targetSdkVersion 28 targetSdkVersion 28
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
@ -47,7 +48,8 @@ android {
} }
dependencies { dependencies {
implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.51' implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.51'
implementation 'me.dm7.barcodescanner:zxing:1.9.8' implementation 'me.dm7.barcodescanner:zxing:1.9.8'
api 'com.android.support:design:27.1.1' api 'com.google.android.material:material:1.0.0-beta01'
} }

View File

@ -1 +1,3 @@
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536M org.gradle.jvmargs=-Xmx1536M

View File

@ -1,6 +1,6 @@
#Fri Jun 23 08:50:38 CEST 2017 #Wed Jan 30 20:42:57 BRST 2019
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip

View File

@ -5,8 +5,8 @@ import android.app.Activity
import android.content.Intent import android.content.Intent
import android.content.pm.PackageManager import android.content.pm.PackageManager
import android.os.Bundle import android.os.Bundle
import android.support.v4.app.ActivityCompat import androidx.core.app.ActivityCompat
import android.support.v4.content.ContextCompat import androidx.core.content.ContextCompat
import android.view.Menu import android.view.Menu
import android.view.MenuItem import android.view.MenuItem
import com.google.zxing.Result import com.google.zxing.Result