54 lines
1.2 KiB
Groovy
54 lines
1.2 KiB
Groovy
|
|
plugins {
|
||
|
|
id 'java'
|
||
|
|
id 'idea'
|
||
|
|
id 'eclipse'
|
||
|
|
id 'net.minecraftforge.gradle' version '[7.0.3,8)'
|
||
|
|
}
|
||
|
|
|
||
|
|
version = '1.0.1'
|
||
|
|
group = 'cz.kofolamod'
|
||
|
|
|
||
|
|
base {
|
||
|
|
archivesName = 'kofola'
|
||
|
|
}
|
||
|
|
|
||
|
|
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
|
||
|
|
|
||
|
|
sourceSets.main.resources { srcDir 'src/generated/resources' }
|
||
|
|
|
||
|
|
minecraft {
|
||
|
|
mappings channel: 'official', version: '1.21.1'
|
||
|
|
|
||
|
|
runs {
|
||
|
|
configureEach {
|
||
|
|
workingDir = layout.projectDirectory.dir('run')
|
||
|
|
systemProperty 'forge.enabledGameTestNamespaces', 'kofola'
|
||
|
|
}
|
||
|
|
|
||
|
|
register('client')
|
||
|
|
register('server') {
|
||
|
|
args '--nogui'
|
||
|
|
}
|
||
|
|
register('gameTestServer')
|
||
|
|
register('data') {
|
||
|
|
workingDir = layout.projectDirectory.dir('run-data')
|
||
|
|
args '--mod', 'kofola', '--all', '--output', layout.projectDirectory.dir('src/generated/resources'), '--existing', layout.projectDirectory.dir('src/main/resources')
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
repositories {
|
||
|
|
minecraft.mavenizer(it)
|
||
|
|
maven fg.forgeMaven
|
||
|
|
maven fg.minecraftLibsMaven
|
||
|
|
mavenCentral()
|
||
|
|
}
|
||
|
|
|
||
|
|
dependencies {
|
||
|
|
implementation minecraft.dependency('net.minecraftforge:forge:1.21.1-52.1.20')
|
||
|
|
}
|
||
|
|
|
||
|
|
tasks.withType(JavaCompile).configureEach {
|
||
|
|
options.encoding = 'UTF-8'
|
||
|
|
}
|