TrigonicSolutions / gradle-rpm-plugin

Gradle plugin for constructing RPM packages.
Apache License 2.0
38 stars 19 forks source link

Directive cannot be cast to java.lang.Number #10

Closed AlanKrueger closed 12 years ago

AlanKrueger commented 12 years ago

Received the following failure in a Gradle build using 0.9 of the Gradle RPM Plugin with Gradle 1.0-milestone-6:

FAILURE: Build failed with an exception.

* Where:
Build file '[...]/build.gradle' line: [...]

* What went wrong:
A problem occurred evaluating project ':[...]'.
Cause: org.freecompany.redline.payload.Directive cannot be cast to java.lang.Number

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Something changed between 1.0-milestone-3 and 1.0-milestone-6 that highlighted this. The plugin tries to follow the Redline naming conventions where possible, but Redline's Directive enum cannot reliably use "directive" as a property on a Gradle CopySpec since "directive" is a property on Groovy's Closure class.

AlanKrueger commented 12 years ago

Changed "directive" to "fileType" in version 1.0 of the plugin. Can't reliably keep backwards compatibility, so this may unfortunately require Gradle scripts using version 0.9 and earlier of the plugin to change before they'll work with 1.0.