ngbinh / gradle-scalastyle-plugin

Gradle plugin for scalastyle
18 stars 16 forks source link

sample hello world #14

Closed kknd2222 closed 8 years ago

kknd2222 commented 9 years ago

I tried it with hello world (scala 2.11.7, jdk 1.8.45, gradle 2.7, gradle-scalastyle-plugin_2.11:0.8.0) and was unable to run 'gradle scalaStyle' output is: gradle clean scalaStyle :clean UP-TO-DATE :scalaStyle FAILED FAILURE: Build failed with an exception.

Can someone upload a helloworld that works? From the stack trace it looks like it has trouble to read the xml (I used the extracted the default_config.xml from scalastyle_2.11-0.7.0.jar) Thanks -cl

--stacktrace shows: Caused by: java.lang.Exception: Scala check error at org.github.ngbinh.scalastyle.ScalaStyleTask.scalaStyle(ScalaStyleTask.groovy:93) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75) ... 64 more Caused by: java.lang.NullPointerException at scala.xml.Source$.fromFile(XML.scala:22)

update: tried older version - gradle-scalastyle-plugin_2.11-0.7.2.jar and it worked however I need org.scalastyle:scalastyle_2.11:0.7.0 which is only supported by gradle-scalastyle-plugin_2.11:0.8.0

can someone help?

rwygand commented 8 years ago

I have the same problem. 0.8.0 raises an exception parsing the scalastyle xml config which was generated by the sbt scalastyle plugin. Downgrading to the 0.7.2 gradle plugin version works.

ngbinh commented 8 years ago

thanks for the report. Will look at it this week

ngbinh commented 8 years ago

Fixed in https://github.com/ngbinh/gradle-scalastyle-plugin/commit/edafbdcf967b5312bf9609f846755e297260012d and publish 0.8.1. Please report any issue you have. Thanks