Fix #2593: Migrate to androidX (#2594)

* Update dependencies and migrate to androidX
* Make gradle properties tidy
This commit is contained in:
Vivek Maskara 2019-03-16 16:52:37 +05:30 committed by Adam Jones
parent 5b1b0037c3
commit 57e685cf6c
173 changed files with 518 additions and 506 deletions

View file

@ -40,6 +40,7 @@ dependencies {
implementation 'com.karumi:dexter:5.0.0'
implementation "com.jakewharton:butterknife:$BUTTERKNIFE_VERSION"
kapt "com.jakewharton:butterknife-compiler:$BUTTERKNIFE_VERSION"
// Logging
implementation 'ch.acra:acra:4.9.2'
implementation 'com.jakewharton.timber:timber:4.7.1'
@ -65,10 +66,10 @@ dependencies {
// Android testing
androidTestImplementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$KOTLIN_VERSION"
androidTestImplementation 'com.squareup.okhttp3:mockwebserver:3.10.0'
androidTestImplementation 'com.android.support.test:rules:1.0.2'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation "com.android.support:support-annotations:$SUPPORT_LIB_VERSION"
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestImplementation 'androidx.test:rules:1.1.2-alpha02'
androidTestImplementation 'androidx.test:runner:1.1.2-alpha02'
androidTestImplementation "androidx.annotation:annotation:1.0.2"
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0-alpha02'
androidTestImplementation 'org.mockito:mockito-core:2.10.0'
// Debugging
@ -78,12 +79,12 @@ dependencies {
testImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$LEAK_CANARY_VERSION"
// Support libraries
implementation "com.android.support:support-v4:$SUPPORT_LIB_VERSION"
implementation "com.android.support:appcompat-v7:$SUPPORT_LIB_VERSION"
implementation "com.android.support:design:$SUPPORT_LIB_VERSION"
implementation "com.android.support:customtabs:$SUPPORT_LIB_VERSION"
implementation "com.android.support:cardview-v7:$SUPPORT_LIB_VERSION"
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation "androidx.legacy:legacy-support-v4:1.0.0"
implementation "androidx.appcompat:appcompat:1.0.2"
implementation "com.google.android.material:material:1.1.0-alpha04"
implementation "androidx.browser:browser:1.0.0"
implementation "androidx.cardview:cardview:1.0.0"
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
//swipe_layout
implementation 'com.daimajia.swipelayout:library:1.2.0@aar'
@ -92,8 +93,8 @@ dependencies {
}
android {
compileSdkVersion project.compileSdkVersion
buildToolsVersion project.buildToolsVersion
compileSdkVersion 28
buildToolsVersion "28.0.3"
defaultConfig {
applicationId 'fr.free.nrw.commons'
@ -103,10 +104,15 @@ android {
minSdkVersion 15
targetSdkVersion 28
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
packagingOptions {
exclude 'META-INF/androidx.*'
exclude 'META-INF/proguard/androidx-annotations.pro'
}
testOptions {
unitTests.returnDefaultValues = true
@ -154,6 +160,10 @@ android {
signingConfigs.release.keyPassword = System.getenv("key_password")
}
configurations.all {
resolutionStrategy.force 'androidx.annotation:annotation:1.0.2'
}
flavorDimensions 'tier'
productFlavors {
prod {