-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
152 lines (124 loc) · 4.64 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.6-SNAPSHOT" apply false
id 'com.matthewprenger.cursegradle' version '1.+'
id "com.modrinth.minotaur" version "2.+"
}
architectury {
minecraft = rootProject.minecraft_version
}
subprojects {
apply plugin: "dev.architectury.loom"
apply plugin: "com.modrinth.minotaur"
apply plugin: "com.matthewprenger.cursegradle"
loom {
silentMojangMappingsLicense()
}
repositories {
maven { url "https://maven.neoforged.net/releases" }
maven { url "https://maven.pitan76.net/" }
maven { url "https://maven.shedaniel.me/" }
mavenLocal()
}
dependencies {
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
// Mojang Mappings
//mappings loom.officialMojangMappings()
// Fabric Yarn Mappings
mappings "net.fabricmc:yarn:${rootProject.yarn_mappings}:v2"
modApi "net.pitan76:mcpitanlib-common+${rootProject.mcpitanlib_version}"
}
/*
if (name in rootProject.enabled_platforms.split(",")) {
var modLoader = name
if (System.getenv("CURSEFORGE_TOKEN") != null) {
curseforge {
apiKey = System.getenv("CURSEFORGE_TOKEN")
project {
id = ''
changelog = rootProject.changelog + "\nMCPitanLib version: " + mcpitanlib_version.split(":")[1]
releaseType = 'release'
if (modLoader == "fabric")
addGameVersion "Fabric"
if (modLoader == "forge")
addGameVersion "Forge"
if (modLoader == "neoforge")
addGameVersion "NeoForge"
if (modLoader != "neoforge") {
addGameVersion '1.18.1'
addGameVersion '1.18.2'
addGameVersion '1.19'
addGameVersion '1.19.1'
addGameVersion '1.19.2'
addGameVersion '1.20'
addGameVersion '1.20.1'
}
addGameVersion '1.20.4'
if (modLoader != "forge") {
addGameVersion '1.21'
addGameVersion '1.21.1'
}
relations {
if (modLoader == "fabric")
requiredDependency "fabric-api"
requiredDependency 'mcpitanlibarch'
}
mainArtifact(tasks.remapJar)
}
options {
forgeGradleIntegration = false
}
}
}
if (System.getenv("MODRINTH_TOKEN") != null) {
modrinth {
token = System.getenv("MODRINTH_TOKEN")
projectId = ''
versionNumber = project.mod_version + "-" + modLoader
gameVersions = []
if (modLoader != "neoforge")
gameVersions.addAll(['1.18', '1.18.1', '1.18.2', '1.19', '1.19.1', '1.19.2', '1.20', '1.20.1'])
gameVersions.add('1.20.4')
if (modLoader != "forge")
gameVersions.addAll(['1.21', '1.21.1'])
versionType = 'release'
uploadFile = tasks.remapJar
changelog = rootProject.changelog + "\nMCPitanLib version: " + mcpitanlib_version.split(":")[1]
loaders = [modLoader]
dependencies {
if (modLoader == "fabric")
required.project "P7dR8mSH" // Fabric API
required.project "uNRoUnGT" // MCPitanLib
}
}
}
}
*/
}
allprojects {
apply plugin: "java"
apply plugin: "architectury-plugin"
apply plugin: "maven-publish"
archivesBaseName = rootProject.archives_base_name
mod_name = rootProject.mod_name
mod_id = rootProject.mod_id
version = rootProject.mod_version
group = rootProject.maven_group
repositories {
}
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
if (project.name == "neoforge") {
options.release = 17
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
} else {
options.release = 8
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
java {
withSourcesJar()
}
}