SpineEventEngine / config

Dependencies and build configurations shared among subprojects
https://spine.io
Apache License 2.0
2 stars 3 forks source link

Extend IDEA config to handle annotation processors #75

Open alexander-yevsyukov opened 5 years ago

alexander-yevsyukov commented 5 years ago

As the author of the apt plugin suggests:

// Workaround for https://youtrack.jetbrains.com/issue/IDEA-182577
idea {
  module {
    sourceDirs += compileJava.options.annotationProcessorGeneratedSourcesDirectory
    generatedSourceDirs += compileJava.options.annotationProcessorGeneratedSourcesDirectory
    testSourceDirs += compileTestJava.options.annotationProcessorGeneratedSourcesDirectory
    generatedSourceDirs += compileTestJava.options.annotationProcessorGeneratedSourcesDirectory
  }
}

Also this:

// Workaround for https://youtrack.jetbrains.com/issue/IDEA-187868
idea {
  module {
    scopes.PROVIDED.plus += configurations.annotationProcessor
    scopes.TEST.plus += configurations.testAnnotationProcessor
  }
}

See the plugin repo README for details.

alexander-yevsyukov commented 5 years ago

@yuri-sergiichuk, did you try this workaround?

yuri-sergiichuk commented 5 years ago

Nope, but looks like it is working for me now without any additional configurations. I've just enabled annotation processors and that's it.