forked from HttpMarco/polocloud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
74 lines (63 loc) · 2.44 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
plugins {
alias(libs.plugins.nexus.publish)
}
allprojects {
apply(plugin = "java-library")
apply(plugin = "maven-publish")
group = "dev.httpmarco.polocloud"
version = "1.0.10-SNAPSHOT"
repositories {
mavenCentral()
maven(url = "https://s01.oss.sonatype.org/content/repositories/snapshots/")
maven(url = "https://repo.papermc.io/repository/maven-public/")
}
dependencies {
"annotationProcessor"(rootProject.libs.bundles.utils)
"implementation"(rootProject.libs.bundles.utils)
}
tasks.withType<JavaCompile>().configureEach {
sourceCompatibility = JavaVersion.VERSION_17.toString()
targetCompatibility = JavaVersion.VERSION_17.toString()
options.encoding = "UTF-8"
options.compilerArgs.add("-parameters")
}
extensions.configure<PublishingExtension> {
publications {
create("library", MavenPublication::class.java) {
from(project.components.getByName("java"))
pom {
name.set(project.name)
url.set("https://github.com/httpmarco/polocloud")
description.set("PoloCloud is the simplest and easiest Cloud for Minecraft")
licenses {
license {
name.set("Apache License")
url.set("https://www.apache.org/licenses/LICENSE-2.0")
}
}
developers {
developer {
name.set("Mirco Lindenau")
email.set("mirco.lindenau@gmx.de")
}
}
scm {
url.set("https://github.com/httpmarco/polocloud")
connection.set("https://github.com/httpmarco/polocloud.git")
}
}
}
}
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/releases/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
username.set(System.getenv("ossrhUsername")?.toString() ?: "")
password.set(System.getenv("ossrhPassword")?.toString() ?: "")
}
}
useStaging.set(!project.rootProject.version.toString().endsWith("-SNAPSHOT"))
}