aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--eclipse/build.gradle13
1 files changed, 10 insertions, 3 deletions
diff --git a/eclipse/build.gradle b/eclipse/build.gradle
index c483ce7ab..c5639304f 100644
--- a/eclipse/build.gradle
+++ b/eclipse/build.gradle
@@ -8,9 +8,16 @@
// get tools/base version
apply from: "../../tools/buildSrc/base/version.gradle"
+ext.outPath = System.env.OUT_DIR
+ext.outFile = new File(outPath)
+if (outPath == null) {
+ outPath = '../../out'
+ outFile = new File(projectDir, outPath)
+}
+
repositories {
maven { url '../../prebuilts/tools/common/m2/repository' }
- maven { url '../../out/repo' }
+ maven { url outPath + '/repo' }
}
ext {
@@ -132,7 +139,7 @@ task copydeps << {
// unzip eclipse prebuilts into the out folder to create a target platform for the build
task unzipTargetPlatform << {
- File targetDir = new File(projectDir, "../../out/host/maven/target").getCanonicalFile()
+ File targetDir = new File(outFile, "/host/maven/target").getCanonicalFile()
targetDir.mkdirs()
project.targetComponents.each { String k, File v ->
@@ -144,7 +151,7 @@ task unzipTargetPlatform << {
task buildEclipse(type: Exec, dependsOn: unzipTargetPlatform) {
def maven = new File(projectDir, "../../prebuilts/eclipse/maven/apache-maven-3.2.1/bin/mvn").getCanonicalFile()
- def androidOut = new File(projectDir, "../../out").getCanonicalPath()
+ def androidOut = outFile.getCanonicalPath()
environment("M2_HOME", maven.getParentFile().getParentFile().getCanonicalPath())
workingDir projectDir
commandLine maven.getCanonicalPath(), "-s", "settings.xml", "-DforceContextQualifier=$project.buildNumber", "-DANDROID_OUT=$androidOut", "package"