-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
108 lines (85 loc) · 3.11 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
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'application'
apply plugin: 'org.junit.platform.gradle.plugin'
group 'iotdsm-services'
version '1.0.0'
sourceCompatibility = 1.8
buildscript {
ext.kotlin_version = '1.1.4-3'
repositories {
mavenCentral()
}
dependencies {
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
repositories {
mavenCentral()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
compile "org.junit.jupiter:junit-jupiter-api:5.0.1"
testRuntime(
'org.junit.jupiter:junit-jupiter-engine:5.0.1',
'org.junit.vintage:junit-vintage-engine:4.12.1',
'org.junit.platform:junit-platform-launcher:1.0.1',
'org.junit.platform:junit-platform-runner:1.0.1'
)
}
compileKotlin {
kotlinOptions.jvmTarget = sourceCompatibility
}
compileTestKotlin {
kotlinOptions.jvmTarget = sourceCompatibility
}
repositories {
mavenCentral()
}
dependencies {
//Test Unit Framework
testCompile group: 'junit', name: 'junit', version: '4.12'
//Java 8
compile group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.0'
//Hibernate Dependencies
compile 'org.hibernate:hibernate-entitymanager:5.2.12.Final'
compile group: 'org.hibernate', name: 'hibernate-hikaricp', version: '5.2.12.Final'
compile group: 'com.zaxxer', name: 'HikariCP', version: '2.7.2'
//Class Preprocess
compileOnly 'org.projectlombok:lombok:1.16.20'
//Web Framework
compile "com.sparkjava:spark-core:2.7.1"
//Log Framework
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
compile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.25'
//Serializer Dependencies
compile group: 'com.google.code.gson', name: 'gson', version: '2.7'
compile group: 'com.thoughtworks.xstream', name: 'xstream', version: '1.4.10'
compile group: 'org.apache.commons', name: 'commons-csv', version: '1.5'
//JDBC Drivers - SQL Databases
compile group: 'org.postgresql', name: 'postgresql', version: '42.2.1'
compile group: 'mysql', name: 'mysql-connector-java', version: '6.0.6'
//JDBC Drivers - NOSQL Databases
compile group: 'org.mongodb', name: 'mongo-java-driver', version: '3.5.0'
//Commons Library
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.1'
compile group: 'commons-cli', name: 'commons-cli', version: '1.4'
}
mainClassName = 'EmbeddedServletMain'
jar {
manifest {
attributes 'Main-Class': mainClassName,
'Class-Path': configurations.runtime.files.collect { "$it.name" }.join(' ')
}
}
task fatJar(type: Jar) {
manifest {
attributes 'Implementation-Title': 'iotdsm-edu.usp.icmc.lasdpc.iotdsm.services',
'Implementation-Version': version,
'Main-Class': 'edu.usp.icmc.lasdpc.EmbeddedServletMain'
}
baseName = project.name + '-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}