-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
41 lines (41 loc) · 1.36 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
plugins {
id 'java'
}
group = 'com.project'
version = '1.0'
repositories {
jcenter()
}
dependencies {
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.6.1'
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.6.1'
compile group: 'org.hibernate', name: 'hibernate-core', version: '5.4.13.Final'
compile group: 'org.hsqldb', name: 'hsqldb', version: '2.5.0'
compile group: 'com.zaxxer', name: 'HikariCP', version: '3.4.2'
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
compile group: 'ch.qos.logback', name: 'logback-core', version: '1.2.3'
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.30'
}
// kopiowanie katalogu bibliotekami
task copyRuntimeLibs(type: Copy) {
into "$buildDir/libs/lib/"
from configurations.compile
}
// kopiowanie katalogu z baza danych
task copyDb(type: Copy) {
into "$buildDir/libs/db"
from "db"
}
// attach to assemble task
assemble.dependsOn copyRuntimeLibs, copyDb
jar {
manifest {
attributes 'Main-Class' : 'com.project.app.ProjectClientApplication'
attributes 'Class-Path' : configurations.compile.collect { 'lib/' + it.getName() }.join(' ')
}
}
test {
useJUnitPlatform() //aktywacja natywnego wsparcia (od wersji 4.6 Gradle’a)
testLogging { showStandardStreams = true //włącza drukowanie komunikatów w konsoli
}
}