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

  • Author

Ok I've done some more testing and tweaking, but still no luck.

 

I found that the error is that shadowJar can't find Gradle's JavaPlugin class.

 

 

* Exception is:
java.lang.NoClassDefFoundError: org.gradle.api.plugins.JavaPlugin
at com.github.jengelman.gradle.plugins.shadow.ShadowPlugin.class$(ShadowPlugin.groovy)

 

 

Here is my build.gradle, what am I doing wrong?

 

 

buildscript {
    repositories {
        jcenter()
        maven {
            name = "forge"
            url = "http://files.minecraftforge.net/maven"
        }
        maven {
            name = "sonatype"
            url = "https://oss.sonatype.org/content/repositories/snapshots/"
        }
    }
    dependencies {
    }
}

plugins{
    id 'java'
    id "com.github.johnrengelman.shadow" version "1.2.2"
}

apply plugin: 'forge'

version = "1.0"
group= "com.apmods.hpspells" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "hpspells"

minecraft {
    version = "1.7.10-10.13.4.1614-1.7.10"
    runDir = "eclipse"
}

processResources
{
    inputs.property "version", project.version
    inputs.property "mcversion", project.minecraft.version

    from(sourceSets.main.resources.srcDirs) {
        include 'mcmod.info'
                
        expand 'version':project.version, 'mcversion':project.minecraft.version
    }
        
    from(sourceSets.main.resources.srcDirs) {
        exclude 'mcmod.info'
    }
}

shadowJar {
    dependencies{
        include(dependency("edu.cmu.sphinx:sphinx4-core:5prealpha-SNAPSHOT"))
        include(dependency("edu.cmu.sphinx:sphinx4-data:5prealpha-SNAPSHOT"))
    }
}


 

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

in your build.gradle you need to apply the plugins before you can use them.

 

. . .

apply plugin: 'forge'

apply plugin: 'java' // or 'groovy'. Must be explicitly applied

apply plugin: 'com.github.johnrengelman.shadow'

. . .

 

Ok I've done some more testing and tweaking, but still no luck.

 

I found that the error is that shadowJar can't find Gradle's JavaPlugin class.

 

 

* Exception is:
java.lang.NoClassDefFoundError: org.gradle.api.plugins.JavaPlugin
at com.github.jengelman.gradle.plugins.shadow.ShadowPlugin.class$(ShadowPlugin.groovy)

 

 

Here is my build.gradle, what am I doing wrong?

 

 

buildscript {
    repositories {
        jcenter()
        maven {
            name = "forge"
            url = "http://files.minecraftforge.net/maven"
        }
        maven {
            name = "sonatype"
            url = "https://oss.sonatype.org/content/repositories/snapshots/"
        }
    }
    dependencies {
    }
}

plugins{
    id 'java'
    id "com.github.johnrengelman.shadow" version "1.2.2"
}

apply plugin: 'forge'

version = "1.0"
group= "com.apmods.hpspells" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "hpspells"

minecraft {
    version = "1.7.10-10.13.4.1614-1.7.10"
    runDir = "eclipse"
}

processResources
{
    inputs.property "version", project.version
    inputs.property "mcversion", project.minecraft.version

    from(sourceSets.main.resources.srcDirs) {
        include 'mcmod.info'
                
        expand 'version':project.version, 'mcversion':project.minecraft.version
    }
        
    from(sourceSets.main.resources.srcDirs) {
        exclude 'mcmod.info'
    }
}

shadowJar {
    dependencies{
        include(dependency("edu.cmu.sphinx:sphinx4-core:5prealpha-SNAPSHOT"))
        include(dependency("edu.cmu.sphinx:sphinx4-data:5prealpha-SNAPSHOT"))
    }
}


 

  • Author

That doesn't work either...

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

  • Author

Bump

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

We need more error output to help you. Have you tried using my build.gradle to see how it works in a test project?

Where are your sphinx4 libraries located?

 

  • Author

The same error as before, nothing changed. No I haven't because I don't use your library, but I will try the test project.

 

My sphinx4 libraries are located in my src/main/resources folder path.

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

  • Author

Bump. I really need help with this I can't release my mod until this is solved.

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

  • Author

So I put the sphinx4 source code in my mod, but it references apache commons math. I don't want to put that in my mod because it will probably be incompatible with other mods that use commons math. How do I get around this?

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

  • Author

Bump

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

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.