-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
85 lines (78 loc) · 2.21 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
buildscript {
ext {
springBootVersion = '2.1.6.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'distribution'
group 'org.nexialservice'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
//create a single Jar with all dependencies
task createJar(type: Jar) {
manifest {
attributes 'Implementation-Title': 'nexial-service',
'Implementation-Version': version
}
baseName = project.name
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
zip64 = true
}
task distro {
group "Build"
description "build project clean room and update lib/ directory"
mustRunAfter clean
dependsOn build
}
distributions {
main {
contents {
into('lib') {
from jar
from 'lib'
from(project.configurations.runtime)
}
into('template') {
from 'template'
}
into('bin') {
from 'bin'
}
}
}
}
test {
useJUnitPlatform()
outputs.upToDateWhen { false }
filter {
//only run unit test, see gradle/bdd.gradle
includeTestsMatching "org.*"
}
}
dependencies {
compile fileTree(dir: 'lib-nexial', include: '*.jar')
compile('org.springframework.boot:spring-boot-dependencies:2.1.6.RELEASE')
compile('org.springframework.boot:spring-boot-starter-web')
compile('org.springframework.boot:spring-boot-starter-jdbc')
compile('org.springframework.boot:spring-boot-starter-logging')
compile("org.springframework.boot:spring-boot-starter-data-jpa")
compile("org.springframework.boot:spring-boot-starter-test:+")
compile('org.xerial:sqlite-jdbc:+')
compile("org.apache.commons:commons-lang3:+")
compile("junit:junit:4.+")
testCompile("junit:junit:4.+")
}