RobertFischer/Gradle-Compiler-Plugins — Issue #1: Gradle 1.0M5: cannot use plugin
Author: wastl
Created: 2011-11-09 13:06:57+00:00
State: open

When I am using the latest Gralde 1.0 M5, I get the following error when using the JavaCC Plugin:

...
Caused by: java.lang.UnsupportedOperationException: Main Java source does not allow modification.
at org.gradle.api.internal.file.AbstractFileCollection.add(AbstractFileCollection.java:95)
at org.gradle.api.file.FileCollection$add.call(Unknown Source)
at com.smokejumperit.gradle.compilers.CompilerPlugin.configureSourceSetDefaults(CompilerPlugin.groovy:101)
at com.smokejumperit.gradle.compilers.CompilerPlugin$_configureSourceSetsDefaults_closure1.doCall(CompilerPlugin.groovy:89)
...

Apparently Gradle has changed the API and forbids now changing of the java source files. Or am I doing something wrong? Here is my configuration (using our own Maven nexus for proxying repository requests):

apply plugin:com.smokejumperit.gradle.compiler.JavaccPlugin
apply plugin:com.smokejumperit.gradle.compiler.JJTreePlugin

buildscript {
repositories {
maven {
url "http://devel.kiwi-project.eu:8080/nexus/content/groups/public/"
}
}
dependencies {
classpath "com.google.guava:guava:10.0.1"
classpath 'com.smokejumperit.gradle.compiler:javacc:0.0.3'
}
}