From 9994d908fb83759f867c0eb88794fd27541410f1 Mon Sep 17 00:00:00 2001 From: Gautam Korlam Date: Tue, 12 Dec 2017 21:58:10 -0800 Subject: [PATCH] Set package_type in android_binary rules --- .buckconfig | 4 ++++ .../composer/android/AndroidBinaryRuleComposer.groovy | 1 + .../okbuck/template/android/AndroidBinaryRule.rocker.raw | 6 ++++++ 3 files changed, 11 insertions(+) diff --git a/.buckconfig b/.buckconfig index 4e52bfebe..da8112054 100644 --- a/.buckconfig +++ b/.buckconfig @@ -36,3 +36,7 @@ [ui] build_rule_minimum_duration_millis = 500 + +[ndk] + gcc_version=4.9 + app_platform = android-24 diff --git a/buildSrc/src/main/groovy/com/uber/okbuck/composer/android/AndroidBinaryRuleComposer.groovy b/buildSrc/src/main/groovy/com/uber/okbuck/composer/android/AndroidBinaryRuleComposer.groovy index 4fece21bf..79ac899e0 100644 --- a/buildSrc/src/main/groovy/com/uber/okbuck/composer/android/AndroidBinaryRuleComposer.groovy +++ b/buildSrc/src/main/groovy/com/uber/okbuck/composer/android/AndroidBinaryRuleComposer.groovy @@ -51,6 +51,7 @@ final class AndroidBinaryRuleComposer extends AndroidBuckRuleComposer { .cpuFilters(mappedCpuFilters) .minifyEnabled(target.minifyEnabled) .proguardConfig(fileRule(proguardConfig)) + .debuggable(target.debuggable) .placeholders(target.placeholders) .includesVectorDrawables(target.includesVectorDrawables) .preprocessJavaClassesDeps(transformDeps) diff --git a/buildSrc/src/main/rocker/com/uber/okbuck/template/android/AndroidBinaryRule.rocker.raw b/buildSrc/src/main/rocker/com/uber/okbuck/template/android/AndroidBinaryRule.rocker.raw index 337bfc0da..0c1e4502a 100644 --- a/buildSrc/src/main/rocker/com/uber/okbuck/template/android/AndroidBinaryRule.rocker.raw +++ b/buildSrc/src/main/rocker/com/uber/okbuck/template/android/AndroidBinaryRule.rocker.raw @@ -5,6 +5,7 @@ String manifestSkeleton, String keystore, String preprocessJavaClassesBash, String proguardConfig, +boolean debuggable, int linearAllocHardLimit, Collection primaryDexPatterns, Collection cpuFilters, @@ -55,6 +56,11 @@ boolean multidexEnabled, android_sdk_proguard_config = 'none', proguard_config = '@proguardConfig', } +@if (debuggable) { + package_type = 'debug', +} else { + package_type = 'release', +} @if (includesVectorDrawables) { includes_vector_drawables = True, }