-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
63 lines (54 loc) · 1.31 KB
/
build.gradle
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
plugins {
id 'java'
id 'maven-publish'
id 'io.papermc.paperweight.userdev' version '1.7.1'
}
repositories {
mavenLocal()
maven {
name 'Paper Repository'
url 'https://papermc.io/repo/repository/maven-public/'
}
}
dependencies {
paperweightDevelopmentBundle 'io.papermc.paper:dev-bundle:1.21-R0.1-SNAPSHOT'
}
group = 'gg.packetloss'
version = '1.21.0.0'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
tasks {
build {
dependsOn(reobfJar)
}
}
// Butcher the dev jar so as to publish a properly obfuscated jar
def javaComponent = components.java as AdhocComponentWithVariants
javaComponent.withVariantsFromConfiguration(configurations.apiElements) {
skip()
}
javaComponent.withVariantsFromConfiguration(configurations.runtimeElements) {
skip()
}
javaComponent.addVariantsFromConfiguration(configurations.reobf) {
mapToMavenScope("compile")
}
publishing {
publications {
maven(MavenPublication) {
from javaComponent
}
}
repositories {
maven {
url = System.getProperty("deploy-url")
credentials {
username = System.getProperty("deploy-username")
password = System.getProperty("deploy-password")
}
}
}
}