-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle.kts
82 lines (71 loc) · 2.13 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.5.31"
`maven-publish`
signing
}
group = "com.sealwu"
version = "1.0.22"
repositories {
mavenCentral()
}
dependencies {
testImplementation(kotlin("test"))
}
tasks.test {
useJUnitPlatform()
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
tasks.withType<JavaCompile>().configureEach {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
}
java {
withSourcesJar()
withJavadocJar()
}
publishing {
publications {
create<MavenPublication>("mavenKotlin") {
pom {
name.set("Kscript Tools")
description.set("Easy way run shell commandline in kotlin and scripts")
url.set("http://github.com/wuseal/Kscript-Tools")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
id.set("wuseal")
name.set("wuseal")
email.set("[email protected]")
}
}
scm {
url.set("https://github.com/wuseal/Kscript-Tools")
}
}
artifactId = "kscript-tools"
from(components["java"])
}
}
repositories {
maven {
name = "mavenCentral"
// change URLs to point to your repos, e.g. http://my.org/repo
val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
val releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
val urlString = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl
url = uri(urlString)
credentials(PasswordCredentials::class)
}
}
}
signing {
sign(publishing.publications.getByName("mavenKotlin"))
}