[GRADLE-3185] gradle-2.2-rc-1 regression: OneJar plugin fails with NullPointerException Created: 22/Oct/14  Updated: 26/Oct/14  Resolved: 23/Oct/14

Status: Resolved
Project: Gradle
Affects Version/s: 2.2-rc-1
Fix Version/s: 2.2-rc-2

Type: Bug
Reporter: Gradle Forums Assignee: Unassigned
Resolution: Fixed Votes: 1


 Description   

Using gradle-2.2-rc-1, using the OneJar plugin fails with an error:

FAILURE: Build failed with an exception.

  • Where:
    Build file 'C:\data\gradle\gradle-22-onejar\build.gradle' line: 13
  • What went wrong:
    A problem occurred evaluating root project 'gradle-22-onejar'.
    > Could not create task of type 'OneJar'.

Excerpts from stack trace:

  • Exception is:
    org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'gradle-22-onejar'.
    at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:54)
    Caused by: org.gradle.api.tasks.TaskInstantiationException: Could not create task of type 'OneJar'.
    at org.gradle.api.internal.project.taskfactory.TaskFactory$1.call(TaskFactory.java:126)
    Caused by: java.lang.NullPointerException
    at org.gradle.api.internal.BeanDynamicObject$MetaClassAdapter.hasProperty(BeanDynamicObject.java:135)
    at org.gradle.api.internal.BeanDynamicObject.hasProperty(BeanDynamicObject.java:102)
    at org.gradle.api.internal.CompositeDynamicObject.getProperty(CompositeDynamicObject.java:77)
    at com.github.rholder.gradle.task.OneJar_Decorated.getProperty(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:47)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:231)
    at com.github.rholder.gradle.task.OneJar.<init>(OneJar.groovy:48)
    at com.github.rholder.gradle.task.OneJar_Decorated.<init>(Unknown Source)


 Comments   
Comment by Gradle Forums [ 22/Oct/14 ]

Hey,

many thanks for reporting this issue. It seems gradle 2.2-rc-1 accidently introduced a binary incompatibility to gradle plugins created with former gradle versions.

Comment by Gradle Forums [ 22/Oct/14 ]

Good to know – then we just wait for rc-2

Generated at Wed Jun 30 12:42:13 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.