Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prereqs for further development; a more thematic notification sound; improve the OPRs list #861

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ android:
components:
- platform-tools
- tools
- build-tools-25.0.2
- build-tools-27.0.3
- android-24
- android-23
- extra-android-m2repository
Expand Down
180 changes: 83 additions & 97 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
apply plugin: 'me.tatarka.retrolambda'
apply plugin: 'gitsemver'
apply plugin: 'com.github.triplet.play'
apply plugin: 'com.facebook.testing.screenshot'
Expand All @@ -13,13 +11,9 @@ apply from: "../code_coverage.gradle"
apply plugin: 'com.github.ben-manes.versions'

apply from: 'versioning.gradle'
apply from: 'build.workaround-missing-resource.gradle'

// Fix for https://github.com/evant/gradle-retrolambda/issues/105
// Without this, the build fails on CI for some reason
retrolambda {
jvmArgs '-noverify'
}
// Does `testOptions.unitTests.includeAndroidResources = true` obviate this workaround?
apply from: 'build.workaround-missing-resource.gradle'

version semverVersion()
def (major, minor, patch, versionNum, gitTag, gitHash, commitsFromTag, repoDirty) =
Expand All @@ -39,8 +33,8 @@ project.afterEvaluate {
}

android {
compileSdkVersion 24
buildToolsVersion '25.0.2'
compileSdkVersion 26
buildToolsVersion '27.0.3'

signingConfigs {
release {
Expand All @@ -50,23 +44,6 @@ android {
keyPassword "notRealPassword"
}

productFlavors {
dev {
// dev utilizes minSDKVersion = 21 to allow the Android gradle plugin
// to pre-dex each module and produce an APK that can be tested on
// Android Lollipop without time consuming dex merging processes
minSdkVersion 21
multiDexEnabled true

}
prod {
// to install a debug app with minSdkVersion = 16, run ./gradlew installProdDebug
// see http://developer.android.com/tools/building/multidex.html#dev-build
minSdkVersion 16
multiDexEnabled true
}
}

buildTypes {
debug {
applicationIdSuffix ".development"
Expand All @@ -82,6 +59,9 @@ android {
zipAlignEnabled true
proguardFiles 'proguard-rules.txt'
testProguardFile 'proguard-rules.txt'
// Alternate library build type matches for this build type. See
// https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.htm
matchingFallbacks = ['debug', 'release']
}

// run 'gradlew assembleDebugBlue' to do a debug signed build without using debug resources
Expand All @@ -91,6 +71,7 @@ android {
signingConfig signingConfigs.debug
applicationIdSuffix ".development"
manifestPlaceholders = [gcmPermissionRequired: ""]
matchingFallbacks = ['debug', 'release']
}

release {
Expand Down Expand Up @@ -133,14 +114,18 @@ android {
testOptions {
// Don't throw dreaded stub exceptions
unitTests.returnDefaultValues = true

// Do resource, asset, and manifest merging before running your unit
// tests that require Android resources, such as Roboelectric
testOptions.unitTests.includeAndroidResources = true
}

android.applicationVariants.all { variant ->
variant.outputs.each { output ->
variant.outputs.all { output ->
def apkName = "tba-android-";
apkName += "v" + version.tagName;
apkName += "-" + variant.buildType.name + ".apk";
output.outputFile = file("$project.buildDir/apk/" + apkName)
output.outputFileName = apkName
}
}

Expand Down Expand Up @@ -220,9 +205,9 @@ task updateScreenshotDirs << {
}

tasks.whenTaskAdded { theTask ->
if (theTask.name in ["packageDevRelease", "packageProdRelease", "publishProdRelease",
"bootstrapProdReleasePlayResources", "publishListingProdRelease",
"publishApkProdRelease", "generateProdReleasePlayResources"]) {
if (theTask.name in ["publishApkRelease", "publishListingRelease", "publishRelease",
"bootstrapReleasePlayResources",
"generateReleasePlayResources"]) {
theTask.dependsOn "loadProperties"
}
}
Expand All @@ -247,87 +232,88 @@ check {
}

dependencies {
compile project(':libTba')
compile project(':libImgur')
implementation project(':libTba')
implementation project(':libImgur')

// Android support libraries
compile "com.android.support:support-v13:${supportLibVersion}"
compile "com.android.support:cardview-v7:${supportLibVersion}"
compile "com.android.support:support-v4:${supportLibVersion}"
compile "com.android.support:appcompat-v7:${supportLibVersion}"
compile "com.android.support:gridlayout-v7:${supportLibVersion}"
compile 'com.android.support:multidex:1.0.1'
compile "com.android.support:design:${supportLibVersion}"
implementation "com.android.support:support-v13:${supportLibVersion}"
implementation "com.android.support:cardview-v7:${supportLibVersion}"
implementation "com.android.support:support-v4:${supportLibVersion}"
implementation "com.android.support:appcompat-v7:${supportLibVersion}"
implementation "com.android.support:gridlayout-v7:${supportLibVersion}"
implementation 'com.android.support:multidex:1.0.3'
implementation "com.android.support:design:${supportLibVersion}"

// Play Services Libraries
// See http://developer.android.com/google/play-services/setup.html
compile 'com.google.collections:google-collections:1.0'
compile "com.google.android.gms:play-services-base:${playServicesVersion}"
compile "com.google.android.gms:play-services-analytics:${playServicesVersion}"
compile "com.google.android.gms:play-services-gcm:${playServicesVersion}"
compile "com.google.android.gms:play-services-auth:${playServicesVersion}"
compile "com.google.firebase:firebase-core:${playServicesVersion}"
compile "com.google.firebase:firebase-auth:${playServicesVersion}"
compile "com.google.firebase:firebase-config:${playServicesVersion}"

testCompile 'com.github.phil-lopreiato:firebasecrash-noop:v0.1'
releaseCompile "com.google.firebase:firebase-crash:${playServicesVersion}"
debugCompile "com.google.firebase:firebase-crash:${playServicesVersion}"
debugBlueCompile "com.google.firebase:firebase-crash:${playServicesVersion}"
debugProguardCompile "com.google.firebase:firebase-crash:${playServicesVersion}"
implementation 'com.google.guava:guava:22.0'
implementation "com.google.android.gms:play-services-base:${playServicesVersion}"
implementation "com.google.android.gms:play-services-analytics:${playServicesVersion}"
implementation "com.google.android.gms:play-services-gcm:${playServicesVersion}"
implementation "com.google.android.gms:play-services-auth:${playServicesVersion}"
implementation "com.google.firebase:firebase-core:${playServicesVersion}"
implementation "com.google.firebase:firebase-auth:${playServicesVersion}"
implementation "com.google.firebase:firebase-config:${playServicesVersion}"

testImplementation 'com.github.phil-lopreiato:firebasecrash-noop:v0.1'
releaseImplementation "com.google.firebase:firebase-crash:${playServicesVersion}"
debugImplementation "com.google.firebase:firebase-crash:${playServicesVersion}"
debugBlueImplementation "com.google.firebase:firebase-crash:${playServicesVersion}"
debugProguardImplementation "com.google.firebase:firebase-crash:${playServicesVersion}"

// Square Libraries
compile 'com.squareup.picasso:picasso:2.5.2'
compile "com.squareup.retrofit2:retrofit:${retrofitVersion}"
compile "com.squareup.retrofit2:adapter-rxjava:${retrofitVersion}"
compile 'com.squareup.okhttp3:okhttp:3.4.1'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation "com.squareup.retrofit2:retrofit:${retrofitVersion}"
implementation "com.squareup.retrofit2:adapter-rxjava:${retrofitVersion}"
implementation 'com.squareup.okhttp3:okhttp:3.4.1'

compile "com.google.dagger:dagger:${daggerVersion}"
apt 'com.google.guava:guava:19.0'
apt "com.google.dagger:dagger-compiler:${daggerVersion}"
implementation "com.google.dagger:dagger:${daggerVersion}"
annotationProcessor 'com.google.guava:guava:22.0'
annotationProcessor "com.google.dagger:dagger-compiler:${daggerVersion}"

// Other third party libraries
compile "com.google.code.gson:gson:${gsonVersion}"
compile 'me.xuender:unidecode:0.0.7'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.facebook.stetho:stetho:1.4.1'
compile 'com.facebook.stetho:stetho-okhttp3:1.4.1'
compile 'com.firebase:firebase-client-android:2.5.2'
compile "io.reactivex:rxandroid:${rxAndroidVersion}"
compile "io.reactivex:rxjava:${rxJavaVersion}"
compile 'io.reactivex:rxjava-math:1.0.0'
compile 'me.relex:circleindicator:1.2.1@aar'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'io.nlopez.smartadapters:library:1.3.1'
compile 'com.wada811:android-material-design-colors:3.0.0'
compile 'com.thebluealliance:spectrum:0.7.1'
compile 'javax.annotation:javax.annotation-api:1.2'
compile "com.github.hotchemi:permissionsdispatcher:${permissionDispatcherVersion}"
apt "com.github.hotchemi:permissionsdispatcher-processor:${permissionDispatcherVersion}"
implementation "com.google.code.gson:gson:${gsonVersion}"
implementation 'me.xuender:unidecode:0.0.7'
implementation 'org.greenrobot:eventbus:3.0.0'
implementation 'de.hdodenhof:circleimageview:2.1.0'
implementation 'com.facebook.stetho:stetho:1.4.1'
implementation 'com.facebook.stetho:stetho-okhttp3:1.4.1'
implementation 'com.firebase:firebase-client-android:2.5.2'
implementation "io.reactivex:rxandroid:${rxAndroidVersion}"
implementation "io.reactivex:rxjava:${rxJavaVersion}"
implementation 'io.reactivex:rxjava-math:1.0.0'
implementation 'me.relex:circleindicator:1.2.1@aar'
implementation 'com.jakewharton:butterknife:7.0.1'
annotationProcessor 'com.jakewharton:butterknife:7.0.1'
implementation 'io.nlopez.smartadapters:library:1.3.1'
implementation 'com.wada811:android-material-design-colors:3.0.0'
implementation 'com.thebluealliance:spectrum:0.7.1'
implementation 'javax.annotation:javax.annotation-api:1.2'
implementation "com.github.hotchemi:permissionsdispatcher:${permissionDispatcherVersion}"
annotationProcessor "com.github.hotchemi:permissionsdispatcher-processor:${permissionDispatcherVersion}"

// testing
testCompile "org.robolectric:robolectric:${robolectricVersion}"
testCompile "org.robolectric:shadows-support-v4:${robolectricVersion}"
testCompile "org.robolectric:shadows-multidex:${robolectricVersion}"
testCompile 'junit:junit:4.12'
testCompile "org.mockito:mockito-core:${mockitoVersion}"
testApt "com.google.guava:guava:19.0"
testApt "com.google.dagger:dagger-compiler:${daggerVersion}"
testImplementation "org.robolectric:robolectric:${robolectricVersion}"
testImplementation "org.robolectric:shadows-support-v4:${robolectricVersion}"
testImplementation "org.robolectric:shadows-multidex:${robolectricVersion}"
testImplementation 'junit:junit:4.12'
testImplementation "org.mockito:mockito-core:${mockitoVersion}"
testAnnotationProcessor "com.google.dagger:dagger-compiler:${daggerVersion}"
testAnnotationProcessor 'com.jakewharton:butterknife:7.0.1'

// instrumentation
androidTestCompile "com.android.support:support-annotations:${supportLibVersion}"
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test:rules:0.5'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestCompile 'com.google.code.findbugs:jsr305:3.0.1'
androidTestImplementation "com.android.support:support-annotations:${supportLibVersion}"
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test:rules:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
androidTestImplementation 'com.google.code.findbugs:jsr305:3.0.1'

// Leak Canary
debugCompile "com.squareup.leakcanary:leakcanary-android:${leakCanaryVersion}"
debugBlueCompile "com.squareup.leakcanary:leakcanary-android:${leakCanaryVersion}"
debugProguardCompile "com.squareup.leakcanary:leakcanary-android-no-op:${leakCanaryVersion}"
releaseCompile "com.squareup.leakcanary:leakcanary-android-no-op:${leakCanaryVersion}"
testCompile "com.squareup.leakcanary:leakcanary-android-no-op:${leakCanaryVersion}"
debugImplementation "com.squareup.leakcanary:leakcanary-android:${leakCanaryVersion}"
debugBlueImplementation "com.squareup.leakcanary:leakcanary-android:${leakCanaryVersion}"
debugProguardImplementation "com.squareup.leakcanary:leakcanary-android-no-op:${leakCanaryVersion}"
releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:${leakCanaryVersion}"
testImplementation "com.squareup.leakcanary:leakcanary-android-no-op:${leakCanaryVersion}"
}

apply plugin: 'com.google.gms.google-services'
Loading