2022-04-29 16:29:59 +00:00
|
|
|
plugins {
|
|
|
|
java
|
|
|
|
id("com.github.johnrengelman.shadow") version("7.1.2")
|
|
|
|
}
|
|
|
|
|
|
|
|
group = "ru.erius.lab5"
|
2022-06-14 00:27:00 +00:00
|
|
|
version = "3.0"
|
2022-04-29 16:29:59 +00:00
|
|
|
val mainClass = "server.Lab5Server"
|
2022-06-14 00:27:00 +00:00
|
|
|
val psqlJar = "postgresql-42.4.0.jar"
|
2022-04-29 16:29:59 +00:00
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.2")
|
|
|
|
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
|
2022-06-14 00:27:00 +00:00
|
|
|
compileOnly(files("$buildDir/libs/$psqlJar"))
|
2022-04-29 16:29:59 +00:00
|
|
|
implementation(project(":Lab5Core"))
|
2022-06-14 00:27:00 +00:00
|
|
|
|
2022-04-29 16:29:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.getByName<Test>("test") {
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.compileJava {
|
|
|
|
options.encoding = "UTF-8"
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.javadoc {
|
|
|
|
options.encoding = "UTF-8"
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.shadowJar {
|
2022-06-14 00:27:00 +00:00
|
|
|
exclude(psqlJar)
|
2022-04-29 16:29:59 +00:00
|
|
|
archiveClassifier.set("")
|
|
|
|
manifest {
|
|
|
|
attributes(
|
|
|
|
"Manifest-Version" to "1.0",
|
2022-06-14 00:27:00 +00:00
|
|
|
"Main-Class" to mainClass,
|
|
|
|
"Class-Path" to psqlJar
|
2022-04-29 16:29:59 +00:00
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|