This repository has been archived by the owner on Jul 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
101 lines (83 loc) · 2.27 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.7.0"
id("org.jetbrains.dokka") version "1.7.0"
`maven-publish`
signing
}
group = "io.foxcapades.lib"
version = "1-SNAPSHOT"
repositories {
mavenCentral()
}
dependencies {
testImplementation(kotlin("test"))
}
tasks.test {
useJUnitPlatform()
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withJavadocJar()
withSourcesJar()
}
tasks.dokkaHtml {
outputDirectory.set(file("build/docs/dokka"))
}
publishing {
repositories {
maven {
name = "GitHub"
url = uri("https://maven.pkg.github.com/foxcapades/pdk")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN")
}
}
maven {
name = "Sonatype"
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = project.findProperty("nexus.user") as String? ?: System.getenv("NEXUS_USER")
password = project.findProperty("nexus.pass") as String? ?: System.getenv("NEXUS_PASS")
}
}
}
publications {
create<MavenPublication>("gpr") {
from(components["java"])
pom {
name.set("Primitive Deques")
description.set("Provides deque implementations for dealing with Kotlin's primitives (without the boxing).")
url.set("https://github.com/foxcapades/pdk")
licenses {
license {
name.set("MIT")
}
}
developers {
developer {
id.set("epharper")
name.set("Elizabeth Paige Harper")
email.set("foxcapades.io@gmail.com")
url.set("https://github.com/foxcapades")
}
}
scm {
connection.set("scm:git:git://github.com/foxcapades/pdk.git")
developerConnection.set("scm:git:ssh://github.com/foxcapades/pdk.git")
url.set("https://github.com/foxcapades/pdk")
}
}
}
}
}
signing {
useGpgCmd()
sign(configurations.archives.get())
sign(publishing.publications["gpr"])
}