Skip to content

Instantly share code, notes, and snippets.

@m-x-k
Created December 22, 2016 08:31
Show Gist options
  • Save m-x-k/0620b92f216d88b917c4afd12b271521 to your computer and use it in GitHub Desktop.
Save m-x-k/0620b92f216d88b917c4afd12b271521 to your computer and use it in GitHub Desktop.
gradle register java custom annotations with intellij
apply plugin: 'groovy'
apply plugin: 'idea'
repositories {
jcenter()
}
idea {
project {
ipr {
withXml { provider ->
def projectXml = provider.asNode()
def compilerConfiguration = projectXml.component.find { component ->
component.'@name' == 'CompilerConfiguration'
}
def currentAnnotationProcessing = compilerConfiguration.annotationProcessing
currentAnnotationProcessing.replaceNode {
annotationProcessing {
profile(name: 'Default', default: true, enabled: true) {
processorPath(useClasspath: true)
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment