forked from HttpMarco/polocloud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
79 lines (67 loc) · 2.66 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
plugins {
id("maven-publish")
alias(libs.plugins.nexusPublish)
}
allprojects {
apply(plugin = "java-library")
apply(plugin = "maven-publish")
group = "dev.httpmarco.polocloud.node"
version = project.version
repositories {
mavenCentral()
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
maven("https://repo.papermc.io/repository/maven-public/")
// waterdog ref links
maven("https://repo.waterdog.dev/releases/")
maven("https://repo.waterdog.dev/snapshots/")
maven("https://repo.opencollab.dev/maven-releases/")
maven("https://repo.opencollab.dev/maven-snapshots/")
}
tasks.withType<JavaCompile>().configureEach {
sourceCompatibility = JavaVersion.VERSION_17.toString()
targetCompatibility = JavaVersion.VERSION_17.toString()
options.encoding = "UTF-8"
}
dependencies {
"implementation"(rootProject.libs.lombok)
"annotationProcessor"(rootProject.libs.lombok)
"implementation"(rootProject.libs.annotations)
"implementation"(rootProject.libs.log4j2)
"implementation"(rootProject.libs.log4j2.simple)
"implementation"(rootProject.libs.gson)
"implementation"(rootProject.libs.osgan.netty)
}
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("A simple minecraft cloud system")
licenses {
license {
name.set("Apache License 2.0")
url.set("https://www.apache.org/licenses/LICENSE-2.0")
}
}
scm {
url.set("https://github.com/httpmarco/polocloud")
connection.set("https://github.com/httpmarco/osgon.git")
}
}
}
}
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
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"))
}