diff --git a/src/main/groovy/org/spongepowered/gradle/plugin/SpongePluginBasePlugin.groovy b/src/main/groovy/org/spongepowered/gradle/plugin/SpongePluginBasePlugin.groovy index 0a283a6..efd5012 100644 --- a/src/main/groovy/org/spongepowered/gradle/plugin/SpongePluginBasePlugin.groovy +++ b/src/main/groovy/org/spongepowered/gradle/plugin/SpongePluginBasePlugin.groovy @@ -69,6 +69,10 @@ class SpongePluginBasePlugin implements Plugin { // Set up final generated metadata file args << '-AmetadataOutputFile=' + generatedPath } + + // Add dependency on compileJava so we can generate the metadata using the annotation processor first + // See https://github.com/SpongePowered/SpongeGradle/issues/7 + tasks.processResources.dependsOn tasks.compileJava } }