-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
175 lines (152 loc) · 4.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
plugins {
// https://github.com/researchgate/gradle-release
// https://plugins.gradle.org/plugin/net.researchgate.release
id "net.researchgate.release" version "3.0.2"
}
allprojects {
apply plugin: "java"
apply plugin: "idea"
apply plugin: "maven-publish"
apply plugin: "signing"
group = "org.docstr"
version = "$version"
}
subprojects {
repositories {
mavenLocal()
mavenCentral()
google()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://plugins.gradle.org/m2/" }
}
def javaVersion = JavaVersion.VERSION_1_8
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
task enforceVersion {
doLast {
def foundVersion = JavaVersion.current()
if (foundVersion != javaVersion)
throw new IllegalStateException("Wrong Java version; required is "
+ javaVersion + ", but found " + foundVersion)
}
}
compileJava.dependsOn(enforceVersion)
project.extensions.idea.module.iml {
withXml {
it.asNode().component.
find { it.@name == "NewModuleRootManager" }.@LANGUAGE_LEVEL = target.level
}
}
// ensure that test resources (src/test/resources) are added to CLASSPATH;
// see http://forums.gradle.org/gradle/topics/tests_arent_executed_when_setting_the_test_runtimeclasspath and
// http://gradle.org/docs/current/dsl/org.gradle.api.tasks.testing.Test.html#org.gradle.api.tasks.testing.Test:classpath
sourceSets {
main {
runtimeClasspath = files(output.resourcesDir) + runtimeClasspath
}
test {
runtimeClasspath = files(output.resourcesDir) + runtimeClasspath
}
}
test {
// enable TestNG support (default is JUnit)
useTestNG() {
suiteXmlBuilder().suite(name: "gwt-ace", parallel: "tests") {
test(name: "all-tests") {
packages {
"package"(name: "com.docstr.*")
}
}
}
excludeGroups "integration", "stress"
// useDefaultListeners = true produces the testng-results.xml files used by bamboo
// to display test result summaries
useDefaultListeners = true
}
}
configurations.all {
resolutionStrategy {
// fail eagerly on version conflict (includes transitive dependencies)
// e.g. multiple different versions of the same dependency (group and name are equal)
failOnVersionConflict()
// force certain versions of dependencies (including transitive)
// *append new forced modules:
force "com.google.guava:guava:31.0.1-jre",
"com.google.inject:guice:4.1.0",
"com.google.inject.extensions:guice-assistedinject:4.1.0",
"com.google.inject.extensions:guice-multibindings:4.1.0",
"com.google.inject.extensions:guice-servlet:4.1.0",
"com.google.code.findbugs:annotations:3.0.1",
"com.google.code.findbugs:jsr305:3.0.1",
"com.google.jsinterop:jsinterop-annotations:2.0.0",
"com.beust:jcommander:1.82",
"commons-collections:commons-collections:3.2.2",
"commons-codec:commons-codec:1.10",
"commons-io:commons-io:2.4",
"net.bytebuddy:byte-buddy:1.12.21",
"org.ow2.asm:asm:7.1",
"org.ow2.asm:asm-commons:7.1",
"org.ow2.asm:asm-tree:7.1",
"org.ow2.asm:asm-analysis:7.1",
"org.eclipse.jetty:jetty-util:9.2.14.v20151106",
"org.eclipse.jetty:jetty-io:9.2.14.v20151106",
"org.eclipse.jetty:jetty-server:9.2.14.v20151106",
"org.eclipse.jetty:jetty-http:9.2.14.v20151106",
"org.eclipse.jetty:jetty-servlet:9.2.14.v20151106",
"org.jetbrains.kotlin:kotlin-stdlib:1.7.0",
"org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.0",
"xml-apis:xml-apis:1.4.01"
}
}
configurations {
implementation.exclude module: "cglib"
implementation.exclude module: "apache-jsp"
implementation.exclude group: "org.eclipse.jetty.orbit"
}
dependencies {
// Google Web Toolkit
implementation "com.google.gwt:gwt-user:2.10.0"
}
release {
git {
requireBranch.set("master")
}
}
tasks.withType(JavaCompile) {
options.sourcepath = null
}
javadoc {
// Avoid error: cannot access external classes
options.addStringOption("sourcepath", "")
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
java {
withJavadocJar()
withSourcesJar()
}
artifacts {
archives sourcesJar
archives javadocJar
}
jar.doFirst {
sourceSets.main.java.srcDirs.each {
from it
}
}
jar {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
sourcesJar {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
processResources {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
}
build {
doFirst {
delete "out"
}
}