Intellij configuration when using java-gradle-plugin

Answered

The java-gradle-plugin is an incubating plugin from Gradle used "to assist in the development of Gradle plugins. It automatically applies the Java plugin, adds the gradleApi() dependency to the compile configuration and performs validation of plugin metadata during jar task execution."

The configuration of the script is fairly simple

plugins {
    id 'java-gradle-plugin'
}

However, IntelliJ does not seem to recognize this as a Java / Groovy project (only Java) and when the project is synchronized a developer must redefine the src/main/groovy and src/test/groovy directories as source and test folders.  What mechanism, such as the IDEA gradle plugin, can be used to configure these directories appropriately?

Thanks,
Brian

0
2 comments

Did you try with the following?

apply plugin: 'groovy'
0
Avatar
Permanently deleted user

Thanks Serge!  I read a little more on the plugin as the name applies it only applies Java, not Groovy.  Once I applied the plugin Intellij was able to configure the project correctly.

0

Please sign in to leave a comment.