建立gitignore
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
plugins {
|
||||
id 'net.neoforged.moddev' version '2.0.78'
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
def localRepository = mavenLocal()
|
||||
remove(localRepository)
|
||||
add(0, localRepository)
|
||||
// KubeJS / Rhino 官方 maven(备用,当前用本地 jar)
|
||||
maven { url = 'https://maven.latvian.dev/releases' }
|
||||
}
|
||||
|
||||
version = "${mod_version}+${neoforge_version}"
|
||||
group = mod_group
|
||||
|
||||
base { archivesName = "KubeJS Thaumcraft" }
|
||||
|
||||
java {
|
||||
toolchain.languageVersion = JavaLanguageVersion.of(21)
|
||||
}
|
||||
|
||||
neoForge {
|
||||
version = neoforge_version
|
||||
runs {
|
||||
client { client() }
|
||||
server { server() }
|
||||
}
|
||||
mods { "${mod_id}" { sourceSet sourceSets.main } }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// KubeJS 本地 jar(compileOnly:仅编译期引用,运行时由 KubeJS mod 提供)
|
||||
compileOnly files('library/kubejs-neoforge-2101.7.2-build.368.jar')
|
||||
// Rhino(KubeJS 依赖脚本引擎,2101.7.2 对应 2101.2.7-build.81)
|
||||
compileOnly files('library/rhino-2101.2.7-build.81.jar')
|
||||
// Thaumcraft 移植版(本地 jar)
|
||||
compileOnly files('library/thaumcraft-0.2.2.34-port.1.jar')
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
it.options.encoding = 'UTF-8'
|
||||
it.options.release = 21
|
||||
}
|
||||
|
||||
def loaderRange = project.findProperty('loader_version_range') ?: '[4,)'
|
||||
def neoforgeRange = project.findProperty('neoforge_version_range') ?: '[21,)'
|
||||
def mcRange = project.findProperty('minecraft_version_range') ?: '[1.21.1,1.22)'
|
||||
def modVersion = mod_version
|
||||
|
||||
processResources {
|
||||
filesMatching('META-INF/neoforge.mods.toml') {
|
||||
expand([
|
||||
'version': modVersion, 'loader_version_range': loaderRange,
|
||||
'neoforge_version_range': neoforgeRange, 'minecraft_version_range': mcRange
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
jar { duplicatesStrategy = DuplicatesStrategy.EXCLUDE }
|
||||
Reference in New Issue
Block a user