-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
98 lines (81 loc) · 2.56 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
import org.gradle.api.tasks.testing.logging.TestLogEvent.*
plugins {
kotlin("jvm") version "1.3.72"
id("idea")
id("maven-publish")
id("java")
id("com.jfrog.bintray") version "1.8.4"
}
val artifactVersion = "1.0"
group = "org.knanoid"
version = artifactVersion
repositories {
mavenCentral()
}
dependencies {
implementation(kotlin("stdlib-jdk8"))
testImplementation("org.junit.jupiter:junit-jupiter:5.6.2")
}
tasks {
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
}
tasks.withType<Test> {
useJUnitPlatform()
testLogging {
events = mutableSetOf(PASSED, SKIPPED, FAILED)
}
}
val pomUrl = "https://github.com/alekseinovikov/knanoid"
val gitHubRepo = "https://github.com/alekseinovikov/knanoid.git"
val githubReadme = "README.md"
val pomLicenseName = "GNU GENERAL PUBLIC LICENSE, Version 3.0"
val pomLicenseUrl = "https://www.gnu.org/licenses/gpl-3.0.en.html"
val pomLicenseDist = "repo"
val pomDeveloperId = "alekseinovikov"
val pomDeveloperName = "Aleksei Novikov"
val toolDescription = "KNanoid generates unique IDs"
publishing {
publications {
create<MavenPublication>("mavenPublication") {
groupId = "org.knanoid"
artifactId = "knanoid"
pom.withXml {
asNode().apply {
appendNode("description", toolDescription)
appendNode("name", "knanoid")
appendNode("url", pomUrl)
appendNode("licenses").appendNode("license").apply {
appendNode("name", pomLicenseName)
appendNode("url", pomLicenseUrl)
appendNode("distribution", pomLicenseDist)
}
appendNode("developers").appendNode("developer").apply {
appendNode("id", pomDeveloperId)
appendNode("name", pomDeveloperName)
}
appendNode("scm").apply {
appendNode("url", pomUrl)
}
}
}
from(components["java"])
}
}
}
bintray {
user = System.getenv("BINTRAY_USER") ?: System.getProperty("bintrayUser")
key = System.getenv("BINTRAY_KEY") ?: System.getProperty("bintrayKey")
setConfigurations("archives")
setPublications("mavenPublication")
pkg.apply {
repo = "utils"
name = project.name
setLicenses("GPL-3.0")
vcsUrl = gitHubRepo
}
}