From de55396a4ca0226b026e53d2b5445b138ba8b1ce Mon Sep 17 00:00:00 2001 From: thermatk Date: Fri, 14 Apr 2017 14:03:52 +0200 Subject: [PATCH 1/3] satisfy f-droid and CI assembleDebug at the same time --- app/build.gradle | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index c4b78e94d..8389f465c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,5 +1,6 @@ def taskRequests = getGradle().getStartParameter().getTaskRequests().toString() def isGms = taskRequests.contains("Gms") || taskRequests.contains("gms") +def isUniversalDebug = taskRequests.contains("assembleDebug") apply plugin: 'com.android.application' if (isGms) { @@ -87,7 +88,6 @@ android { } configurations { - gmsReleaseCompile all*.exclude module: 'annotations' } } @@ -144,8 +144,10 @@ dependencies { annotationProcessor "frankiesardo:icepick-processor:${icepickVersion}" annotationProcessor "com.jakewharton:butterknife-compiler:${butterKnifeVersion}" provided "org.projectlombok:lombok:${lombokVersion}" - gmsCompile "com.google.firebase:firebase-ads:${firebase}" - gmsReleaseCompile "com.google.firebase:firebase-crash:${firebase}" + if (isGms || isUniversalDebug) { + compile "com.google.firebase:firebase-ads:${firebase}" + releaseCompile "com.google.firebase:firebase-crash:${firebase}" + } } if (isGms) { From 9338dd2ec902d3d86d16141dff7fd56202a8761d Mon Sep 17 00:00:00 2001 From: thermatk Date: Fri, 14 Apr 2017 14:29:15 +0200 Subject: [PATCH 2/3] annoying lint --- .../fastaccess/ui/widgets/recyclerview/BaseViewHolder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/BaseViewHolder.java b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/BaseViewHolder.java index c9acb131f..268be9edc 100644 --- a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/BaseViewHolder.java +++ b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/BaseViewHolder.java @@ -39,7 +39,7 @@ public BaseViewHolder(@NonNull View itemView, @Nullable BaseRecyclerAdapter adap itemView.setOnLongClickListener(this); } - @Override public void onClick(View v) { + @SuppressWarnings("unchecked") @Override public void onClick(View v) { if (adapter != null && adapter.getListener() != null) { int position = getAdapterPosition(); if (position != RecyclerView.NO_POSITION && position < adapter.getItemCount()) @@ -47,7 +47,7 @@ public BaseViewHolder(@NonNull View itemView, @Nullable BaseRecyclerAdapter adap } } - @Override public boolean onLongClick(View v) { + @SuppressWarnings("unchecked") @Override public boolean onLongClick(View v) { if (adapter != null && adapter.getListener() != null) { int position = getAdapterPosition(); if (position != RecyclerView.NO_POSITION && position < adapter.getItemCount()) From 1ab263d9f91342c004077c849f4355f69a1f47c4 Mon Sep 17 00:00:00 2001 From: thermatk Date: Fri, 14 Apr 2017 14:29:36 +0200 Subject: [PATCH 3/3] simplify gradle and change CI tasks --- .travis.yml | 3 ++- app/build.gradle | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index a62fcc2cd..898209f5a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,8 @@ jdk: oraclejdk8 sudo: required script: - - ./gradlew clean assembleDebug + - ./gradlew clean assembleFdroidDebug + - ./gradlew clean assembleGmsDebug after_success: - bash <(curl -s https://codecov.io/bash) diff --git a/app/build.gradle b/app/build.gradle index 8389f465c..05f0f9b3a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,6 +1,5 @@ def taskRequests = getGradle().getStartParameter().getTaskRequests().toString() def isGms = taskRequests.contains("Gms") || taskRequests.contains("gms") -def isUniversalDebug = taskRequests.contains("assembleDebug") apply plugin: 'com.android.application' if (isGms) { @@ -144,7 +143,7 @@ dependencies { annotationProcessor "frankiesardo:icepick-processor:${icepickVersion}" annotationProcessor "com.jakewharton:butterknife-compiler:${butterKnifeVersion}" provided "org.projectlombok:lombok:${lombokVersion}" - if (isGms || isUniversalDebug) { + if (isGms) { compile "com.google.firebase:firebase-ads:${firebase}" releaseCompile "com.google.firebase:firebase-crash:${firebase}" }