64 lines
1.6 KiB
Groovy
64 lines
1.6 KiB
Groovy
plugins {
|
|
id 'net.fabricmc.fabric-loom' version '1.17.12'
|
|
}
|
|
|
|
version = project.mod_version
|
|
group = 'xyz.evoproject'
|
|
|
|
base {
|
|
archivesName = project.archives_base_name
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven {
|
|
url = 'https://maven.fabricmc.net/'
|
|
}
|
|
}
|
|
|
|
loom {
|
|
accessWidenerPath = file('src/main/resources/evolution.accesswidener')
|
|
mods {
|
|
"evolutiondlc" {
|
|
sourceSet sourceSets.main
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
|
implementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
|
implementation "io.github.llamalad7:mixinextras-fabric:${project.mixinextras_version}"
|
|
implementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
|
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
|
|
compileOnly 'com.google.code.gson:gson:2.14.0'
|
|
compileOnly 'org.slf4j:slf4j-api:2.0.17'
|
|
}
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(25)
|
|
}
|
|
}
|
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
it.options.release = 25
|
|
it.options.encoding = 'UTF-8'
|
|
it.options.compilerArgs += ['-proc:none', '-Xmaxerrs', '100000']
|
|
}
|
|
|
|
def postprocessTask = tasks.register('postprocessClasses', Exec) {
|
|
dependsOn tasks.named('classes')
|
|
commandLine 'python3', "$rootDir/tools/postbuild.py",
|
|
layout.buildDirectory.dir('classes/java/main').get().asFile.absolutePath
|
|
}
|
|
|
|
tasks.named('jar') {
|
|
dependsOn postprocessTask
|
|
}
|
|
|
|
tasks.matching { it.name == 'runClient' }.configureEach {
|
|
dependsOn postprocessTask
|
|
}
|