-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
123 lines (103 loc) · 3.54 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
@file:Suppress("SpellCheckingInspection")
import org.gradle.jvm.tasks.Jar
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.util.*
val coroutinesVersion = "1.3.9"
val jupiterVersion = "5.10.1"
val logbackVersion = "1.4.14"
val kotlinLoginVersion = "2.1.23"
val slf4jApiVersoion = "2.0.11"
val gsonVersion = "2.10.1"
val httpClientVersion = "5.3.1"
plugins {
kotlin("jvm") version "1.6.10"
id("org.jetbrains.dokka") version "1.9.10"
application
id("com.adarshr.test-logger") version "4.0.0"
`maven-publish`
}
group = "com.github.barakb"
version = "1.0.11"
repositories {
gradlePluginPortal()
mavenCentral()
mavenLocal()
}
dependencies {
testImplementation(kotlin("test-junit5"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion")
implementation("org.apache.httpcomponents.client5:httpclient5:$httpClientVersion")
implementation("com.google.code.gson:gson:$gsonVersion")
implementation("org.slf4j:slf4j-api:$slf4jApiVersoion")
implementation("io.github.microutils:kotlin-logging:$kotlinLoginVersion")
implementation("com.github.barakb:mini-rest-client:1.0.2")
dokkaJavadocPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.9.10")
testImplementation("org.junit.jupiter:junit-jupiter-api:$jupiterVersion")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$jupiterVersion")
testRuntimeOnly("ch.qos.logback:logback-classic:$logbackVersion")
implementation(kotlin("stdlib-jdk8"))
}
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
@Suppress("SpellCheckingInspection")
freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlin.RequiresOptIn" + "-Xjsr305=strict"
}
}
tasks.test {
useJUnitPlatform()
}
testlogger {
showStandardStreams = true
}
application {
applicationDefaultJvmArgs = listOf("-Dkotlinx.coroutines.debug")
}
val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
jvmTarget = "1.8"
}
val compileTestKotlin: KotlinCompile by tasks
compileTestKotlin.kotlinOptions {
jvmTarget = "1.8"
}
val artifactName = project.name
val artifactGroup = project.group.toString()
val artifactVersion = project.version.toString()
val pomUrl = "https://github.com/barakb/nomad-client"
val pomScmUrl = "https://github.com/barakb/nomad-client"
val pomIssueUrl = "https://github.com/barakb/nomad-client/issues"
val pomDesc = "A Kotlin Nomad client"
val githubReadme = "Readme.md"
val pomLicenseName = "The Apache Software License, Version 2.0"
val pomLicenseUrl = "http://www.apache.org/licenses/LICENSE-2.0.txt"
val pomLicenseDist = "repo"
val pomDeveloperId = "barakb"
val pomDeveloperName = "Barak Bar Orion"
val sourcesJar by tasks.creating(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets.getByName("main").allSource)
}
val dokkaJar by tasks.creating(Jar::class) {
group = JavaBasePlugin.DOCUMENTATION_GROUP
description = "Assembles Kotlin docs with Dokka"
archiveClassifier.set("javadoc")
from(tasks.dokkaJavadoc)
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/barakb/nomad-client")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("GITHUB_ACTOR")
password = project.findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN")
}
}
}
publications {
register<MavenPublication>("gpr") {
from(components["java"])
}
}
}