-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
87 lines (73 loc) · 2.05 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
plugins {
id("org.jetbrains.kotlin.jvm") version "1.3.70" apply true
id("idea")
id("java-library")
id("maven-publish")
}
group = "com.mantono"
version = "2.0.0"
description = "Non-synchronized unique ID generator"
defaultTasks("test")
repositories {
jcenter()
mavenCentral()
maven(url = "https://jitpack.io")
}
val jvmVersion = "11"
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.70")
val coroutines = "1.3.3"
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:$coroutines")
implementation("com.github.mantono:pyttipanna:1.0.0")
// Junit
val junit = "5.6.0"
testImplementation("org.junit.jupiter:junit-jupiter-api:$junit")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junit")
}
publishing {
repositories {
maven {
name = "GithubPackages"
url = uri("https://maven.pkg.github.com/mantono/${project.name}")
credentials {
username = "mantono"
password = System.getenv("GITHUB_TOKEN")
}
}
}
publications {
register("gpr", MavenPublication::class) {
this.artifactId = project.name
this.groupId = project.group.toString()
this.version = project.version.toString()
from(components["java"])
}
}
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = "11"
}
tasks {
test {
useJUnitPlatform()
// Show test results.
testLogging {
events("passed", "skipped", "failed")
}
reports {
junitXml.isEnabled = false
html.isEnabled = true
}
}
compileKotlin {
sourceCompatibility = jvmVersion
kotlinOptions {
jvmTarget = jvmVersion
}
}
wrapper {
description = "Generates gradlew[.bat] scripts for faster execution"
gradleVersion = "6.2.1"
}
}