forked from GSculerlor/JikanKt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
83 lines (69 loc) · 2.2 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
77
78
79
80
81
82
83
plugins {
kotlin("jvm") version "1.5.0"
id("com.github.johnrengelman.shadow") version "7.0.0"
id("maven-publish")
}
repositories {
mavenCentral()
mavenLocal()
}
group = "me.melijn.jikankt"
version = "1.3.2"
val kotlinVersion = "1.5.0"
val ktorVersion = "1.5.3"
val gsonVersion = "2.8.6"
val coroutinesVersion = "1.4.3"
dependencies {
// https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-stdlib-jdk8
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion")
//Coroutines
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:$coroutinesVersion")
//Ktor
implementation("io.ktor:ktor-client-core:$ktorVersion")
implementation("io.ktor:ktor-client-core-jvm:$ktorVersion")
implementation("io.ktor:ktor-client-json:$ktorVersion")
implementation("io.ktor:ktor-client-json-jvm:$ktorVersion")
implementation("io.ktor:ktor-client-okhttp:$ktorVersion")
implementation("io.ktor:ktor-client-gson:$ktorVersion")
//Gson
implementation("com.google.code.gson:gson:$gsonVersion")
//kotlin-logging
api("org.slf4j:slf4j-api:1.7.25")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.3.1")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.3.1")
}
val sourcesJar by tasks.registering(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}
tasks {
withType(JavaCompile::class) {
options.encoding = "UTF-8"
}
withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class) {
kotlinOptions {
jvmTarget = "15"
}
}
test {
useJUnitPlatform()
}
}
publishing {
repositories {
maven {
url = uri("https://nexus.melijn.com/repository/maven-releases/")
credentials {
username = property("melijnPublisher").toString()
password = property("melijnPassword").toString()
}
}
}
publications {
register("mavenJava", MavenPublication::class) {
from(components["java"])
artifact(sourcesJar.get())
}
}
}