-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
113 lines (99 loc) · 2.76 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
buildscript {
ext {
vXnatDev = '1.7.6'
vXnat = '1.7.6'
}
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
maven {
url 'https://nrgxnat.jfrog.io/nrgxnat/libs-release'
name 'XNAT Release Repository'
}
maven {
url 'https://nrgxnat.jfrog.io/nrgxnat/libs-snapshot'
name 'XNAT Snapshot Repository'
}
}
dependencies {
classpath "org.nrg.xnat.build:xnat-data-builder:${vXnat}"
classpath "io.spring.gradle:dependency-management-plugin:1.0.3.RELEASE"
}
}
plugins {
id 'fr.brouillard.oss.gradle.jgitver' version '0.9.1'
}
jgitver {
useDistance true
useGitCommitID true
useDirty true
/* To play nice with literally everything else. */
autoIncrementPatch false
}
group 'au.edu.qcif.xnat.openid'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'java'
apply plugin: 'xnat-data-builder'
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven {
url 'https://nrgxnat.jfrog.io/nrgxnat/libs-release'
name 'XNAT Release Repository'
}
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
configurations {
compile.extendsFrom(compileAndInclude)
all {
exclude group: "javax.sql", module: "jdbc-stdext"
exclude group: "javax.transaction", module: "jta"
}
}
dependencyManagement.imports {
mavenBom "org.nrg:parent:${vXnat}"
}
dependencies {
compileOnly "org.nrg.xnat:web:${vXnatDev}"
compileOnly "org.nrg.xnat:xnat-data-models"
compileOnly "org.nrg.xdat:core:${vXnatDev}"
compileOnly "org.projectlombok:lombok"
compileOnly "org.slf4j:slf4j-api"
annotationProcessor "org.projectlombok:lombok"
}
jar {
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
}
task fatJar(type: Jar) {
baseName = project.name + '-all'
from {
configurations.compileAndInclude.collect { it.isDirectory() ? it : zipTree(it) }
} {
exclude "META-INF/*.MF", "META-INF/*.SF", "META-INF/*.DSA", "META-INF/*.RSA"
}
with jar
}
/* FIXME: fatJar isn't inheriting the manifest from jar, so hack around it. */
[jar, fatJar].each { it ->
it.doFirst {
manifest {
attributes 'Application-Name': 'XNAT OpenID Authentication Provider',
'Build-Date': new Date(),
'Implementation-Sha': project.ext.git_sha1_full,
'Implementation-Version': project.version
}
}
}