-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
76 lines (65 loc) · 2.14 KB
/
build.gradle.kts
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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import proguard.gradle.ProGuardTask
buildscript {
repositories {
maven("https://plugins.gradle.org/m2")
}
dependencies {
classpath("net.sf.proguard:proguard-gradle:6.1.0")
}
}
plugins {
application
kotlin("jvm") version "1.3.30"
id("com.github.johnrengelman.shadow") version "4.0.2"
}
application {
applicationName = "github-profile"
mainClassName = "io.ktor.server.netty.EngineMain"
group = "github-profile"
version = "1.0.0"
}
java.sourceSets {
getByName("main").java.srcDirs("src")
getByName("main").resources.srcDirs("resources")
getByName("test").java.srcDirs("test")
}
repositories {
mavenLocal()
jcenter()
maven { setUrl("https://kotlin.bintray.com/ktor") }
maven { setUrl("https://kotlin.bintray.com/kotlinx") }
}
dependencies {
val kotlinVersion = "1.3.30"
val ktorVersion = "1.2.1"
val logbackVersion = "1.2.1"
val konfig = "1.6.10.0"
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion")
implementation("io.ktor:ktor-server-netty:$ktorVersion")
implementation("ch.qos.logback:logback-classic:$logbackVersion")
implementation("io.ktor:ktor-client-okhttp:$ktorVersion")
implementation("io.ktor:ktor-client-jackson:$ktorVersion")
implementation("io.ktor:ktor-jackson:$ktorVersion")
implementation("io.ktor:ktor-locations:$ktorVersion")
implementation("com.natpryce:konfig:$konfig")
implementation("io.ktor:ktor-freemarker:$ktorVersion")
testImplementation("io.ktor:ktor-server-tests:$ktorVersion")
}
tasks.withType<ShadowJar> {
baseName = application.applicationName
version = "1.0.0"
classifier = ""
}
task(name = "minimizedJar", type = ProGuardTask::class) {
dependsOn("shadowJar")
injars("build/libs/github-profile-1.0.0.jar")
outjars("build/libs/github-profile.min.jar")
libraryjars(System.getProperties()["java.home"].toString() + "/lib/rt.jar")
printmapping("build/libs/github-profile.map")
ignorewarnings()
dontobfuscate()
dontoptimize()
dontwarn()
configuration("proguard.pro")
}