This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 60
/
build.gradle
106 lines (85 loc) · 2.8 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
plugins {
id 'java'
id 'eclipse'
// Generate coverage during tests.
id 'jacoco'
// Generate executable scripts
id 'application'
// enforces consistent formatting
id 'com.github.sherter.google-java-format' version '0.8'
// enforces java style
id 'net.ltgt.errorprone' version '0.6'
// improve the test output
id "com.adarshr.test-logger" version "1.7.0"
}
eclipse {
classpath {
downloadSources=true
}
}
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.8
version = '1.0'
createScript(project, 'com.google.javascript.clutz.DeclarationGenerator', 'clutz')
createScript(project, 'com.google.javascript.gents.TypeScriptGenerator', 'gents')
repositories {
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
// Verify all versions match closure-compiler's deps to avoid version conflicts.
// Also make sure this matches internal Google usage, as closure-compiler is not always
// dilligent about using the correct versions.
// https://github.com/google/closure-compiler/blob/master/pom-main.xml
compile('args4j:args4j:2.0.26') {
// Forced, as Closure Compiler depends on the wrong version.
force = true
}
// In the past we tested against nightly closure releases at 'com.google.javascript:closure-compiler:1.0-SNAPSHOT',
// but sonatype started 404-ing CircleCI. Now, we test against the latest released Closure version on Circle, and
// internally test against Closure head.
compile 'com.google.javascript:closure-compiler:v20190929'
compile 'com.google.code.gson:gson:2.7'
compile 'com.google.code.findbugs:jsr305:3.0.1'
compile 'com.google.guava:guava:28.0-jre'
compile 'org.apache.commons:commons-text:1.4'
// ErrorProne itself, plus its javac integration.
errorprone("com.google.errorprone:error_prone_core:2.3.2")
errorproneJavac('com.google.errorprone:javac:9+181-r4173-1')
testCompile 'junit:junit:4.11'
testCompile 'com.google.truth:truth:1.0'
}
tasks.withType(Test) {
systemProperty 'gents.clangFormat',
System.getProperty('gents.clangFormat', 'node_modules/.bin/clang-format')
}
test {
testLogging {
exceptionFormat = 'full'
}
}
googleJavaFormat {
toolVersion '1.3'
}
// configure the test output
testlogger {
theme 'mocha'
}