-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
194 lines (162 loc) · 5.28 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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
/// *** Server *** ///
buildscript {
ext {
springBootVersion = '1.5.8.RELEASE'
}
repositories {
mavenCentral()
maven { url "http://repo.spring.io/snapshot" }
maven { url "http://repo.spring.io/milestone" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath 'org.owasp:dependency-check-gradle:3.0.1'
classpath "io.spring.gradle:dependency-management-plugin:0.5.2.RELEASE"
}
}
plugins {
id 'com.moowork.node' version '0.13'
id 'com.moowork.grunt' version '0.13'
id 'com.github.ben-manes.versions' version '0.15.0'
id 'org.springframework.boot' version '1.5.4.RELEASE'
id 'org.owasp.dependencycheck' version '3.0.1'
id 'io.spring.dependency-management' version '0.5.2.RELEASE'
}
apply plugin: 'java'
apply plugin: 'eclipse-wtp'
apply plugin: 'idea'
apply plugin: 'application'
apply plugin: 'jacoco'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
maven { url "http://repo.spring.io/snapshot" }
maven { url "http://repo.spring.io/milestone" }
maven { url "https://jitpack.io" }
}
configurations {
providedRuntime
}
dependencyManagement {
imports {
mavenBom 'org.springframework.cloud:spring-cloud-vault-dependencies:1.0.2.RELEASE'
}
}
dependencies {
compile("org.springframework.boot:spring-boot-starter-web:${springBootVersion}")
compile("com.zaxxer:HikariCP:2.7.1")
compile("org.liquibase:liquibase-core")
compile("org.springframework.security:spring-security-web:4.1.2.RELEASE")
compile("org.springframework.cloud:spring-cloud-config-server:1.3.3.RELEASE")
compile("org.springframework.cloud:spring-cloud-starter-vault-config")
compile('org.apache.commons:commons-pool2:2.4.2')
compile('com.github.identio:identio-saml:1.0.3')
compile('com.google.guava:guava:23.0')
compile('com.github.identio:jradius-client:-SNAPSHOT')
compile('com.auth0:java-jwt:3.2.0')
compile('ch.qos.logback:logback-core:1.2.3')
compile('ch.qos.logback:logback-classic:1.2.3')
testCompile("org.springframework.boot:spring-boot-starter-test:${springBootVersion}")
testCompile("org.apache.httpcomponents:httpclient:4.5.3")
testRuntime("com.h2database:h2:1.4.196")
}
eclipse {
wtp {
facet {
facet name: 'java', version: '1.8'
facet name: 'jst.web', version: '3.1'
}
}
project
{
natures "org.springsource.ide.eclipse.gradle.core.nature"
}
}
springBoot {
mainClass = "net.identio.server.boot.IdentioServerApplication"
}
bootRun {
systemProperties = ['logging.config': 'file:./config/logback.xml']
}
jacocoTestReport {
reports {
xml.enabled = true
}
}
/// *** UI *** ///
node {
// Version of node to use.
version = '6.11.3'
// Version of npm to use.
npmVersion = '5.4.2'
// Base URL for fetching node distributions (change if you have a mirror).
distBaseUrl = 'https://nodejs.org/dist'
// If true, it will download node using above parameters.
// If false, it will try to use globally installed node.
download = true
// Set the work directory for unpacking node
workDir = file("${project.buildDir}/ui")
// Set the work directory where node_modules should be located
nodeModulesDir = file("${project.projectDir}/ui")
}
grunt {
// Set the directory where Gruntfile.js should be found
workDir = file("${project.projectDir}/ui")
// Whether colors should output on the terminal
colors = true
// Whether output from Grunt should be buffered - useful when running tasks in parallel
bufferOutput = false
}
task bowerInstall(type: NodeTask) {
script = file('ui/node_modules/bower/lib/bin/bower.js')
args = ['install', '--allow-root']
execOverrides {
it.ignoreExitValue = true
it.workingDir = file("${project.projectDir}/ui")
}
}
/// *** Packaging *** ///
def distributionsCopySpec = copySpec {
into("identio-server") {
from 'README.md'
from 'LICENSE'
into('bin') {
from 'scripts/password-generator'
from 'scripts/start'
fileMode 0755
}
into('lib') {
from(jar)
from(project.configurations.runtime)
exclude 'spring-boot-devtools-*'
}
into('config') {
from 'config'
}
into('ui') {
from 'ui/dist'
}
}
}
grunt_build.mustRunAfter bowerInstall
bowerInstall.mustRunAfter npmInstall
npmInstall.mustRunAfter clean
jar.mustRunAfter clean
task releaseZip(type: Zip, dependsOn: ['clean', 'test', 'jar', 'bowerInstall', 'npmInstall', 'grunt_build']) {
description 'Build a release in zip format'
with distributionsCopySpec
archiveName = "identio-server.zip"
}
task releaseTarGz(type: Tar, dependsOn: ['clean', 'test', 'jar', 'bowerInstall', 'npmInstall', 'grunt_build']) {
description 'Build a release in tar.gz format'
compression = Compression.GZIP
with distributionsCopySpec
archiveName = "identio-server.tar.gz"
}
task release(dependsOn: ['releaseTarGz', 'releaseZip']) {
description 'Build release in zip and tar.gz format'
}
task wrapper(type: Wrapper) {
gradleVersion = '4.2'
}