-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
130 lines (105 loc) · 3.38 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
plugins {
id 'java'
id 'maven-publish'
id 'architectury-plugin' version "${architect_plugin_version}" apply false
id 'dev.architectury.loom' version "${loom_plugin_version}" apply false
id 'com.github.johnrengelman.shadow' version "${shadow_plugin_version}" apply false
id 'xyz.jpenilla.run-paper' version "${run_task_plugin_version}" apply false
id 'xyz.jpenilla.run-waterfall' version "${run_task_plugin_version}" apply false
id 'xyz.jpenilla.run-velocity' version "${run_task_plugin_version}" apply false
}
def ENV = System.getenv()
allprojects {
apply plugin: 'maven-publish'
group = project_group
version = project_version
repositories {
maven {
name = 'ParchmentMC'
url = 'https://maven.parchmentmc.org'
}
maven {
name = 'PaperMC'
url = 'https://repo.papermc.io/repository/maven-public/'
}
maven {
name = 'Architectury'
url = 'https://maven.architectury.dev/'
}
maven {
name = 'FabricMC'
url = 'https://maven.fabricmc.net/'
}
maven {
name = 'NeoForged'
url = 'https://maven.neoforged.net/releases/'
}
maven {
name = 'SpigotMC'
url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
}
maven {
name = 'Sonatype'
url = 'https://oss.sonatype.org/content/groups/public/'
}
maven {
name = 'Sonatype Snapshots'
url = 'https://oss.sonatype.org/content/repositories/snapshots'
}
maven {
name = 'Mod Menu'
url = 'https://maven.terraformersmc.com/releases'
}
maven {
name = 'Curse maven'
url = 'https://cursemaven.com'
content {
includeGroup 'curse.maven'
}
}
mavenCentral()
}
publishing {
repositories {
mavenLocal()
maven {
name = 'YuluoMaven'
def releaseUrl = 'https://maven.yuluo.dev/repository/maven-releases/'
def snapshotUrl = 'https://maven.yuluo.dev/repository/maven-snapshots/'
url = ENV.MOD_RELEASE ? releaseUrl : snapshotUrl
credentials {
username ENV.MOD_MAVEN_USER
password ENV.MOD_MAVEN_PASS
}
}
}
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'com.github.johnrengelman.shadow'
jar.finalizedBy(shadowJar)
java {
sourceCompatibility = JavaVersion.toVersion(project.target_java_version)
targetCompatibility = JavaVersion.toVersion(project.target_java_version)
toolchain.languageVersion = JavaLanguageVersion.of(project.target_java_version)
withSourcesJar()
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
options.release = Integer.parseInt(project.target_java_version)
}
components.java {
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
skip()
}
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = project.name
from components.java
}
}
}
}