-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
107 lines (88 loc) · 2.46 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
apply plugin: 'java'
apply plugin: 'eclipse-wtp'
apply plugin: 'maven'
apply plugin: 'jacoco'
group = 'com.github.gameontext'
version = '1.0.4'
sourceCompatibility = 1.8
configurations {
jmockit
testCompile.extendsFrom jmockit
}
repositories {
mavenCentral()
}
dependencies {
compile 'javax.ws.rs:javax.ws.rs-api:2.0'
compile 'javax.enterprise:cdi-api:1.2'
compile 'javax.servlet:javax.servlet-api:3.1.0'
compile 'javax.enterprise.concurrent:javax.enterprise.concurrent-api:1.0'
compile 'io.jsonwebtoken:jjwt-api:0.10.5'
jmockit 'org.jmockit:jmockit:1.22'
testCompile 'junit:junit:4.12'
}
jar {
baseName 'org.gameontext.signed'
}
javadoc {
options.memberLevel = JavadocMemberLevel.PUBLIC
}
test {
jvmArgs "-javaagent:${configurations.jmockit.singleFile.absolutePath}"
jacoco {
excludes = ["*\$Impl_*"]
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
baseName 'org.gameontext.signed'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
baseName 'org.gameontext.signed'
}
artifacts {
archives sourcesJar
archives javadocJar
}
// To specify a license in the pom:
install {
repositories.mavenInstaller {
pom.project {
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
}
}
}
// Keep test and application binaries separate
eclipse.classpath.file {
withXml { xml ->
def node = xml.asNode()
Node src = node.find {it.@path == "src/main/java"}
src.@output ="bin/main"
Node testSrc = node.find {it.@path == "src/test/java"}
testSrc.@output ="bin/test"
}
}
eclipse.wtp.facet {
// Clear default facets to work around bug where you get duplicates including wst 2.4
facets = []
facet name: 'jst.java', type: 'fixed'
}
// Add additional code conventions
eclipse.jdt.file {
withProperties {
it['org.eclipse.jdt.core.formatter.indentation.size'] = '4'
it['org.eclipse.jdt.core.formatter.tabulation.size'] = '4'
it['org.eclipse.jdt.core.formatter.tabulation.char'] = 'space'
it['org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases'] = 'true'
it['org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch'] = 'true'
}
}