-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
105 lines (93 loc) · 2.74 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
import java.net.URI
plugins {
kotlin("multiplatform") version "1.5.32"
`maven-publish`
signing
}
group = "org.araqnid.kotlin.assert-that"
version = "0.1.1"
description = "Kotlin multiplatform test assertion library"
repositories {
mavenCentral()
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlin {
jvm { }
js {
nodejs { }
useCommonJs()
}
}
dependencies {
commonMainImplementation(kotlin("stdlib-common"))
commonMainImplementation(kotlin("test-common"))
commonMainCompileOnly(kotlin("test-annotations-common"))
"jvmMainImplementation"(kotlin("stdlib-jdk8"))
"jvmMainImplementation"(kotlin("test-junit"))
"jsMainImplementation"(kotlin("stdlib-js"))
"jsMainImplementation"(kotlin("test-js"))
}
tasks {
withType<Jar>().configureEach {
manifest {
attributes["Implementation-Title"] = project.description ?: project.name
attributes["Implementation-Version"] = project.version
}
}
}
val javadocJar = tasks.register("javadocJar", Jar::class.java) {
archiveClassifier.set("javadoc")
}
publishing {
publications {
withType<MavenPublication> {
artifact(javadocJar)
pom {
name.set(project.name)
description.set(project.description)
licenses {
license {
name.set("Apache")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
url.set("https://github.com/araqnid/assert-that")
issueManagement {
system.set("Github")
url.set("https://github.com/araqnid/assert-that/issues")
}
scm {
connection.set("https://github.com/araqnid/assert-that.git")
url.set("https://github.com/araqnid/assert-that")
}
developers {
developer {
name.set("Steven Haslam")
email.set("[email protected]")
}
}
}
}
}
repositories {
val sonatypeUser: String? by project
if (sonatypeUser != null) {
maven {
name = "OSSRH"
url = URI("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
val sonatypePassword: String by project
credentials {
username = sonatypeUser
password = sonatypePassword
}
}
}
}
}
signing {
useGpgCmd()
sign(publishing.publications)
}