April 4, 20169 yr 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.
April 5, 20169 yr 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")) } }
April 5, 20169 yr Author That doesn't work either... Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.
April 6, 20169 yr Author Bump Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.
April 6, 20169 yr 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?
April 6, 20169 yr 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.
April 7, 20169 yr 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.
April 8, 20169 yr 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.
April 9, 20169 yr 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.