Unsupported major.minor version 51.0
sameersegal opened this issue · 4 comments
sameersegal commented
Hi, I am able to get the JS plugin to work but as soon as I add dependencies classpath and apply plugin: "css"
I get the following crash log - I am running java 1.6:
$ gradle -b artoo/build.gradle --stacktrace
FAILURE: Build failed with an exception.
* Where:
Build file '/var/lib/jenkins/jobs/DummyJob/workspace/artoo/build.gradle' line: 13
* What went wrong:
A problem occurred evaluating root project 'artoo'.
> com/eriwen/gradle/css/source/internal/InternalGradle : Unsupported major.minor version 51.0
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'artoo'.
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:54)
at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:127)
at org.gradle.configuration.BuildScriptProcessor.evaluate(BuildScriptProcessor.java:38)
at org.gradle.configuration.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:43)
at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:463)
at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:75)
at org.gradle.configuration.ProjectEvaluationConfigurer.execute(ProjectEvaluationConfigurer.java:23)
at org.gradle.configuration.ProjectEvaluationConfigurer.execute(ProjectEvaluationConfigurer.java:21)
at org.gradle.configuration.DefaultBuildConfigurer$1.execute(DefaultBuildConfigurer.java:38)
at org.gradle.configuration.DefaultBuildConfigurer$1.execute(DefaultBuildConfigurer.java:35)
at org.gradle.api.internal.project.AbstractProject.configure(AbstractProject.java:439)
at org.gradle.api.internal.project.AbstractProject.allprojects(AbstractProject.java:434)
at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:35)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:139)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:110)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:78)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:38)
at org.gradle.launcher.exec.InProcessGradleLauncherActionExecuter.execute(InProcessGradleLauncherActionExecuter.java:39)
at org.gradle.launcher.exec.InProcessGradleLauncherActionExecuter.execute(InProcessGradleLauncherActionExecuter.java:25)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
at org.gradle.launcher.cli.ActionAdapter.execute(ActionAdapter.java:30)
at org.gradle.launcher.cli.ActionAdapter.execute(ActionAdapter.java:22)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:200)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:173)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:138)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
at org.gradle.launcher.Main.doAction(Main.java:48)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at org.gradle.launcher.Main.main(Main.java:39)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
at org.gradle.launcher.GradleMain.main(GradleMain.java:26)
Caused by: java.lang.UnsupportedClassVersionError: com/eriwen/gradle/css/source/internal/InternalGradle : Unsupported major.minor version 51.0
at com.eriwen.gradle.css.CssExtension.class$(CssExtension.groovy)
at com.eriwen.gradle.css.CssExtension.$get$$class$com$eriwen$gradle$css$source$internal$InternalGradle(CssExtension.groovy)
at com.eriwen.gradle.css.CssExtension.<init>(CssExtension.groovy:16)
at com.eriwen.gradle.css.CssExtension_Decorated.<init>(Unknown Source)
at org.gradle.internal.reflect.DirectInstantiator.newInstance(DirectInstantiator.java:41)
at org.gradle.api.internal.ClassGeneratorBackedInstantiator.newInstance(ClassGeneratorBackedInstantiator.java:36)
at org.gradle.api.internal.plugins.DefaultConvention.create(DefaultConvention.java:114)
at com.eriwen.gradle.css.CssPlugin.apply(CssPlugin.groovy:25)
at com.eriwen.gradle.css.CssPlugin.apply(CssPlugin.groovy)
at org.gradle.api.internal.plugins.DefaultProjectsPluginContainer.providePlugin(DefaultProjectsPluginContainer.java:107)
at org.gradle.api.internal.plugins.DefaultProjectsPluginContainer.addPluginInternal(DefaultProjectsPluginContainer.java:71)
at org.gradle.api.internal.plugins.DefaultProjectsPluginContainer.apply(DefaultProjectsPluginContainer.java:37)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.applyPlugin(DefaultObjectConfigurationAction.java:101)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.access$200(DefaultObjectConfigurationAction.java:32)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction$3.run(DefaultObjectConfigurationAction.java:72)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.execute(DefaultObjectConfigurationAction.java:114)
at org.gradle.api.internal.project.AbstractProject.apply(AbstractProject.java:841)
at org.gradle.api.Project$apply.call(Unknown Source)
at org.gradle.api.internal.project.ProjectScript.apply(ProjectScript.groovy:34)
at org.gradle.api.Script$apply.callCurrent(Unknown Source)
at build_3j352d9v31ib768u4coplb6iju.run(/var/lib/jenkins/jobs/DummyJob/workspace/artoo/build.gradle:13)
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:52)
... 33 more
BUILD FAILED
Total time: 7.198 secs
My build.gradle file:
// Pull the plugin from a Maven Repo
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.eriwen:gradle-js-plugin:1.1'
classpath 'com.eriwen:gradle-css-plugin:1.1.1'
}
}
// Invoke the plugin
apply plugin: 'js'
apply plugin: 'css'
def jsSrcDir = 'public/javascripts'
combineJs {
source = fileTree(dir: jsSrcDir)
dest = file("$buildDir/all.js")
}
minifyJs {
source = combineJs
dest = file("$buildDir/all-min.js")
closure {
warningLevel = "QUIET"
}
}
gzipJs {
source = minifyJs
dest = file("$buildDir/website-all-min.js")
}
I am pretty sure it is very simple and I am missing something fairly basic.
Thanks for your help!
eriwen commented
@sameersegal The plugin was built with Java 7. I'll get out a new release tomorrow-ish that I'll build with Java 6.
sameersegal commented
@eriwen Thanks will really appreciate it. This thing has held me up.
eriwen commented
@sameersegal Please update to version 1.1.2 for Java 6 support
sameersegal commented
Thanks @eriwen for your help and the quick turn around! Really appreciate it