Skip to content

Commit f9d2b19

Browse files
committed
Set Lombok Plugin version based on IDEA version and make configurable
1 parent be2c5d9 commit f9d2b19

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

build.gradle

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@ repositories {
2828
mavenCentral()
2929
}
3030

31+
def lombokPlugin = System.getenv().getOrDefault('LOMBOK_PLUGIN_VERSION', 'lombok')
32+
switch (System.getenv().getOrDefault('IDEA_VERSION', ideaVersion)) {
33+
case ~/2020\.1.*/:
34+
lombokPlugin = 'Lombook Plugin:0.34-2020.1'
35+
break
36+
case ~/2020\.2.*/:
37+
lombokPlugin = 'Lombook Plugin:0.34-2020.2'
38+
break
39+
}
40+
3141
intellij {
3242
version = System.getenv().getOrDefault('IDEA_VERSION', ideaVersion)
3343
type = ideaType
@@ -37,7 +47,7 @@ intellij {
3747
pluginName = 'MapStruct-Intellij-Plugin'
3848
// The properties plugin is needed because Kotlin uses it
3949
// and for some reason plugins does not transitively pull itx
40-
plugins = ['java', 'Kotlin', 'properties', 'Lombook Plugin:0.34-2020.1']
50+
plugins = ['java', 'Kotlin', 'properties', lombokPlugin]
4151
}
4252

4353
compileKotlin {

0 commit comments

Comments
 (0)