eriwen / gradle-js-plugin

Gradle plugin for working with JS
http://eriwen.github.io/gradle-js-plugin
Apache License 2.0
382 stars 113 forks source link

Broken javascript.source block with gradle 2.14. #131

Closed levsa closed 8 years ago

levsa commented 8 years ago

I have a script that contains:

28: javascript.source {
29:    dev {
30:        js {
31:           srcDir "src/main/java"
32:            srcDir "src/main/resources"

When building with Gradle 2.14 and gradle-js-plugin 2.12.0 I get the following error:

* Where:
Script '.../jshint.gradle' line: 29

* What went wrong:
A problem occurred evaluating script.
> No signature of method: static org.gradle.util.ConfigureUtil.configure() is applicable for argument types: (jshint_9lkt204yudbi2ggcjljmyl3o2$_run_closure2$_closure4, com.eriwen.gradle.js.source.internal.DefaultJavaScriptSourceSet_Decorated, java.lang.Boolean) values: [jshint_9lkt204yudbi2ggcjljmyl3o2$_run_closure2$_closure4@2bf81ce6, ...]
  Possible solutions: configure(groovy.lang.Closure, java.lang.Object)

Stacktrace:

Caused by: groovy.lang.MissingMethodException: No signature of method: static org.gradle.util.ConfigureUtil.configure() is applicable for argument types: (jshint_9lkt204yudbi2ggcjljmyl3o2$_run_closure2$_closure4, com.eriwen.gradle.js.source.internal.DefaultJavaScriptSourceSet_Decorated, java.lang.Boolean) values: [jshint_9lkt204yudbi2ggcjljmyl3o2$_run_closure2$_closure4@2bf81ce6, ...]
Possible solutions: configure(groovy.lang.Closure, java.lang.Object)
        at com.eriwen.gradle.js.source.internal.DefaultJavaScriptSourceSet.configure(DefaultJavaScriptSourceSet.groovy:52)
        at com.eriwen.gradle.js.source.internal.DefaultJavaScriptSourceSet.configure(DefaultJavaScriptSourceSet.groovy)
        at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:59)
        at org.gradle.api.internal.AbstractNamedDomainObjectContainer.create(AbstractNamedDomainObjectContainer.java:60)
        at org.gradle.api.internal.AbstractNamedDomainObjectContainer.create(AbstractNamedDomainObjectContainer.java:53)
        at org.gradle.api.internal.NamedDomainObjectContainerConfigureDelegate._configure(NamedDomainObjectContainerConfigureDelegate.java:40)
        at org.gradle.internal.metaobject.ConfigureDelegate.invokeMethod(ConfigureDelegate.java:68)
        at jshint_9lkt204yudbi2ggcjljmyl3o2$_run_closure2.doCall(/Users/levsa/src/iipax-one/gradle/jshint.gradle:29)
        at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:67)
        at org.gradle.util.ConfigureUtil.configureSelf(ConfigureUtil.java:149)
        at org.gradle.api.internal.AbstractNamedDomainObjectContainer.configure(AbstractNamedDomainObjectContainer.java:70)
        at org.gradle.api.internal.AbstractNamedDomainObjectContainer.configure(AbstractNamedDomainObjectContainer.java:25)
        at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:104)
        at org.gradle.util.ConfigureUtil$configure.call(Unknown Source)
        at com.eriwen.gradle.js.JavaScriptExtension.source(JavaScriptExtension.groovy:20)
        at com.eriwen.gradle.js.JavaScriptExtension$source.call(Unknown Source)
        at jshint_9lkt204yudbi2ggcjljmyl3o2.run(/Users/levsa/src/iipax-one/gradle/jshint.gradle:28)
        at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:91)
        ... 85 more
hth commented 8 years ago

👍 And cannot find com.eriwen:gradle-css-plugin:2.14.1. https://github.com/eriwen/gradle-js-plugin/blob/master/plugin.gradle

eriwen commented 8 years ago

Apologies for not promoting this enough, gradle-js v2.14.1 fixes compatibility with Gradle 2.14.

@hth I think you want gradle-css v2.14.0. Sorry, I recognize these versions aren't totally consistent.

hth commented 8 years ago

@eriwen Cool. Its working. Can be marked as closed. Tested with Gradle 2.14