3 Star 5 Fork 1

GeometryCoco / Yuushya Modelling

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build.gradle 2.04 KB
一键复制 编辑 原始数据 按行查看 历史
XiLaiTL 提交于 2023-07-28 02:07 . feat(buildscript)
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 = 17
}
java {
withSourcesJar()
}
}
def versions = ['1.16.5','1.18.2','1.19.2','1.19.4','1.20.1'];
def apis = ['forge','fabric']
versions.forEach {ver->
apis.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-modelling-${ver}-${api}-${mod_version}.jar"}
into("./build/libs")
duplicatesStrategy(DuplicatesStrategy.INHERIT)
}
}
}
}
tasks.register("build-jar"){
versions.forEach {ver->
apis.forEach { api ->
dependsOn "build-jar-${ver}-${api}"
}
}
}
tasks.register("clean-all"){
dependsOn(":common:clean")
versions.forEach { ver ->
(["common"]+apis).forEach { api ->
dependsOn(":${ver}:${api}:clean")
}
}
}
def build_tasks = versions.collectMany {ver-> apis.collect {api-> "build-jar-${ver}-${api}"}}
tasks.register("build-chain1",SequenceTask,["clean-all"]+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()))
Java
1
https://gitee.com/yuushyatownscape/yuushya-modelling.git
git@gitee.com:yuushyatownscape/yuushya-modelling.git
yuushyatownscape
yuushya-modelling
Yuushya Modelling
master

搜索帮助