> On Aug. 2, 2017, 4:10 p.m., Eyal Allweil wrote: > > Hi Piyush - sorry it took so long for me to get to this. I don't actually > > know much about gradle, but when I try to build with this patch, I get the > > following exception: > > > > eyal@eyal-Precision:~/git/incubator-datafu$ ./gradlew clean assemble > > To honour the JVM settings for this build a new JVM will be forked. Please > > consider using the daemon: > > http://gradle.org/docs/2.4/userguide/gradle_daemon.html. > > Failed to notify ProjectEvaluationListener.afterEvaluate(), but primary > > configuration failure takes precedence. > > org.gradle.internal.event.ListenerNotificationException: Failed to notify > > project evaluation listener. > > at > > org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:98) > > at > > org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:31) > > > > .... > > > > FAILURE: Build failed with an exception. > > > > * Where: > > Build file '/home/work/git/incubator-datafu/build-plugin/build.gradle' > > line: 20 > > > > * What went wrong: > > A problem occurred evaluating project ':build-plugin'. > > > Failed to apply plugin [id 'org.gradle.java'] > > > Cannot add Mutate rule > > 'org.gradle.language.base.plugins.LanguageBasePlugin$Rules#attachBinariesToAssembleLifecycle(org.gradle.api.Task, > > org.gradle.platform.base.BinaryContainer)' for model element > > 'tasks.assemble' when element is in state GraphClosed. > > > > * Try: > > Run with --stacktrace option to get the stack trace. Run with --info or > > --debug option to get more log output. > > > > BUILD FAILED > > > > Total time: 7.574 secs > > Matthew Hayes wrote: > I get the same error as you Eyal when using ./gradlew. It appears this > is a [Gradle > bug](https://discuss.gradle.org/t/illegalstateexception-cannot-add-mutate-rule/10541/5). > I tested the workaround described there and it works: > > ``` > project.tasks.matching { it.name == 'assemble' }.all { dependsOn ':rat' } > ``` > > The diff works as is with newer versions of Gradle. We should actually > upgrade, since we're way behind. I'll file a JIRA for that.
The Gradle upgrade indeed solves this problem. - Eyal ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/57223/#review181977 ----------------------------------------------------------- On March 2, 2017, 1:25 a.m., Piyush Sharma wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/57223/ > ----------------------------------------------------------- > > (Updated March 2, 2017, 1:25 a.m.) > > > Review request for DataFu. > > > Repository: datafu > > > Description > ------- > > Automatically run rat task when running assemble. The rat task checks that > our files have the right headers. We don't automatically run it for assemble > so it isn't easy for new contributors to catch issues. JIRA: > https://issues.apache.org/jira/browse/DATAFU-118 > > > Diffs > ----- > > build.gradle fc2ec6c > > > Diff: https://reviews.apache.org/r/57223/diff/1/ > > > Testing > ------- > > > Thanks, > > Piyush Sharma > >