forked from MinusKube/Netherboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
69 lines (58 loc) · 1.69 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
plugins {
`maven-publish`
`java-library`
java
id("com.github.johnrengelman.shadow") version "7.1.2"
}
subprojects {
group = "live.mcparty"
version = "2.2.1"
apply {
plugin("com.github.johnrengelman.shadow")
plugin("java")
plugin("java-library")
plugin("maven-publish")
}
repositories {
mavenCentral()
maven("https://papermc.io/repo/repository/maven-public/")
}
dependencies {
api("org.slf4j:slf4j-api:2.0.0-alpha6")
api("org.slf4j:slf4j-simple:2.0.0-alpha6")
}
tasks.withType(JavaCompile::class) {
sourceCompatibility = "17"
targetCompatibility = "17"
}
java {
withSourcesJar()
withJavadocJar()
}
publishing {
repositories {
maven {
url = uri("https://repo.mcparty.live/packages/")
credentials {
username = project.findProperty("mcp.user") as? String ?: System.getenv("REPO_USERNAME")
password = project.findProperty("mcp.key") as? String ?: System.getenv("REPO_TOKEN")
}
}
}
publications {
create<MavenPublication>(project.name) {
groupId = "live.mcparty"
artifactId = "netherboard-${project.name}"
from(components["java"])
}
}
}
configurations.named("api").isCanBeResolved = true
configurations.named("api").extendsFrom(configurations.named("shadow").get())
}
project(":core") {
tasks.jar {
archiveFileName.set("Netherboard-API-" + project.version + ".jar")
archiveBaseName.set("netherboard-core")
}
}