Posted August 6, 201411 yr Heyho Guys! I have seven Mods compiled and ready to download but now I recognised, that gradle copied the .java files into the jar. I don't want this to happen because it takes much memory space. I think the problem is my build.gradle file where I entered buildscript { repositories { mavenCentral() maven { name = "forge" url = "http://files.minecraftforge.net/maven" } maven { name = "sonatype" url = "https://oss.sonatype.org/content/repositories/snapshots/" } } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' } } apply plugin: 'forge' version = "x.x.x-mcx.x.x" group= "com.bedrockminer.modid" archivesBaseName = "Modname" sourceSets { main { java { srcDirs = ["$projectDir/src"] } resources { srcDirs = ["$projectDir/src"] } //Same directory as java! } } minecraft { version = "1.7.2-10.12.1.1060" assetDir = "eclipse/assets" } processResources { // this will ensure that this task is redone when the versions change. inputs.property "version", project.version inputs.property "mcversion", project.minecraft.version // replace stuff in mcmod.info, nothing else from(sourceSets.main.resources.srcDirs) { include 'mcmod.info' // replace version and mcversion expand 'version':project.version, 'mcversion':project.minecraft.version } // copy everything else, thats not the mcmod.info from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info' } } If I change the asset path to $projectDir/src/assets the assets are directly copied into the jar without the assets folder. What can I do to exclude the .java files from the mod but copy the assets correctly? http://i.imgur.com/wNvtGZw.png[/img] MODS and MODDING TUTORIALS
August 7, 201411 yr Use the standard setup -.- ALL resources are copied into the resulting jar -.- So if you tell it your source files are resources it'll copy them. Separate your resources from your code, as we have in the example mod. I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.