From 81cbef82b4e58b115363c5c2bfb207a3ba9dabc2 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Wed, 4 Jun 2014 23:12:49 -0400 Subject: [PATCH] finish ant/gradle build for appcompat-v7 Both preferencefragment and appcompat-v7 submodules need the android-support-v4.jar to be included in their respective libs/ dirs in order for ant to build those projects. --- ant-prepare.sh | 4 ++++ build.gradle | 9 +++++++++ custom_rules.xml | 10 ++++++++++ project.properties | 2 ++ 4 files changed, 25 insertions(+) diff --git a/ant-prepare.sh b/ant-prepare.sh index 13929a08c..7f41a1347 100755 --- a/ant-prepare.sh +++ b/ant-prepare.sh @@ -1,10 +1,14 @@ #!/bin/bash -ex +target=`sed -n 's,^target=\(.*\),\1,p' project.properties` + android update lib-project --path extern/UniversalImageLoader/library android update lib-project --path extern/AndroidPinning android update lib-project --path extern/MemorizingTrustManager android update lib-project --path extern/libsuperuser/libsuperuser android update lib-project --path extern/zxing-core +android update lib-project --path extern/android-support-v4-preferencefragment +android update lib-project --path extern/Support/v7/appcompat --target $target android update project --path . --name F-Droid { echo -e "\nSuccessfully updated the main project.\n"; } 2>/dev/null diff --git a/build.gradle b/build.gradle index 18ba173d6..d9699d94e 100644 --- a/build.gradle +++ b/build.gradle @@ -125,6 +125,15 @@ android.applicationVariants.all { variant -> // This is the hacky way which we force the subprojects to use the same build tools: // http://stackoverflow.com/a/21032272 subprojects { + + // The support-v4 library assumes certain things are defined in the + // root project (which is usually the android-support project, but + // this time it is the F-Droid project. + if (project.name.equals("support-v4")) { + apply plugin: 'maven' + rootProject.ext.supportRepoOut = "" + } + afterEvaluate { android { diff --git a/custom_rules.xml b/custom_rules.xml index 7747834aa..5cb033506 100644 --- a/custom_rules.xml +++ b/custom_rules.xml @@ -1,6 +1,16 @@ + + + + + + + +