summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.buckconfig6
-rw-r--r--.watchmanconfig13
-rw-r--r--DEFS11
-rwxr-xr-xbuckw18
-rw-r--r--build.gradle15
5 files changed, 47 insertions, 16 deletions
diff --git a/.buckconfig b/.buckconfig
index e105382..7b1e709 100644
--- a/.buckconfig
+++ b/.buckconfig
@@ -9,3 +9,9 @@
[httpserver]
port = 0
+
+[buildfile]
+ includes = //DEFS
+
+[build]
+ threads = 16
diff --git a/.watchmanconfig b/.watchmanconfig
new file mode 100644
index 0000000..0ff7cb7
--- /dev/null
+++ b/.watchmanconfig
@@ -0,0 +1,13 @@
+{
+ "ignore_dirs": [
+ "buck-out",
+ ".idea",
+ ".buckd",
+ "build",
+ ".gradle",
+ ".swp",
+ "java"
+ ],
+ "fsevents_latency": 0.05,
+ "suppress_recrawl_warnings": true
+}
diff --git a/DEFS b/DEFS
new file mode 100644
index 0000000..166fc2e
--- /dev/null
+++ b/DEFS
@@ -0,0 +1,11 @@
+original_android_binary = android_binary
+
+def android_binary(
+ name,
+ **kwargs
+ ):
+ original_android_binary(
+ name,
+ trim_resource_ids = True,
+ **kwargs
+ )
diff --git a/buckw b/buckw
index aab336b..c6d0cdd 100755
--- a/buckw
+++ b/buckw
@@ -4,7 +4,7 @@
##
## Buck wrapper script to invoke okbuck when needed, before running buck
##
-## Created by OkBuck Gradle Plugin on : Thu Dec 15 23:45:23 PST 2016
+## Created by OkBuck Gradle Plugin on : Sun Dec 18 12:19:24 PST 2016
##
#########################################################################
@@ -62,6 +62,10 @@ ensureWatch ( ) {
watchman watch-project $WORKING_DIR >/dev/null 2>&1
}
+removeWatch ( ) {
+ watchman watch-del $WORKING_DIR >/dev/null 2>&1
+}
+
getToClean ( ) {
ensureWatch
@@ -127,9 +131,15 @@ runOkBuck ( ) {
echo
if [[ ! -z "$INSTALLED_WATCHMAN" ]]; then
- getToClean | jsonq '"\n".join(obj["files"])' | xargs rm
- info "DELETED OLD BUCK FILES"
- EXTRA_OKBUCK_ARGS="-xokbuckClean $EXTRA_OKBUCK_ARGS"
+ TO_CLEAN=$(getToClean | jsonq '"\n".join(obj["files"])')
+ if [[ $? -eq 0 ]]; then
+ echo $TO_CLEAN | xargs rm
+ info "DELETED OLD BUCK FILES"
+ EXTRA_OKBUCK_ARGS="-xokbuckClean $EXTRA_OKBUCK_ARGS"
+ else
+ warn "WATCHMAN FAILED. USING OKBUCKCLEAN."
+ removeWatch
+ fi
fi
rm -f $OKBUCK_SUCCESS
diff --git a/build.gradle b/build.gradle
index a81b2a2..55c9d6f 100644
--- a/build.gradle
+++ b/build.gradle
@@ -30,7 +30,6 @@ allprojects {
}
}
-def multidexApps = []
subprojects { project ->
group = "com.studio"
afterEvaluate {
@@ -68,7 +67,6 @@ subprojects { project ->
}
if (project.plugins.hasPlugin('com.android.application')) {
- multidexApps.add(project.name)
project.android{
defaultConfig {
multiDexEnabled true
@@ -119,22 +117,15 @@ def addCommonConfigurationForAndroidModules(Project project) {
abortOnError false
}
}
+ if (hasDependency(project, "butterknife-8")) {
+ project.plugins.apply('com.jakewharton.butterknife')
+ }
}
apply plugin: 'com.uber.okbuck'
okbuck {
target "android-${config.build.compileSdkVersion}"
buildToolVersion config.build.buildToolsVersion
- linearAllocHardLimit = multidexApps.collectEntries { target ->
- [target, 16 * 1024 * 1024]
- }
- extraBuckOpts = multidexApps.collectEntries { target ->
- [target, ["android_binary": [
- "trim_resource_ids = True",
- ]
- ]
- ]
- }
experimental {
parallel = true
}