174 lines
5.0 KiB
Groovy
174 lines
5.0 KiB
Groovy
plugins {
|
|
id 'multiloader-loader'
|
|
id 'net.neoforged.moddev'
|
|
}
|
|
|
|
repositories {
|
|
maven {
|
|
name = "Shedaniel"
|
|
url "https://maven.shedaniel.me/"
|
|
}
|
|
|
|
maven { url 'https://jitpack.io' }
|
|
}
|
|
|
|
neoForge {
|
|
version = neoforge_version
|
|
// Automatically enable neoforge AccessTransformers if the file exists
|
|
def at = project(':Common').file('src/main/resources/META-INF/accesstransformer.cfg')
|
|
if (at.exists()) {
|
|
accessTransformers.from(at.absolutePath)
|
|
}
|
|
parchment {
|
|
minecraftVersion = minecraft_version
|
|
mappingsVersion = parchment_version
|
|
}
|
|
runs {
|
|
configureEach {
|
|
systemProperty('neoforge.enabledGameTestNamespaces', mod_id)
|
|
ideName = "NeoForge ${it.name.capitalize()} (${project.path})" // Unify the run config names with fabric
|
|
}
|
|
client {
|
|
client()
|
|
}
|
|
data {
|
|
clientData()
|
|
}
|
|
server {
|
|
server()
|
|
}
|
|
}
|
|
mods {
|
|
"${mod_id}" {
|
|
sourceSet sourceSets.main
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
dependencies {
|
|
api "me.shedaniel.cloth:cloth-config-neoforge:${cloth_config_version}"
|
|
}
|
|
|
|
sourceSets.main.resources { srcDir 'src/generated/resources' }
|
|
|
|
//plugins {
|
|
// id 'idea'
|
|
// id 'maven-publish'
|
|
// id 'net.neoforged.gradle.userdev' version '7.0.168'
|
|
// id 'java-library'
|
|
//}
|
|
//
|
|
//
|
|
//if (System.getenv('BUILD_NUMBER') != null) {
|
|
// version += "." + System.getenv('BUILD_NUMBER')
|
|
//}
|
|
//
|
|
//base {
|
|
// archivesName = "${mod_id}-neoforge-${minecraft_version}"
|
|
//}
|
|
//
|
|
////jarJar.enable()
|
|
//
|
|
////archivesBaseName = "${mod_id}-neoforge-${minecraft_version}"
|
|
//
|
|
///*
|
|
//mixin {
|
|
// add sourceSets.main, "${mod_id}.refmap.json"
|
|
//
|
|
// config "${mod_id}.mixins.json"
|
|
// config "${mod_id}.forge.mixins.json"
|
|
//}
|
|
//*/
|
|
//
|
|
//if (file('src/main/resources/META-INF/accesstransformer.cfg').exists()) {
|
|
// minecraft.accessTransformers.file file('src/main/resources/META-INF/accesstransformer.cfg')
|
|
//}
|
|
//
|
|
//runs {
|
|
// // applies to all the run configs below
|
|
// configureEach {
|
|
// systemProperty 'forge.logging.markers', 'REGISTRIES'
|
|
// systemProperty 'forge.logging.console.level', 'debug'
|
|
// modSource project.sourceSets.main
|
|
// }
|
|
//
|
|
// client {
|
|
// // Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
|
|
// systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
|
|
// }
|
|
//
|
|
// server {
|
|
// systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
|
|
// programArgument '--nogui'
|
|
// }
|
|
//
|
|
// // This run config launches GameTestServer and runs all registered gametests, then exits.
|
|
// // By default, the server will crash when no gametests are provided.
|
|
// // The gametest system is also enabled by default for other run configs under the /test command.
|
|
// gameTestServer {
|
|
// systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
|
|
// }
|
|
//
|
|
// /*
|
|
// data {
|
|
// // example of overriding the workingDirectory set in configureEach above, uncomment if you want to use it
|
|
// // workingDirectory project.file('run-data')
|
|
//
|
|
// // Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
|
|
// programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
|
|
// }*/
|
|
//}
|
|
//
|
|
//sourceSets.main.resources { srcDir 'src/generated/resources' }
|
|
//
|
|
//configurations {
|
|
// runtimeClasspath.extendsFrom localRuntime
|
|
//}
|
|
//
|
|
//
|
|
//tasks.named("test").configure {
|
|
// enabled = false
|
|
//}
|
|
//
|
|
//dependencies {
|
|
// implementation "net.neoforged:neoforge:${neoforge_version}"
|
|
// compileOnly project(":Common")
|
|
//
|
|
// api "me.shedaniel.cloth:cloth-config-neoforge:${cloth_config_version}"
|
|
// //implementation fg.deobf("net.darkhax.gamestages:GameStages-Forge-1.19.2:11.0.2")
|
|
// //implementation fg.deobf("net.darkhax.bookshelf:Bookshelf-Forge-1.19.3:17.0.2")
|
|
//}
|
|
//
|
|
//// NeoGradle compiles the game, but we don't want to add our common code to the game's code
|
|
//Spec<Task> notNeoTask = { Task it -> !it.name.startsWith("neo") } as Spec<Task>
|
|
//
|
|
//tasks.withType(JavaCompile).matching(notNeoTask).configureEach {
|
|
// source(project(":Common").sourceSets.main.allSource)
|
|
//}
|
|
//
|
|
//tasks.withType(Javadoc).matching(notNeoTask).configureEach {
|
|
// source(project(":Common").sourceSets.main.allJava)
|
|
//}
|
|
//
|
|
//tasks.named("sourcesJar", Jar) {
|
|
// from(project(":Common").sourceSets.main.allSource)
|
|
//}
|
|
//
|
|
//tasks.withType(ProcessResources).matching(notNeoTask).configureEach {
|
|
// from project(":Common").sourceSets.main.resources
|
|
//}
|
|
//
|
|
//publishing {
|
|
// publications {
|
|
// mavenJava(MavenPublication) {
|
|
// artifactId base.archivesName.get()
|
|
// from components.java
|
|
// }
|
|
// }
|
|
// repositories {
|
|
// maven {
|
|
// url "file://" + System.getenv("local_maven")
|
|
// }
|
|
// }
|
|
//} |