Skip to content

Commit

Permalink
Merge pull request #94 from justin-cotarla/dev
Browse files Browse the repository at this point in the history
[Release 2] Dev into master
  • Loading branch information
chriskfwoo committed Mar 20, 2019
2 parents 9838aeb + 2cb69ca commit 9a4feaa
Show file tree
Hide file tree
Showing 81 changed files with 4,383 additions and 92 deletions.
20 changes: 16 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,19 @@ android:
before_script:
- chmod +x gradlew

script:
- ./gradlew clean assembleDebug
- ./gradlew checkstyle
- ./gradlew testDevDebug
jobs:
include:
- stage: build
name: "Assemble Debug"
script: ./gradlew clean assembleDebug
- stage: static-analysis
name: "Static Analysis"
script: ./gradlew checkstyle
- stage: test
name: "Deploy to GCP"
script: ./gradlew testDevDebug

stages:
- build
- static-analysis
- test
63 changes: 31 additions & 32 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,14 @@ final JavaVersion JAVA_VERSION = JavaVersion.VERSION_1_8
android {
// Keep version in sync with /project.properties
compileSdkVersion 28

compileOptions {
sourceCompatibility = JAVA_VERSION
targetCompatibility = JAVA_VERSION
}

dexOptions {
preDexLibraries = preDexEnabled
jumboMode = true
}

defaultConfig {
applicationId 'org.wikipedia'
minSdkVersion 19
Expand All @@ -64,11 +61,10 @@ android {
javaCompileOptions {
annotationProcessorOptions {
arguments('butterknife.minSdk': minSdkVersion.apiString,
'butterknife.debuggable': 'false')
'butterknife.debuggable': 'false')
}
}
}

sourceSets {
test {
java.srcDirs += 'src/testlib/java'
Expand All @@ -77,7 +73,6 @@ android {
java.srcDirs += 'src/testlib/java'
}
}

signingConfigs {
prod {
setSigningConfigKey(prod, PROD_PROPS)
Expand All @@ -86,7 +81,6 @@ android {
setSigningConfigKey(debug, REPO_PROPS)
}
}

buildTypes {
debug {
minifyEnabled true
Expand All @@ -99,9 +93,7 @@ android {
testProguardFile 'test-proguard-rules.pro'
}
}

flavorDimensions 'default'

productFlavors {
dev {
versionName computeVersionName('dev')
Expand Down Expand Up @@ -144,7 +136,6 @@ android {
dimension 'default'
}
}

splits {
abi {
enable true
Expand All @@ -153,21 +144,30 @@ android {
universalApk true
}
}

packagingOptions {
exclude 'META-INF/services/javax.annotation.processing.Processor' // required by Butter Knife
exclude 'META-INF/services/javax.annotation.processing.Processor'
// required by Butter Knife

// For Espresso testing libraries. See http://stackoverflow.com/q/33800924/970346.
exclude 'META-INF/maven/com.google.guava/guava/pom.xml'
exclude 'META-INF/maven/com.google.guava/guava/pom.properties'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/INDEX.LIST'
}

testOptions {
unitTests {
includeAndroidResources = true
returnDefaultValues = true
}
}
buildToolsVersion '28.0.3'
}

// Map for the version code that gives each ABI a value.
Expand All @@ -190,35 +190,34 @@ apply from: '../gradle/src/checkstyle.gradle'
dependencies {

// To keep the Maven Central dependencies up-to-date

// use http://gradleplease.appspot.com/ or http://search.maven.org/.
// Debug with ./gradlew -q app:dependencies --configuration compile

// Debug with ./gradlew -q app:dependencies --configuration compile
String okHttpVersion = '3.11.0'
String supportVersion = '28.0.0'
String retrofitVersion = '2.4.0'
String espressoVersion = '3.0.1'
String butterKnifeVersion = '8.8.1'
String frescoVersion = '1.11.0' // When updating this version, resync file copies under app/src/main/java/com/facebook
String frescoVersion = '1.11.0'

// When updating this version, resync file copies under app/src/main/java/com/facebook
String testingSupportVersion = '1.0.2'
String mockitoCore = 'org.mockito:mockito-core:1.9.5'
String leakCanaryVersion = '1.6.2'

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

implementation "com.android.support:support-compat:$supportVersion"
implementation "com.android.support:support-core-utils:$supportVersion"
implementation "com.android.support:support-core-ui:$supportVersion"
implementation "com.android.support:support-fragment:$supportVersion"
implementation 'com.android.support.constraint:constraint-layout:1.1.3'

implementation "com.android.support:cardview-v7:$supportVersion"
implementation "com.android.support:design:$supportVersion"
implementation "com.android.support:recyclerview-v7:$supportVersion"
implementation "com.android.support:palette-v7:$supportVersion"
implementation "com.android.support:preference-v14:$supportVersion"
implementation "com.android.support:exifinterface:$supportVersion"

implementation ('com.github.michael-rapp:chrome-like-tab-switcher:0.3.7') {
implementation('com.github.michael-rapp:chrome-like-tab-switcher:0.3.7') {
// TODO: remove when this component updates its own dependency on Support 28.0.0
exclude group: 'com.android.support'
}
Expand All @@ -232,46 +231,46 @@ dependencies {
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion"
implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion"
implementation "io.reactivex.rxjava2:rxjava:2.2.3"
implementation "io.reactivex.rxjava2:rxandroid:2.1.0"
implementation 'io.reactivex.rxjava2:rxjava:2.2.3'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
implementation 'com.getkeepsafe.taptargetview:taptargetview:1.12.0'
implementation "com.jakewharton:butterknife:$butterKnifeVersion"
implementation "com.mapbox.mapboxsdk:mapbox-android-sdk:6.6.2"
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:6.6.2'
implementation 'net.hockeyapp.android:HockeySDK:5.1.0'
implementation 'org.apache.commons:commons-lang3:3.8.1'
implementation 'org.jsoup:jsoup:1.11.3'

implementation 'com.google.api-client:google-api-client-android:1.22.0' exclude module: 'httpclient'
implementation 'com.google.http-client:google-http-client-gson:1.20.0' exclude module: 'httpclient'
implementation 'com.google.apis:google-api-services-vision:v1-rev2-1.21.0'

implementation 'com.google.code.findbugs:jsr305:2.0.1'
annotationProcessor "com.jakewharton:butterknife-compiler:$butterKnifeVersion"

android.productFlavors.each { flavor ->
String dep
if('dev' == flavor.name) {
if ('dev' == flavor.name) {
dep = "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion"
} else {
dep = "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"
}
"${flavor.name}Implementation" dep
}

testImplementation 'junit:junit:4.12'
testImplementation mockitoCore
testImplementation 'org.robolectric:robolectric:3.8'
testImplementation "com.squareup.okhttp3:mockwebserver:$okHttpVersion"
testImplementation "commons-io:commons-io:2.6"

testImplementation 'commons-io:commons-io:2.6'
androidTestImplementation mockitoCore
androidTestRuntimeOnly 'com.crittercism.dexmaker:dexmaker:1.4'
androidTestImplementation 'com.crittercism.dexmaker:dexmaker-mockito:1.4'
androidTestRuntimeOnly 'com.crittercism.dexmaker:dexmaker-dx:1.4'

// Required by Android JUnit Runner.
androidTestImplementation "com.android.support:support-annotations:$supportVersion"
androidTestImplementation "com.android.support.test:rules:$testingSupportVersion" // JUnit Rules
androidTestImplementation "com.android.support.test:runner:$testingSupportVersion" // Android JUnit Runner
androidTestImplementation "com.android.support.test:rules:$testingSupportVersion"

// JUnit Rules
androidTestImplementation "com.android.support.test:runner:$testingSupportVersion"

// Android JUnit Runner
androidTestImplementation "com.android.support.test.espresso:espresso-core:$espressoVersion"
androidTestImplementation "com.android.support.test.espresso:espresso-contrib:$espressoVersion"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnitRunner;

import org.wikipedia.dataclient.okhttp.TestStubInterceptor;
import org.wikipedia.espresso.MockInstrumentationInterceptor;
import org.wikipedia.espresso.util.ConfigurationTools;
import org.wikipedia.settings.Prefs;
import org.wikipedia.settings.PrefsIoUtil;
Expand All @@ -20,8 +18,8 @@
public class WikipediaTestRunner extends AndroidJUnitRunner {
@Override
public void onStart() {
deviceRequirementsCheck();
TestStubInterceptor.setCallback(new MockInstrumentationInterceptor(InstrumentationRegistry.getContext()));
// deviceRequirementsCheck();
// TestStubInterceptor.setCallback(new MockInstrumentationInterceptor(InstrumentationRegistry.getContext()));
clearAppInfo();
disableOnboarding();
cleanUpComparisonResults();
Expand Down
Loading

0 comments on commit 9a4feaa

Please sign in to comment.