forked from Owen1212055/ParticleHelper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
67 lines (58 loc) · 1.76 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
plugins {
java
id("maven-publish")
id("com.github.johnrengelman.shadow") version "7.1.0"
}
tasks {
shadowJar {
archiveClassifier.set("")
}
}
val nmsProject = project(":nms:nms-impl")
dependencies {
// include all impls
for (child in nmsProject.childProjects) {
implementation(project(child.value.path, configuration = "reobf"))
}
implementation(project(":api"))
implementation(project(":nms:nms-interface"))
}
allprojects {
apply(plugin = "java")
apply(plugin = "maven-publish")
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
repositories {
mavenCentral()
maven("https://papermc.io/repo/repository/maven-public/")
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.19.2-R0.1-SNAPSHOT")
}
publishing {
repositories {
maven {
url = uri("https://maven.pkg.github.com/LemonGamingLtd/ParticleHelper")
credentials {
// sadly, we have to do this until fine-grained tokens get support for GitHub Packages
username = providers.gradleProperty("lgGithubUser").getOrElse(System.getenv("GITHUB_ACTOR"))
password = providers.gradleProperty("lgGithubToken").getOrElse(System.getenv("GITHUB_TOKEN"))
}
}
}
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
artifactId = providers.gradleProperty("name").get() + "-" + project.name
}
}
}
}
publishing {
publications {
getByName<MavenPublication>("mavenJava") {
artifactId = providers.gradleProperty("name").get()
}
}
}