plugins { id 'eclipse' id 'maven-publish' id 'net.neoforged.gradle' version '[6.0.18,6.2)' id 'org.spongepowered.mixin' version '0.7.+' id 'org.parchmentmc.librarian.forgegradle' version '1.+' } version = mod_version group = maven_group // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = archives_base_name java.toolchain.languageVersion = JavaLanguageVersion.of(17) println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch')) minecraft { mappings channel: 'parchment', version: '2023.06.26-1.20.1' accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') copyIdeResources = true runs { client { properties 'mixin.env.remapRefMap': 'true' property 'mixin.env.refMapRemappingFile', "${project.projectDir}/build/createSrgToMcp/output.srg" workingDirectory project.file('run') arg "-mixin.config=webdisplays.mixins.json" property 'forge.logging.console.level', 'debug' mods { webdisplays { source sourceSets.main } } } server { properties 'mixin.env.remapRefMap': 'true' property 'mixin.env.refMapRemappingFile', "${project.projectDir}/build/createSrgToMcp/output.srg" workingDirectory project.file('run') arg "-mixin.config=webdisplays.mixins.json" property 'forge.logging.console.level', 'debug' mods { webdisplays { source sourceSets.main } } } data { workingDirectory project.file('run') properties 'mixin.env.remapRefMap': 'true' property 'mixin.env.refMapRemappingFile', "${project.projectDir}/build/createSrgToMcp/output.srg" property 'forge.logging.console.level', 'debug' args '--mod', 'webdisplays', '--all', '--output', file('src/generated/resources/'), '--existing', sourceSets.main.resources.srcDirs[0] mods { webdisplays { source sourceSets.main } } } } } repositories{ maven { url "https://maven.shedaniel.me/" } maven { url 'https://jitpack.io' } maven { name = "cursemaven" url = "https://www.cursemaven.com" } flatDir { dirs 'libs' } maven { url 'https://mcef-download.cinemamod.com/repository/releases' } maven { url = uri('https://mcef-download.cinemamod.com/repositories/releases') } } dependencies { minecraft 'net.neoforged:forge:1.20.1-47.1.65' annotationProcessor 'org.spongepowered:mixin:0.8.5:processor' // implementation fg.deobf("curse.maven:spark-361579:4381167") compileOnly fg.deobf("curse.maven:vivecraft-667903:4794431") implementation fg.deobf("com.cinemamod:mcef-forge:2.0.1-1.20.1") { transitive = false } } sourceSets { main.resources.srcDirs += 'src/generated/resources' } // Example for how to get properties into the manifest for reading by the runtime.. jar { manifest { attributes([ "Specification-Title": "webdisplays", "Specification-Vendor": "webdisplays", "Specification-Version": "1", // We are version 1 of ourselves "Implementation-Title": project.name, "Implementation-Version": "${version}", "Implementation-Vendor" :"webdisplays", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"), "MixinConfigs": "webdisplays.mixins.json" ]) } } // Example configuration to allow publishing using the maven-publish task // we define a custom artifact that is sourced from the reobfJar output task // and then declare that to be published // Note you'll need to add a repository here def reobfFile = file("$buildDir/reobfJar/output.jar") def reobfArtifact = artifacts.add('default', reobfFile) { type 'jar' builtBy 'reobfJar' } publishing { publications { mavenJava(MavenPublication) { artifact reobfArtifact } } repositories { maven { url "file:///${project.projectDir}/mcmodsrepo" } } } apply plugin: 'org.spongepowered.mixin' mixin { add sourceSets.main, "webdisplays.refmap.json" }