-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
111 lines (93 loc) · 3.26 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
plugins {
kotlin("jvm") version "2.0.0"
kotlin("plugin.serialization") version "2.0.0"
id("application")
id("java-library")
id("maven-publish")
id("signing")
}
group = "me.obsilabor"
version = "1.0.8"
application {
mainClass.set("$group.pistonmetakt.classgen.ClassGeneratorKt")
}
repositories {
mavenCentral()
}
dependencies {
implementation("com.squareup:kotlinpoet:1.12.0")
implementation("io.ktor:ktor-client-core:2.3.12")
implementation("io.ktor:ktor-client-cio:2.3.12")
implementation("io.ktor:ktor-client-content-negotiation:2.3.12")
implementation("io.ktor:ktor-serialization-kotlinx-json:2.3.12")
implementation("org.slf4j:slf4j-simple:2.0.3")
implementation("io.ktor:ktor-server-core:2.3.12")
implementation("io.ktor:ktor-server-netty:2.3.12")
implementation("me.nullicorn:ms-to-mca:0.0.1")
}
signing {
sign(publishing.publications)
}
java {
withSourcesJar()
withJavadocJar()
}
val jarThing by tasks.registering(Jar::class) {
archiveClassifier.set("jar")
}
publishing {
kotlin.runCatching {
repositories {
maven("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
name = "ossrh"
credentials(PasswordCredentials::class) {
username = (property("ossrhUsername") ?: return@credentials) as String
password = (property("ossrhPassword") ?: return@credentials) as String
}
}
/*
maven("https://repo.obsilabor.me/snapshots") {
name = "obsilaborRepoSnapshots"
credentials(PasswordCredentials::class) {
username = (property("obsilaborRepoUsername") ?: return@credentials) as String
password = (property("obsilaborRepoPassword") ?: return@credentials) as String
}
authentication {
create<BasicAuthentication>("basic")
}
}
*/
}
}.onFailure {
println("Unable to add publishing repositories: ${it.message}")
}
publications {
create<MavenPublication>(project.name) {
from(components["java"])
artifact(jarThing.get())
this.groupId = project.group.toString()
this.artifactId = project.name.toLowerCase()
this.version = project.version.toString()
pom {
name.set(project.name)
description.set("Kotlin library to interact with mojangs launchermeta and \"piston-data\" api")
developers {
developer {
name.set("mooziii")
}
}
licenses {
license {
name.set("GPL-3.0 License")
url.set("https://github.com/mooziii/piston-meta-kt/blob/master/LICENSE")
}
}
url.set("https://github.com/mooziii/piston-meta-kt")
scm {
connection.set("scm:git:git://github.com/mooziii/piston-meta-kt.git")
url.set("https://github.com/mooziii/piston-meta-kt/tree/main")
}
}
}
}
}