This repository has been archived by the owner on Dec 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
52 lines (46 loc) · 1.48 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
apply plugin: 'java'
import com.android.internal.BuildUtils
sourceSets {
main {
java {
srcDirs = ['src/']
}
resources {
srcDirs = ['res/']
}
}
}
// TODO put this function in a plugin
// TODO remove when prebuilt's case will always properly work with BuildUtils's version.
String findToolsJar() {
new ByteArrayOutputStream().withStream { os ->
project.exec {
executable "../../build/core/find-jdk-tools-jar.sh"
standardOutput = os
}
return os.toString().trim()
}
}
if (project.hasProperty("usePrebuilts") && project.usePrebuilts == "true") {
repositories {
maven { url '../../prebuilts/tools/common/m2/repository' }
}
// TODO refactor to allow referencing the "gradle way"
dependencies {
compile files(findToolsJar())
compile files('../../prebuilts/misc/common/antlr/antlr-3.4-complete.jar')
compile 'com.google.jsilver:jsilver:1.0.0'
// TODO add tagsoup to prebuils to fully support building using prebuilts
compile project(':tagsoup')
// required by jsilver
compile 'com.google.guava:guava:15.0'
//compile project(path: ':junit', configuration: 'target')
}
} else {
dependencies {
compile files(BuildUtils.findToolsJar(project))
compile project(path: ':antlr', configuration: 'antlrRuntime')
compile project(':jsilver')
compile project(':tagsoup')
}
}