Posted March 11, 201411 yr Hi! After following LexManos's (LexManos' ?) tutorial on setting up the workspace with multiple mods, (which I have successfully done, thank you Lex!) I am wondering how to add it so that all my mods except 1 of them is dependent on that one. This is meant to be so that I can modify my core mod and then its code is directly usable from each of my other mods. Here is what the setup looks like, and two sample build.gradle files. Hope someone can help me out on this! (Note, all the errors are because the sub mods cannot find the core mod) Setup image: Core build.gradle: 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.1-SNAPSHOT' } } apply plugin: 'forge' version = "1.7.2-2.0.0" group= "com.countrygamer.core" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "Core" minecraft { version = "1.7.2-10.12.0.1034" assetDir = "eclipse/assets" if (file('../run').exists()) { assetDir = "../run/assets" } else { assetDir = "assets" } } processResources { // 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' } } SubMod build.gradle: 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.1-SNAPSHOT' } } apply plugin: 'forge' version = "1.7.2-2.0.0" group= "com.countrygamer.weepingangels" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "Angel" minecraft { version = "1.7.2-10.12.0.1034" assetDir = "eclipse/assets" if (file('../run').exists()) { assetDir = "../run/assets" } else { assetDir = "assets" } } processResources { // 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' } }
March 11, 201411 yr Author The folder layout is like so: /Workspace/ /Workspace/Core/src/main/java/ /Workspace/Angel/src/main/java/ /Workspace/CAPO/src/main/java/ /Workspace/PvZ/src/main/java/ I added a file named "settings.gradle" to /Workspace/Core/ with text: includeFlat ‘Angel’,’CAPO’, ‘PvZ’ I then ran the "bash gradlew setupDevWorkspace --refresh-dependencies" and "bash eclipse --refresh-dependencies" on each mod directory (Core, Angel, CAPO, PvZ). Opened the workspace in eclipse (path /Workspace/) and it still does not work. EDIT: I have also tried putting a "settings.gradle" into the Angel CAPO and PvZ directories, including the Core project. This injects the data, but does not allow for a successful workspace run nor build
March 13, 201411 yr After putting one settings.gradle in your "core", edit your run configurations to load that "core" mod. All other mods should load as dependent.
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.