This repository was archived by the owner on May 8, 2021. It is now read-only.
generated from alpas/starter
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
79 lines (63 loc) · 1.98 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
buildscript {
ext.kotlin_version = '1.3.61'
ext.alpas_version = '0.14.2'
}
plugins {
id 'application'
id 'org.jetbrains.kotlin.jvm' version '1.3.61'
id 'com.github.johnrengelman.shadow' version '5.2.0'
}
startScripts {
applicationName = 'short_urls_service'
}
mainClassName = 'com.egorsmkv.short_urls_service.StartKt'
group 'com.egorsmkv.short_urls_service'
version '1.0.0'
repositories {
jcenter()
maven { url = uri("https://jitpack.io") }
mavenCentral()
}
dependencies {
implementation 'commons-validator:commons-validator:1.6'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
implementation 'ch.qos.logback:logback-classic:1.3.0-alpha5'
implementation 'mysql:mysql-connector-java:8.0.19'
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation "dev.alpas:framework:$alpas_version"
testImplementation "dev.alpas:pulsar:$alpas_version"
// Prepend the latest SHA to try out the latest Alpas version
// implementation 'com.github.alpas:alpas:'
// testImplementation 'com.github.alpas.alpas:pulsar:'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.6.0'
implementation 'com.github.hotchemi:khronos:0.9.0'
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
jar {
manifest {
attributes 'Main-Class': 'com.egorsmkv.short_urls_service.StartKt'
}
}
task enforceVersion() {
def foundVersion = JavaVersion.current();
if (!JavaVersion.current().isJava9Compatible())
throw new IllegalStateException("Unsupported Java version ${foundVersion}. Minimum Java version ${javaVersion} is required.")
}
shadowJar {
destinationDirectory = file("./")
archiveBaseName.set('short_urls_service')
archiveClassifier.set(null)
version = null
}
compileJava.dependsOn(enforceVersion)
test {
useJUnitPlatform()
}
installDist {
destinationDir = file("./build/install/short_urls_service")
}