Created
December 22, 2016 08:31
-
-
Save m-x-k/0620b92f216d88b917c4afd12b271521 to your computer and use it in GitHub Desktop.
gradle register java custom annotations with intellij
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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