blob: 382e10dff17860db1e270d7b9360442fb9498741 [file] [log] [blame]
Adam Metcalfca26d472013-07-19 11:42:47 -07001apply plugin: 'java'
2
3sourceSets {
4 main {
5 java {
6 srcDirs = ['src/']
7 }
8 resources {
9 srcDirs = ['res/']
10 }
11 }
12}
13// TODO put this function in a plugin
14String findToolsJar() {
15 new ByteArrayOutputStream().withStream { os ->
16 project.exec {
Nick Korostelev845d3ad2014-08-26 19:06:16 -070017 executable "../../build/core/find-jdk-tools-jar.sh"
Adam Metcalfca26d472013-07-19 11:42:47 -070018
19 standardOutput = os
20 }
21 return os.toString().trim()
22 }
23}
24
Nick Korostelev845d3ad2014-08-26 19:06:16 -070025
26if (project.hasProperty("usePrebuilts") && project.usePrebuilts == "true") {
27 repositories {
28 maven { url '../../prebuilts/tools/common/m2/repository' }
29 }
30
31 dependencies {
32 compile files(findToolsJar())
33 compile files('../../prebuilts/misc/common/antlr/antlr-3.4-complete.jar')
34 compile 'com.google.jsilver:jsilver:1.0.0'
35 // TODO add tagsoup to prebuils to fully support building using prebuilts
36 compile project(':tagsoup')
37 // required by jsilver
38 compile 'com.google.guava:guava:15.0'
39 //compile project(path: ':junit', configuration: 'target')
40 }
41} else {
42 dependencies {
43 compile files(findToolsJar())
44 compile project(path: ':antlr', configuration: 'antlrRuntime')
45 compile project(':jsilver')
46 compile project(':tagsoup')
47 }
48}