Skip to content

Commit

Permalink
build.gradle: fix checkstyle plugin failure
Browse files Browse the repository at this point in the history
The `checkstyle` plugin of Gradle fails in JDK11 and gives the error
below:

    Unable to create Root Module: config ...

The main reason is that, in JDK11, the `user.dir` cannot be reset by
Gradle [1]. So, checkstyle plugin is unable to locate the suppressions
file correctly.

Let's add `config_loc` variable suggested by Gradle to solve the
problem [1].

[1] gradle/gradle#8286
  • Loading branch information
fzdy1914 committed Apr 30, 2019
1 parent 12ab4e0 commit fde08f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</module>

<module name="SuppressionFilter">
<property name="file" value="config/checkstyle/suppressions.xml"/>
<property name="file" value="${config_loc}/suppressions.xml"/>
</module>


Expand Down

0 comments on commit fde08f0

Please sign in to comment.