代码拉取完成,页面将自动刷新
allprojects {
apply plugin: "java"
apply plugin: "maven-publish"
archivesBaseName = rootProject.archives_base_name
version = rootProject.mod_version
group = rootProject.maven_group
repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.release = 22
}
java {
withSourcesJar()
}
}
def versions = ['1.16.5','1.18.2','1.19.2','1.19.4','1.20.1','1.20.4','1.20.6','1.21.0'];
def apis = { ver->
if(ver in ['1.20.6','1.21.0']) ['neoforge','fabric']
else if(ver == '1.20.4') ['fabric','neoforge']
else ['forge','fabric']
}
versions.forEach {ver->
apis(ver).forEach {api->
tasks.register("runClient-${ver}-${api}"){
dependsOn(":${ver}:${api}:runClient")
}
tasks.register("build-jar-${ver}-${api}",Copy){
dependsOn(":${ver}:${api}:build")
with{
from("./${ver}/${api}/build/libs/yuushya-${mod_version}.jar")
rename {"yuushya-${ver}-${api}-${mod_version}.jar"}
into("./build/libs")
duplicatesStrategy(DuplicatesStrategy.INHERIT)
}
}
}
}
tasks.register("build-jar"){
versions.forEach {ver->
apis(ver).forEach { api ->
dependsOn "build-jar-${ver}-${api}"
}
}
}
tasks.register("clean-all"){
dependsOn(":common:clean")
versions.forEach { ver ->
(["common"]+apis(ver)).forEach { api ->
dependsOn(":${ver}:${api}:clean")
}
}
}
tasks.register("build-tools",Copy){
from("./buildSrc/build/libs/buildSrc-0.0.0.jar")
rename {"yuushya-tool.jar"}
into("./build/tools")
}
def build_tasks = versions.collectMany {ver-> apis(ver).collect {api-> "build-jar-${ver}-${api}"}}
tasks.register("gen-chain-1"){
dependsOn("clean-all")
finalizedBy(['1.16.5','1.18.2','1.19.2','1.19.4','1.20.1','1.20.4'].collect{":common:gen-${it}"})
}
tasks.register("gen-chain-2"){
dependsOn(":common:clean")
finalizedBy([":common:gen-1.20.6"])
}
tasks.register("gen-chain-3"){
dependsOn(":common:clean")
finalizedBy([":common:gen-1.21.0"])
}
tasks.register("build-chain1",SequenceTask,build_tasks.subList(0, build_tasks.size()/2 as int))
tasks.register("build-chain2",SequenceTask,build_tasks.subList(build_tasks.size()/2 as int,build_tasks.size()))
tasks.register("test-chain",SequenceTask,[
":common:clean",
":common:gen-1.20.1",
":1.20.1:fabric:runClient"
])
tasks.register("build-chain-1.21.0",SequenceTask,[
":common:clean",
":common:gen-1.21.0",
"build-jar-1.21.0-neoforge"
])
tasks.register("build-fabric-chain-1.21.0",SequenceTask,[
":common:clean",
":common:gen-1.21.0",
"build-jar-1.21.0-fabric"
])
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。