-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
82 lines (65 loc) · 1.92 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
82 lines (65 loc) · 1.92 KB
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
plugins {
id("java-library")
alias(libs.plugins.lombok)
id("maven-publish")
}
group = "xyz.refinedev.practice"
version = "1.2.0"
repositories {
mavenCentral()
mavenLocal()
maven("https://maven.refinedev.org/public-repo")
maven("https://repo.codemc.io/repository/maven-releases/")
maven("https://repo.codemc.io/repository/maven-public/")
maven("https://repo.codemc.io/repository/nms/")
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(8))
withSourcesJar()
withJavadocJar()
}
val outputDir = layout.projectDirectory.dir("jars")
tasks.jar {
destinationDirectory.set(outputDir)
}
tasks.named<Jar>("sourcesJar") {
destinationDirectory.set(outputDir)
}
tasks.named<Jar>("javadocJar") {
destinationDirectory.set(outputDir)
}
dependencies {
compileOnly(libs.paper.api.legacy) {
exclude("com.google.code.gson", "gson")
}
compileOnlyApi(libs.packetevents.spigot) {
exclude(group = "com.google.code.gson", module = "gson")
exclude(group = "org.jetbrains", module = "annotations")
exclude(group = "com.github.retrooper.packetevents", module = "netty-common")
}
compileOnly(libs.jetbrains.annotations)
compileOnlyApi(libs.fastutil)
compileOnlyApi(libs.xseries)
compileOnlyApi(libs.knockback.api)
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
groupId = group.toString()
artifactId = artifactId.toString()
version = version.toString()
}
}
repositories {
mavenLocal()
maven {
name = "refine-public"
url = uri("https://maven.refinedev.org/public-repo")
credentials {
username = findProperty("mavenUsername") as String? ?: ""
password = findProperty("mavenPassword") as String? ?: ""
}
}
}
}