-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
177 lines (140 loc) · 4.46 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
import com.github.jengelman.gradle.plugins.shadow.transformers.PropertiesFileTransformer
buildscript {
ext {
kotlinVersion = '1.2.41'
springBootVersion = '2.1.4.RELEASE'
}
repositories {
jcenter()
}
dependencies {
classpath "com.github.jengelman.gradle.plugins:shadow:4.0.3"
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath('com.netflix.nebula:nebula-dependency-recommender:4.3.0')
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
classpath group: 'de.dynamicfiles.projects.gradle.plugins', name: 'javafx-gradle-plugin', version: '8.8.2'
}
}
apply plugin: 'idea'
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
ext {
dependenciesFile = file('./dependencies.props')
}
allprojects {
apply plugin: 'java'
apply plugin: 'nebula.dependency-recommender'
apply plugin: 'io.spring.dependency-management'
group = 'fsart.circsim'
version = '1.0.0-SNAPSHOT' // CIRCSIM-VERSION
repositories {
mavenCentral()
jcenter()
}
dependencyRecommendations {
propertiesFile file: project.dependenciesFile
}
dependencyManagement {
imports {
mavenBom('org.springframework.boot:spring-boot-dependencies:' + springBootVersion)
}
}
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
}
}
def getGitHash = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-parse', '--short', 'HEAD'
standardOutput = stdout
}
return stdout.toString().trim()
}
def getDate() {
def date = new Date()
def formattedDate = date.format('dd/MM/yyyy HH:mm:ss')
return formattedDate
}
def distFolder() {
return 'dist/' + project.version.toString()
}
subprojects {
// apply plugin: 'kotlin'
sourceCompatibility = 1.8
targetCompatibility = 1.8
// compileKotlin {
// kotlinOptions.jvmTarget = "1.8"
// }
// compileTestKotlin {
// kotlinOptions.jvmTarget = "1.8"
// }
dependencies {
// compile("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
// compile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
compile("javax.inject:javax.inject")
compile('org.springframework.boot:spring-boot-dependencies')
testCompile("org.springframework.boot:spring-boot-starter-test")
testCompile("org.springframework.boot:spring-boot-test-autoconfigure")
}
jar {
manifest {
attributes(
"Manifest_AppVersion": version,
"Manifest_Build_Date": getDate(),
"Manifest_Build_RevVersion": getGitHash())
}
}
// Configuration for maven-publish
apply plugin: 'maven-publish'
task sourcesJar(type: Jar) {
classifier 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
}
project(':ccs-core') {
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'java'
apply plugin: 'application'
dependencies {
compile("org.springframework.boot:spring-boot-starter")
compile("javax.persistence:javax.persistence-api")
compile("ch.qos.logback:logback-classic")
compile("com.fasterxml.jackson.core:jackson-annotations")
compile("com.fasterxml.jackson.core:jackson-databind")
compile("org.apache.commons:commons-lang3")
compile("org.apache.commons:commons-csv")
compile("org.apache.commons:commons-compress")
compile("commons-io:commons-io")
compile("org.apache.commons:commons-text")
compile("com.github.mfornos:humanize-slim")
compile("io.vertx:vertx-core")
testCompile("com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider")
testCompile("junit:junit")
testCompile("org.hamcrest:hamcrest-all")
testCompile("io.vertx:vertx-unit")
}
shadowJar {
mainClassName = "fasar.circsim.App"
archiveName = "circsim.jar"
// Required for Spring
mergeServiceFiles()
append 'META-INF/spring.handlers'
append 'META-INF/spring.schemas'
append 'META-INF/spring.tooling'
transform(PropertiesFileTransformer) {
paths = ['META-INF/spring.factories']
mergeStrategy = "append"
}
}
}