forked from angular/clutz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
62 lines (49 loc) · 1.41 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
53
54
55
56
57
58
59
60
61
62
plugins {
id 'java'
id 'eclipse'
// Generate coverage during tests.
id 'jacoco'
// Generate executable scripts
id 'application'
}
def createScript(project, mainClass, name) {
project.tasks.create(name: name, type: CreateStartScripts) {
outputDir = new File(project.buildDir, 'scripts')
mainClassName = mainClass
applicationName = name
classpath = project.tasks[JavaPlugin.JAR_TASK_NAME].outputs.files + project.configurations.runtime
}
project.tasks[name].dependsOn(project.jar)
project.applicationDistribution.with {
into("bin") {
from(project.tasks[name])
fileMode = 0755
}
}
}
startScripts.enabled = false
run.enabled = false
sourceCompatibility = 1.7
version = '1.0'
createScript(project, 'com.google.javascript.clutz.DeclarationGenerator', 'clutz')
createScript(project, 'com.google.javascript.gents.TypeScriptGenerator', 'gents')
repositories {
mavenCentral()
}
dependencies {
runtime 'args4j:args4j:2.0.26'
runtime 'com.google.code.gson:gson:2.3.1'
compile 'com.google.javascript:closure-compiler:v20160713'
compile 'com.google.guava:guava:18.0'
testCompile 'junit:junit:4.11'
testCompile 'com.google.truth:truth:0.25'
}
tasks.withType(Test) {
systemProperty 'gents.clangFormat',
System.getProperty('gents.clangFormat', 'node_modules/.bin/clang-format')
}
test {
testLogging {
exceptionFormat = 'full'
}
}