-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
98 lines (81 loc) · 2.58 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
plugins {
id('java')
id('maven-publish')
id('com.github.johnrengelman.shadow') version '8.1.1' apply false
id('io.papermc.paperweight.patcher') version '1.5.5'
}
def paperMavenPublicUrl = 'https://repo.papermc.io/repository/maven-public/'
repositories {
maven { url = 'https://maven.aliyun.com/repository/public' }
maven {
url = paperMavenPublicUrl
content { onlyForConfigurations(configurations.paperclip.name) }
}
}
dependencies {
remapper('net.fabricmc:tiny-remapper:0.8.2:fat')
decompiler('net.minecraftforge:forgeflower:1.5.605.7')
paperclip('io.papermc:paperclip:3.0.2')
}
allprojects {
apply plugin: 'java'
apply plugin: 'maven-publish'
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
publishing {
repositories {
mavenLocal()
}
}
}
subprojects {
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.release = 17
}
tasks.withType(Javadoc) {
options.encoding = 'UTF-8'
}
tasks.withType(ProcessResources) {
filteringCharset = 'UTF-8'
}
repositories {
maven { url = 'https://maven.aliyun.com/repository/public' }
maven { url = paperMavenPublicUrl }
}
}
paperweight {
serverProject.set(project(':nebula-server'))
remapRepo.set(paperMavenPublicUrl)
decompileRepo.set(paperMavenPublicUrl)
usePaperUpstream(providers.gradleProperty('paperRef')) {
withPaperPatcher { config ->
config.apiPatchDir.set(layout.projectDirectory.dir('patches/api'))
config.apiOutputDir.set(layout.projectDirectory.dir('nebula-api'))
config.serverPatchDir.set(layout.projectDirectory.dir('patches/server'))
config.serverOutputDir.set(layout.projectDirectory.dir('nebula-server'))
}
}
}
println "Paper Version: ${providers.gradleProperty('paperRef').get()}"
/*
tasks.generateDevelopmentBundle {
apiCoordinates.set('xianxian.mc.nebula:nebula-api')
mojangApiCoordinates.set('io.papermc.paper:paper-mojangapi')
libraryRepositories.set(['https://maven.aliyun.com/repository/public', paperMavenPublicUrl])
}
publishing {
// Publishing dev bundle:
// ./gradlew publishDevBundlePublicationTo(MavenLocal|MyRepoSnapshotsRepository) -PpublishDevBundle
if (project.hasProperty('publishDevBundle')) {
publications.create('devBundle', MavenPublication) {
artifact(tasks.generateDevelopmentBundle) {
artifactId = 'dev-bundle'
}
}
}
}
*/