Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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)

  • 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'
    }
}

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.