Posted August 27, 201411 yr I have a libs folder in my project root with the Blood Magic API inside (Blood Magic API - v1.1.0 (1.7.10).zip). My build.gradle file is as follows: 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: 'scala' apply plugin: 'forge' version = "0.1" group= "com.perry.automation" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "automation" minecraft { version = "1.7.10-10.13.0.1205" assetDir = "eclipse/assets" } dependencies { compile 'com.google.code.findbugs:jsr305:1.3.9' compile group: 'com.google.guava', name: 'guava', version: '12.0' compile fileTree(dir: 'libs', include: '*.zip') compile fileTree(dir: 'libs', include: '*.jar') } 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' } } However in intelliJ I cannot import any of the classes from the API. Further I used to be able to expand the API in the libs folder and see the classes inside it, now I just get a yellow highlight over the zip and cannot expand it from intelliJ. (See http://i.imgur.com/QVTP0mh.png) Any ideas?
August 28, 201411 yr Okay so I just started using Intellij today as well (making the switch from Eclipse because, why the hell not?) and I had almost the same problem. This is what I did to solve it: File -> Project Structure -> Modules -> Dependencies (add) Jars or Directories Anyway, now the jars I add there are included as libraries for my project. This is of course, assuming this is actually what you want to do. The other alternative if you have API class files is just to create a directory under src called "api/java" and set it as a source directory in Project Structure. It should not get compiled out to your eventual mod.
August 28, 201411 yr Author Just checked the dependencies bit in intelliJ, the Blood Magic API is already listed in there but still not way of importing or viewing any of the files. Bet I've done something dumb and it'll take me days to figure out.
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.