Skip to content

Remove unused proguard files and fix ./gradlew build not working because of failing tests #573

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

Merged
merged 1 commit into from
Feb 6, 2017
Merged
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 @@ -19,7 +19,7 @@ android:
- extra-android-m2repository
- extra-google-m2repository
before_script: mv library/google-services.json app/google-services.json
script: ./gradlew clean assembleDebug check -x testReleaseUnitTest # Running release tests fails because Facebook automatically enables app logger.
script: ./gradlew clean assembleDebug check
after_failure:
# tests
- cat app/build/reports/tests/testDebugUnitTest/index.html
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ android {
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt')

// For the purposes of the sample, allow testing of a proguarded release build
// using the debug key
Expand Down
30 changes: 0 additions & 30 deletions app/proguard-rules.pro

This file was deleted.

2 changes: 1 addition & 1 deletion auth/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ android {
manifestPlaceholders = [enableFbLogging: true]

minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android.txt')
}

debug {
Expand Down
Empty file removed auth/proguard-rules.pro
Empty file.
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ allprojects {
}
}

// TODO Remove once either Facebook or Robolectric fix the crash: https://github.com/robolectric/robolectric/issues/2579#issuecomment-276526911
gradle.taskGraph.whenReady { graph ->
graph.allTasks.findAll { it.name ==~ /testReleaseUnitTest/ }*.enabled = false
}
Copy link
Collaborator Author

@SUPERCILEX SUPERCILEX Feb 5, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a more permanent solution with a TODO that disables release unit tests for all gradle tasks. Unfortunately, I couldn't find a way to disable a task from within another task eg disable testReleaseUnitTest just for the build task which would have been preferable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM, it's a better solution


//Skip Javadoc generation for Java 1.8 as it breaks build
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
Expand Down
2 changes: 1 addition & 1 deletion database/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ android {
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android.txt')
}
}
}
Expand Down
17 changes: 0 additions & 17 deletions database/proguard-rules.pro

This file was deleted.

2 changes: 1 addition & 1 deletion library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ android {
versionCode 1
versionName "0.0.0"

consumerProguardFiles 'consumer-proguard-rules.txt'
consumerProguardFiles 'consumer-proguard-rules.pro'
}

buildTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
-keepattributes *Annotation*

# Don't warn about retrofit or okio classes
-dontwarn retrofit.**
-dontwarn retrofit2.**
-dontwarn okio.**
-dontnote retrofit2.Platform
-dontnote retrofit2.Platform$IOS$MainThreadExecutor
-dontwarn retrofit2.Platform$Java8
2 changes: 1 addition & 1 deletion storage/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ android {
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android.txt')
}
}
}
Expand Down
17 changes: 0 additions & 17 deletions storage/proguard-rules.pro

This file was deleted.