mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
Update mapbox map
This commit is contained in:
parent
54e3be9037
commit
6ab2f03c82
1 changed files with 6 additions and 44 deletions
|
|
@ -1,22 +1,17 @@
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.github.triplet.play' version '2.2.1' apply false
|
id 'com.github.triplet.play' version '2.2.1' apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: '../gitutils.gradle'
|
apply from: '../gitutils.gradle'
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
apply plugin: 'kotlin-kapt'
|
apply plugin: 'kotlin-kapt'
|
||||||
apply plugin: 'jacoco-android'
|
apply plugin: 'jacoco-android'
|
||||||
apply from: 'quality.gradle'
|
apply from: 'quality.gradle'
|
||||||
|
|
||||||
def isRunningOnTravisAndIsNotPRBuild = System.getenv("CI") == "true" && file('../play.p12').exists()
|
def isRunningOnTravisAndIsNotPRBuild = System.getenv("CI") == "true" && file('../play.p12').exists()
|
||||||
|
|
||||||
if(isRunningOnTravisAndIsNotPRBuild) {
|
if(isRunningOnTravisAndIsNotPRBuild) {
|
||||||
apply plugin: 'com.github.triplet.play'
|
apply plugin: 'com.github.triplet.play'
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
||||||
// Utils
|
// Utils
|
||||||
implementation 'com.github.nicolas-raoul:Quadtree:ac16ea8035bf07'
|
implementation 'com.github.nicolas-raoul:Quadtree:ac16ea8035bf07'
|
||||||
implementation 'com.google.code.gson:gson:2.8.5'
|
implementation 'com.google.code.gson:gson:2.8.5'
|
||||||
|
|
@ -33,19 +28,17 @@ dependencies {
|
||||||
implementation 'com.drewnoakes:metadata-extractor:2.11.0'
|
implementation 'com.drewnoakes:metadata-extractor:2.11.0'
|
||||||
implementation 'com.dmitrybrant:wikimedia-android-data-client:0.0.18'
|
implementation 'com.dmitrybrant:wikimedia-android-data-client:0.0.18'
|
||||||
implementation 'org.apache.commons:commons-lang3:3.8.1'
|
implementation 'org.apache.commons:commons-lang3:3.8.1'
|
||||||
|
|
||||||
// UI
|
// UI
|
||||||
implementation 'fr.avianey.com.viewpagerindicator:library:2.4.1.1@aar'
|
implementation 'fr.avianey.com.viewpagerindicator:library:2.4.1.1@aar'
|
||||||
implementation 'com.github.chrisbanes:PhotoView:2.0.0'
|
implementation 'com.github.chrisbanes:PhotoView:2.0.0'
|
||||||
implementation 'com.github.pedrovgs:renderers:3.3.3'
|
implementation 'com.github.pedrovgs:renderers:3.3.3'
|
||||||
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:8.1.0'
|
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:7.2.0'
|
||||||
implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-localization-v8:0.10.0'
|
implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-localization-v7:0.7.0'
|
||||||
implementation 'com.github.deano2390:MaterialShowcaseView:1.2.0'
|
implementation 'com.github.deano2390:MaterialShowcaseView:1.2.0'
|
||||||
implementation 'com.dinuscxj:circleprogressbar:1.1.1'
|
implementation 'com.dinuscxj:circleprogressbar:1.1.1'
|
||||||
implementation 'com.karumi:dexter:5.0.0'
|
implementation 'com.karumi:dexter:5.0.0'
|
||||||
implementation "com.jakewharton:butterknife:$BUTTERKNIFE_VERSION"
|
implementation "com.jakewharton:butterknife:$BUTTERKNIFE_VERSION"
|
||||||
kapt "com.jakewharton:butterknife-compiler:$BUTTERKNIFE_VERSION"
|
kapt "com.jakewharton:butterknife-compiler:$BUTTERKNIFE_VERSION"
|
||||||
|
|
||||||
// Logging
|
// Logging
|
||||||
implementation 'ch.acra:acra-dialog:5.3.0'
|
implementation 'ch.acra:acra-dialog:5.3.0'
|
||||||
implementation 'ch.acra:acra-mail:5.3.0'
|
implementation 'ch.acra:acra-mail:5.3.0'
|
||||||
|
|
@ -54,13 +47,11 @@ dependencies {
|
||||||
api('com.github.tony19:logback-android-classic:1.1.1-6') {
|
api('com.github.tony19:logback-android-classic:1.1.1-6') {
|
||||||
exclude group: 'com.google.android', module: 'android'
|
exclude group: 'com.google.android', module: 'android'
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dependency injector
|
// Dependency injector
|
||||||
implementation "com.google.dagger:dagger:$DAGGER_VERSION"
|
implementation "com.google.dagger:dagger:$DAGGER_VERSION"
|
||||||
implementation "com.google.dagger:dagger-android-support:$DAGGER_VERSION"
|
implementation "com.google.dagger:dagger-android-support:$DAGGER_VERSION"
|
||||||
kapt "com.google.dagger:dagger-android-processor:$DAGGER_VERSION"
|
kapt "com.google.dagger:dagger-android-processor:$DAGGER_VERSION"
|
||||||
kapt "com.google.dagger:dagger-compiler:$DAGGER_VERSION"
|
kapt "com.google.dagger:dagger-compiler:$DAGGER_VERSION"
|
||||||
|
|
||||||
// Unit testing
|
// Unit testing
|
||||||
testImplementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$KOTLIN_VERSION"
|
testImplementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$KOTLIN_VERSION"
|
||||||
testImplementation "org.jetbrains.kotlin:kotlin-reflect:$KOTLIN_VERSION"
|
testImplementation "org.jetbrains.kotlin:kotlin-reflect:$KOTLIN_VERSION"
|
||||||
|
|
@ -71,7 +62,6 @@ dependencies {
|
||||||
testImplementation 'com.squareup.okhttp3:mockwebserver:3.10.0'
|
testImplementation 'com.squareup.okhttp3:mockwebserver:3.10.0'
|
||||||
testImplementation "org.powermock:powermock-module-junit4:2.0.0-beta.5"
|
testImplementation "org.powermock:powermock-module-junit4:2.0.0-beta.5"
|
||||||
testImplementation "org.powermock:powermock-api-mockito2:2.0.0-beta.5"
|
testImplementation "org.powermock:powermock-api-mockito2:2.0.0-beta.5"
|
||||||
|
|
||||||
// Android testing
|
// Android testing
|
||||||
androidTestImplementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$KOTLIN_VERSION"
|
androidTestImplementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$KOTLIN_VERSION"
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
|
||||||
|
|
@ -83,74 +73,59 @@ dependencies {
|
||||||
androidTestImplementation 'com.squareup.okhttp3:mockwebserver:3.10.0'
|
androidTestImplementation 'com.squareup.okhttp3:mockwebserver:3.10.0'
|
||||||
androidTestImplementation 'org.mockito:mockito-core:2.10.0'
|
androidTestImplementation 'org.mockito:mockito-core:2.10.0'
|
||||||
androidTestUtil 'androidx.test:orchestrator:1.1.1'
|
androidTestUtil 'androidx.test:orchestrator:1.1.1'
|
||||||
|
|
||||||
// Debugging
|
// Debugging
|
||||||
debugImplementation "com.squareup.leakcanary:leakcanary-android:$LEAK_CANARY_VERSION"
|
debugImplementation "com.squareup.leakcanary:leakcanary-android:$LEAK_CANARY_VERSION"
|
||||||
releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$LEAK_CANARY_VERSION"
|
releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$LEAK_CANARY_VERSION"
|
||||||
testImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$LEAK_CANARY_VERSION"
|
testImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$LEAK_CANARY_VERSION"
|
||||||
|
|
||||||
// Support libraries
|
// Support libraries
|
||||||
implementation "com.google.android.material:material:1.1.0-alpha04"
|
implementation "com.google.android.material:material:1.1.0-alpha04"
|
||||||
implementation "androidx.browser:browser:1.0.0"
|
implementation "androidx.browser:browser:1.0.0"
|
||||||
implementation "androidx.cardview:cardview:1.0.0"
|
implementation "androidx.cardview:cardview:1.0.0"
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||||||
implementation "androidx.exifinterface:exifinterface:1.0.0"
|
implementation "androidx.exifinterface:exifinterface:1.0.0"
|
||||||
|
|
||||||
//swipe_layout
|
//swipe_layout
|
||||||
implementation 'com.daimajia.swipelayout:library:1.2.0@aar'
|
implementation 'com.daimajia.swipelayout:library:1.2.0@aar'
|
||||||
//metadata extractor
|
//metadata extractor
|
||||||
implementation 'com.drewnoakes:metadata-extractor:2.11.0'
|
implementation 'com.drewnoakes:metadata-extractor:2.11.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 28
|
compileSdkVersion 28
|
||||||
buildToolsVersion "28.0.3"
|
buildToolsVersion "28.0.3"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId 'fr.free.nrw.commons'
|
applicationId 'fr.free.nrw.commons'
|
||||||
versionCode 243
|
versionCode 243
|
||||||
versionName '2.10.2'
|
versionName '2.10.2'
|
||||||
setProperty("archivesBaseName", "app-commons-v$versionName-" + getBranchName())
|
setProperty("archivesBaseName", "app-commons-v$versionName-" + getBranchName())
|
||||||
|
|
||||||
minSdkVersion 19
|
minSdkVersion 19
|
||||||
targetSdkVersion 28
|
targetSdkVersion 28
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
testInstrumentationRunnerArguments clearPackageData: 'true'
|
testInstrumentationRunnerArguments clearPackageData: 'true'
|
||||||
|
|
||||||
testOptions {
|
testOptions {
|
||||||
execution 'ANDROIDX_TEST_ORCHESTRATOR'
|
execution 'ANDROIDX_TEST_ORCHESTRATOR'
|
||||||
}
|
}
|
||||||
|
|
||||||
vectorDrawables.useSupportLibrary = true
|
vectorDrawables.useSupportLibrary = true
|
||||||
}
|
}
|
||||||
|
|
||||||
packagingOptions {
|
packagingOptions {
|
||||||
exclude 'META-INF/androidx.*'
|
exclude 'META-INF/androidx.*'
|
||||||
exclude 'META-INF/proguard/androidx-annotations.pro'
|
exclude 'META-INF/proguard/androidx-annotations.pro'
|
||||||
}
|
}
|
||||||
|
|
||||||
testOptions {
|
testOptions {
|
||||||
unitTests.returnDefaultValues = true
|
unitTests.returnDefaultValues = true
|
||||||
unitTests.includeAndroidResources = true
|
unitTests.includeAndroidResources = true
|
||||||
|
|
||||||
unitTests.all {
|
unitTests.all {
|
||||||
jvmArgs '-noverify'
|
jvmArgs '-noverify'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
// use kotlin only in tests (for now)
|
// use kotlin only in tests (for now)
|
||||||
test.java.srcDirs += 'src/test/kotlin'
|
test.java.srcDirs += 'src/test/kotlin'
|
||||||
|
|
||||||
// use main assets and resources in test
|
// use main assets and resources in test
|
||||||
test.assets.srcDirs += 'src/main/assets'
|
test.assets.srcDirs += 'src/main/assets'
|
||||||
test.resources.srcDirs += 'src/main/resoures'
|
test.resources.srcDirs += 'src/main/resoures'
|
||||||
}
|
}
|
||||||
|
signingConfigs {
|
||||||
signingConfigs {
|
|
||||||
release
|
release
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
minifyEnabled true
|
minifyEnabled true
|
||||||
|
|
@ -168,7 +143,7 @@ android {
|
||||||
versionNameSuffix "-debug-" + getBranchName()
|
versionNameSuffix "-debug-" + getBranchName()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isRunningOnTravisAndIsNotPRBuild) {
|
if (isRunningOnTravisAndIsNotPRBuild) {
|
||||||
// configure keystore based on env vars in Travis for automated alpha builds
|
// configure keystore based on env vars in Travis for automated alpha builds
|
||||||
signingConfigs.release.storeFile = file("../nr-commons.keystore")
|
signingConfigs.release.storeFile = file("../nr-commons.keystore")
|
||||||
|
|
@ -176,17 +151,13 @@ android {
|
||||||
signingConfigs.release.keyAlias = System.getenv("key_alias")
|
signingConfigs.release.keyAlias = System.getenv("key_alias")
|
||||||
signingConfigs.release.keyPassword = System.getenv("key_password")
|
signingConfigs.release.keyPassword = System.getenv("key_password")
|
||||||
}
|
}
|
||||||
|
|
||||||
configurations.all {
|
configurations.all {
|
||||||
resolutionStrategy.force 'androidx.annotation:annotation:1.0.2'
|
resolutionStrategy.force 'androidx.annotation:annotation:1.0.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
flavorDimensions 'tier'
|
flavorDimensions 'tier'
|
||||||
productFlavors {
|
productFlavors {
|
||||||
prod {
|
prod {
|
||||||
|
applicationId 'fr.free.nrw.commons'
|
||||||
applicationId 'fr.free.nrw.commons'
|
|
||||||
|
|
||||||
buildConfigField "String", "WIKIMEDIA_API_POTD", "\"https://commons.wikimedia.org/w/api.php?action=featuredfeed&feed=potd&feedformat=rss&language=en\""
|
buildConfigField "String", "WIKIMEDIA_API_POTD", "\"https://commons.wikimedia.org/w/api.php?action=featuredfeed&feed=potd&feedformat=rss&language=en\""
|
||||||
buildConfigField "String", "WIKIMEDIA_API_HOST", "\"https://commons.wikimedia.org/w/api.php\""
|
buildConfigField "String", "WIKIMEDIA_API_HOST", "\"https://commons.wikimedia.org/w/api.php\""
|
||||||
buildConfigField "String", "WIKIDATA_API_HOST", "\"https://www.wikidata.org/w/api.php\""
|
buildConfigField "String", "WIKIDATA_API_HOST", "\"https://www.wikidata.org/w/api.php\""
|
||||||
|
|
@ -210,13 +181,10 @@ android {
|
||||||
buildConfigField "String", "COMMIT_SHA", "\"" + getBuildVersion().toString() + "\""
|
buildConfigField "String", "COMMIT_SHA", "\"" + getBuildVersion().toString() + "\""
|
||||||
buildConfigField "String", "TEST_USERNAME", "\"" + System.getenv("test_user_name") + "\""
|
buildConfigField "String", "TEST_USERNAME", "\"" + System.getenv("test_user_name") + "\""
|
||||||
buildConfigField "String", "TEST_PASSWORD", "\"" + System.getenv("test_user_password") + "\""
|
buildConfigField "String", "TEST_PASSWORD", "\"" + System.getenv("test_user_password") + "\""
|
||||||
|
|
||||||
dimension 'tier'
|
dimension 'tier'
|
||||||
}
|
}
|
||||||
|
|
||||||
beta {
|
beta {
|
||||||
applicationId 'fr.free.nrw.commons.beta'
|
applicationId 'fr.free.nrw.commons.beta'
|
||||||
|
|
||||||
// What values do we need to hit the BETA versions of the site / api ?
|
// What values do we need to hit the BETA versions of the site / api ?
|
||||||
buildConfigField "String", "WIKIMEDIA_API_POTD", "\"https://commons.wikimedia.org/w/api.php?action=featuredfeed&feed=potd&feedformat=rss&language=en\""
|
buildConfigField "String", "WIKIMEDIA_API_POTD", "\"https://commons.wikimedia.org/w/api.php?action=featuredfeed&feed=potd&feedformat=rss&language=en\""
|
||||||
buildConfigField "String", "WIKIMEDIA_API_HOST", "\"https://commons.wikimedia.beta.wmflabs.org/w/api.php\""
|
buildConfigField "String", "WIKIMEDIA_API_HOST", "\"https://commons.wikimedia.beta.wmflabs.org/w/api.php\""
|
||||||
|
|
@ -241,35 +209,29 @@ android {
|
||||||
buildConfigField "String", "COMMIT_SHA", "\"" + getBuildVersion().toString() + "\""
|
buildConfigField "String", "COMMIT_SHA", "\"" + getBuildVersion().toString() + "\""
|
||||||
buildConfigField "String", "TEST_USERNAME", "\"" + System.getenv("test_user_name") + "\""
|
buildConfigField "String", "TEST_USERNAME", "\"" + System.getenv("test_user_name") + "\""
|
||||||
buildConfigField "String", "TEST_PASSWORD", "\"" + System.getenv("test_user_password") + "\""
|
buildConfigField "String", "TEST_PASSWORD", "\"" + System.getenv("test_user_password") + "\""
|
||||||
|
|
||||||
dimension 'tier'
|
dimension 'tier'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lintOptions {
|
lintOptions {
|
||||||
disable 'MissingTranslation'
|
disable 'MissingTranslation'
|
||||||
disable 'ExtraTranslation'
|
disable 'ExtraTranslation'
|
||||||
abortOnError false
|
abortOnError false
|
||||||
}
|
}
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
}
|
}
|
||||||
|
|
||||||
buildToolsVersion buildToolsVersion
|
buildToolsVersion buildToolsVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isRunningOnTravisAndIsNotPRBuild) {
|
if(isRunningOnTravisAndIsNotPRBuild) {
|
||||||
play {
|
play {
|
||||||
track = "alpha"
|
track = "alpha"
|
||||||
userFraction = 1
|
userFraction = 1
|
||||||
serviceAccountEmail = System.getenv("SERVICE_ACCOUNT_NAME")
|
serviceAccountEmail = System.getenv("SERVICE_ACCOUNT_NAME")
|
||||||
serviceAccountCredentials = file("../play.p12")
|
serviceAccountCredentials = file("../play.p12")
|
||||||
|
|
||||||
resolutionStrategy = "auto"
|
resolutionStrategy = "auto"
|
||||||
outputProcessor { // this: ApkVariantOutput
|
outputProcessor { // this: ApkVariantOutput
|
||||||
versionNameOverride = "$versionNameOverride.$versionCode"
|
versionNameOverride = "$versionNameOverride.$versionCode"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue