34 lines
992 B
Groovy
34 lines
992 B
Groovy
plugins {
|
|
id 'java-library'
|
|
id 'net.neoforged.moddev' version '2.0.107'
|
|
}
|
|
group = mod_group_id
|
|
version = mod_version
|
|
base { archivesName = "${mod_id}-neoforge-1.21.1" }
|
|
java { toolchain.languageVersion = JavaLanguageVersion.of(21) }
|
|
neoForge {
|
|
version = neo_version
|
|
runs {
|
|
client { client() }
|
|
server {
|
|
server()
|
|
gameDirectory = file('run-neoforge-server')
|
|
programArgument '--nogui'
|
|
}
|
|
}
|
|
mods {
|
|
"${mod_id}" { sourceSet sourceSets.main }
|
|
}
|
|
}
|
|
tasks.named('processResources', ProcessResources).configure {
|
|
def properties = [mod_id: mod_id, mod_version: mod_version, mod_name: mod_name,
|
|
mod_license: mod_license, mod_authors: mod_authors]
|
|
inputs.properties properties
|
|
filesMatching('META-INF/neoforge.mods.toml') { expand properties }
|
|
}
|
|
tasks.withType(JavaCompile).configureEach { options.encoding = 'UTF-8' }
|
|
|
|
tasks.named('jar', Jar).configure {
|
|
from('LICENSE')
|
|
}
|