Posted December 15, 201311 yr Hey I'm working on an Mod that depends on an jar i can compile it succesfully in intellij but how do i need to change the gradle.build for this to work? i tried it with compile files("FilePath") but the respond i get is > No signature of method: org.gradle.api.internal.artifacts.dsl.dependencies.Def aultDependencyHandler.compile() is applicable for argument types: (org.gradle.ap i.internal.file.collections.DefaultConfigurableFileCollection) values: [file col lection] Possible solutions: module(java.lang.Object)
December 16, 201311 yr 1) http://www.gradle.org/docs/current/userguide/dependency_management.html#sub:file_dependencies 2) lemme see your build.gradle file http://i56.tinypic.com/ruu0ao.png[/img] ^^ url to be changed.
December 16, 201311 yr Author build.gradle buildscript { repositories { mavenCentral() maven { name = "forge" url = "http://files.minecraftforge.net/maven" } } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:1.0-SNAPSHOT' runtime files('Libaries/WolframAlpha-1.1.jar') } } apply plugin: 'forge' version = "1.0" group= "co.uk.sfgaming.SimpleCommands" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "Simple Commands" minecraft { version = "1.6.4-9.11.1.964" } 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' } }
December 16, 201311 yr I've also ran into the same issue, changing runtime/compile to classpath makes the script valid, but does NOT work as the compiler fails on symbols from those jars. Link to build script (post editor doesn't seem to work in chromium) https://gist.github.com/tehbeard/a909499f99dbb77c6e7a Edit: fixed it with a little help from irc, main points are: Have to declare them in the project dependencies (toplevel dependencies{} object, not the one in buildscript) Have to declare it after? the apply plugin forge. Link to my fixed build.gradle, lines 19-21 are how to declare adding all jars under the deps folder as needed for compiling. https://gist.github.com/tehbeard/0b11df8c8f8f6b7ffb24
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.