Details
-
Type: Improvement
-
Status: Closed
-
Priority: Trivial
-
Resolution: Fixed
-
Affects Version/s: 2.11.0, 2.11.1
-
Component/s: Dev and Dep
-
Labels:None
Description
Our eclipse configured formatting of java code can be added as a gradle task using the gradle "spotless" plugin.
Since our formatting configuration for eclipse is already separated out into
.settings/org.eclipse.jdt.core.jalview.prefs
(so it can always be merged into a freshly made settings file by the gradle eclipse plugin) this formatting can be configured in build.gradle very straightforwardly:
plugin {
id 'com.diffplug.gradle.spotless' version '3.24.2'
}
spotless {
java {
eclipse("4.12.0").configFile eclipse_extra_jdt_prefs_file
}
}
// ("4.12.0" refers to the version number for Eclipse 2019-06)
Since our formatting configuration for eclipse is already separated out into
.settings/org.eclipse.jdt.core.jalview.prefs
(so it can always be merged into a freshly made settings file by the gradle eclipse plugin) this formatting can be configured in build.gradle very straightforwardly:
plugin {
id 'com.diffplug.gradle.spotless' version '3.24.2'
}
spotless {
java {
eclipse("4.12.0").configFile eclipse_extra_jdt_prefs_file
}
}
// ("4.12.0" refers to the version number for Eclipse 2019-06)