-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathproject.gradle
54 lines (45 loc) · 1.48 KB
/
project.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
apply plugin: 'java-library'
apply plugin: 'application'
apply plugin: 'checkstyle'
group = 'org.swimos'
version = project.property('swim.version')
repositories {
mavenCentral()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
}
dependencies {
api group: 'org.swimos', name: 'swim-api', version: version
api group: 'org.swimos', name: 'swim-server', version: version
api group: 'org.swimos', name: 'swim-client', version: version
}
checkstyle {
// Enforce checkstyle and fail the build if there are any violations
if (project.hasProperty('enforceCheckstyle')) {
ignoreFailures = false
maxWarnings = 0
}
// configFile = new File(gradle.swimRuntimeDir, 'checkstyle.xml')
toolVersion "8.41.1"
checkstyleMain {
source = sourceSets.main.allJava
exclude '*module-info*'
}
checkstyleTest {
source = sourceSets.test.allJava
exclude '*module-info*'
}
}
afterEvaluate {
sourceSets {
main.output.resourcesDir = main.java.classesDirectory
}
compileJava {
options.compilerArgs = ['--module-path', classpath.asPath,
'-Xlint:all',
'--patch-module', "$moduleName=" + files(sourceSets.main.resources.srcDirs).asPath]
options.encoding = 'UTF-8'
source = sourceSets.main.allJava
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}