-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
173 lines (154 loc) · 4.51 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
/*
* build.gradle
* XNAT http://www.xnat.org
* Copyright (c) 2016, Washington University School of Medicine
* All Rights Reserved
*
* Released under the Simplified BSD.
*/
def groupName = 'org.nrg.xnat.plugin'
def artifactName = 'radiomics'
def pluginVersion = '1.1.1'
group groupName
version pluginVersion
apply plugin: 'io.spring.dependency-management'
apply plugin: 'groovy'
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'xnat-data-builder'
buildscript {
ext {
vXnat = '1.7.4'
}
repositories {
mavenLocal()
maven {
url 'https://nrgxnat.jfrog.io/nrgxnat/libs-release'
name 'XNAT Release Repository'
}
jcenter()
mavenCentral()
maven {
url 'https://nrgxnat.jfrog.io/nrgxnat/libs-snapshot'
name 'XNAT Snapshot Repository'
}
}
dependencies {
classpath "io.spring.gradle:dependency-management-plugin:1.0.3.RELEASE"
classpath ("org.nrg.xnat.build:xnat-data-builder:${vXnat}") {
exclude group:'torque'
}
}
}
repositories {
mavenLocal()
maven {
url 'https://nrgxnat.jfrog.io/nrgxnat/libs-release'
name 'XNAT Release Repository'
}
jcenter()
mavenCentral()
maven {
url 'https://nrgxnat.jfrog.io/nrgxnat/libs-snapshot'
name 'XNAT Snapshot Repository'
}
maven {
url 'https://nrgxnat.jfrog.io/nrgxnat/ext-release'
name 'XNAT External Release Repository'
}
}
sourceCompatibility = 1.7
targetCompatibility = 1.7
if (hasProperty("rt.17.jar")) {
// Solution for bootstrap classpath warning and possible issues with compatibility with 1.7 libraries
// was taken from this post on discuss.gradle.org: http://bit.ly/24xD9j0
def rt17jar = getProperty("rt.17.jar")
logger.info "Using ${rt17jar} as the bootstrap class path jar."
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.fork = true
options.compilerArgs << "-XDignore.symbol.file"
options.bootClasspath = rt17jar
}
}
} else {
logger.warn "No value was set for the rt.17.jar build property, using the default bootstrap class path. You should consider setting rt.17.jar to indicate a jar file containing the Java 1.7 run-time library:\n"
logger.warn " ./gradlew -Prt.17.jar=rt-1.7.0_45.jar war\n"
}
compileJava {
options.fork = false
}
jacoco {
toolVersion = "0.7.9"
}
jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.destination "${buildDir}/jacocoHtml"
}
}
sourceSets {
main {
java {
srcDir 'src/main/java'
srcDir 'build/xnat-generated/src/main/java'
}
resources {
srcDir 'src/main/resources'
srcDir 'build/xnat-generated/src/main/resources'
}
}
}
configurations {
}
dependencyManagement.imports {
mavenBom "org.nrg:parent:${vXnat}"
}
dependencies{
compile 'xml-apis:xmlParserAPIs:2.0.2'
compile 'org.python:jython-standalone'
compile "org.nrg.xnat:web"
compile "org.nrg.xnat:xnat-data-models"
compile "org.nrg.xdat:core"
compile "org.nrg:framework"
compile(group: 'turbine', name: 'turbine') {
exclude group: '*'
}
compile "org.apache.velocity:velocity"
compile "log4j:log4j"
runtime 'org.springframework:spring-web'
runtime 'io.springfox:springfox-swagger-ui'
testCompile "junit:junit"
testCompile "org.springframework:spring-test"
}
publishing.publications {
mavenJava(MavenPublication) {
groupId groupName
artifactId artifactName
version pluginVersion
from components.java
}
}
publishing.repositories {
maven {
credentials {
// These properties must be set in the ~/.gradle/gradle.properties file or passed on the Gradle command
// line in the form -PrepoUsername=foo -PrepoPassword=bar.
username propertyWithDefault('repoUsername', 'username')
password propertyWithDefault('repoPassword', 'password')
}
if (project.version.endsWith('-SNAPSHOT')) {
url "https://nrgxnat.jfrog.io/nrgxnat/libs-snapshot-local"
} else {
url "https://nrgxnat.jfrog.io/nrgxnat/libs-release-local"
}
}
}
def propertyWithDefault(def String property, def Object value) {
hasProperty(property) ? getProperty(property) : value
}