-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
118 lines (100 loc) · 3.22 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
106
107
108
109
110
111
112
113
114
115
116
117
118
plugins {
java
id("org.jlleitschuh.gradle.ktlint") version "9.2.1"
kotlin("jvm") version "1.6.21"
signing
`maven-publish`
}
group = "com.urielsalis"
version = "2.0.10"
val arrowVersion = "0.10.4"
val jacksonVersion = "2.12.3"
repositories {
mavenCentral()
}
dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation("io.arrow-kt", "arrow-core", arrowVersion)
implementation("io.arrow-kt", "arrow-syntax", arrowVersion)
implementation("io.arrow-kt", "arrow-fx", arrowVersion)
implementation("com.guardsquare", "proguard-retrace", "7.1.0-beta5")
implementation("com.fasterxml.jackson.module", "jackson-module-kotlin", jacksonVersion)
implementation("com.fasterxml.jackson.datatype", "jackson-datatype-jsr310", jacksonVersion)
testImplementation("org.junit.jupiter", "junit-jupiter", "5.7.1")
}
configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_11
}
val sourcesJar = tasks.create("sourcesJar", Jar::class) {
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}
val javadocJar = tasks.create("javadocJar", Jar::class) {
dependsOn.add(tasks.javadoc)
archiveClassifier.set("javadoc")
from(tasks.javadoc)
}
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
artifactId = "mc-crash-lib"
from(components["java"])
pom {
name.set("mc-crash-lib")
description.set("A library to parse Minecraft crashes and deobfuscate them")
url.set("https://github.com/urielsalis/mc-crash-lib")
licenses {
license {
name.set("MIT License")
url.set("https://www.opensource.org/licenses/mit-license.php")
}
}
scm {
connection.set("scm:git:git://github.com/urielsalis/mc-crash-lib.git/")
developerConnection.set("scm:git:ssh://github.com:urielsalis/mc-crash-lib.git")
url.set("https://github.com/urielsalis/mc-crash-lib")
}
developers {
developer {
id.set("urielsalis")
name.set("Uriel Salischiker")
email.set("[email protected]")
}
}
}
}
}
val ossrhUsername: String? by project
val ossrhPassword: String? by project
repositories {
maven(url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
credentials {
username = ossrhUsername
password = ossrhPassword
}
}
}
}
tasks {
compileKotlin {
kotlinOptions.jvmTarget = "11"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "11"
}
signing {
sign(publishing.publications["mavenJava"])
sign(configurations.archives.get())
}
}
tasks.get("publishMavenJavaPublicationToMavenRepository").dependsOn("signArchives")
tasks.test {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
}