From 225a4aeedada2669ac0efdda8c62b3b378431910 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Thu, 26 Oct 2023 16:27:25 +0200 Subject: [PATCH] Switch to palantir-java-format --- .vscode/settings.json | 3 +- build.gradle | 21 ++++-- config/IntelliJ Code Style.xml | 12 +-- config/checkstyle/checkstyle.xml | 67 ++++++++++++++--- config/checkstyle/checkstyle_reviewdog.xml | 69 +++++++++++++++--- ...elines-intellij-palantir-plugin-enable.png | Bin 0 -> 42808 bytes ...lines-intellij-palantir-plugin-install.png | Bin 0 -> 46697 bytes ...lines-intellij-palantir-plugin-restart.png | Bin 0 -> 54802 bytes .../intellij-13-code-style.md | 47 +++++++++--- ...ij.md => intellij-80-run-with-intellij.md} | 2 +- gradle.properties | 8 +- 11 files changed, 176 insertions(+), 53 deletions(-) create mode 100644 docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/guidelines-intellij-palantir-plugin-enable.png create mode 100644 docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/guidelines-intellij-palantir-plugin-install.png create mode 100644 docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/guidelines-intellij-palantir-plugin-restart.png rename docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/{intellij-89-run-with-intellij.md => intellij-80-run-with-intellij.md} (99%) diff --git a/.vscode/settings.json b/.vscode/settings.json index 2094775de07..97f15775553 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,5 +2,6 @@ "java.configuration.updateBuildConfiguration": "interactive", "java.format.settings.url": "/config/VSCode Code Style.xml", "java.checkstyle.configuration": "${workspaceFolder}/config/checkstyle/checkstyle_reviewdog.xml", - "java.checkstyle.version": "10.3.4" + "java.checkstyle.version": "10.3.4", + "java.completion.importOrder": ["#"] } diff --git a/build.gradle b/build.gradle index c72f3c74bd0..5edb95ce901 100644 --- a/build.gradle +++ b/build.gradle @@ -2,6 +2,16 @@ import org.gradle.internal.os.OperatingSystem import org.jabref.build.xjc.XjcPlugin import org.jabref.build.xjc.XjcTask +buildscript { + repositories { + gradlePluginPortal() + mavenCentral() + } + dependencies { + classpath('com.palantir.javaformat:gradle-palantir-java-format:2.38.0') + } +} + plugins { id 'application' @@ -22,21 +32,22 @@ plugins { id 'jacoco' id 'checkstyle' + id 'com.diffplug.spotless' version '6.22.0' + id 'org.openrewrite.rewrite' version '6.4.0' id 'project-report' id 'idea' - id 'org.openrewrite.rewrite' version '6.4.0' } -// Enable following for debugging -// gradle.startParameter.showStacktrace = org.gradle.api.logging.configuration.ShowStacktrace. - +apply plugin: 'com.palantir.java-format' apply plugin: XjcPlugin - apply from: 'eclipse.gradle' +// Enable following for debugging +// gradle.startParameter.showStacktrace = org.gradle.api.logging.configuration.ShowStacktrace. + group = "org.jabref" version = project.findProperty('projVersion') ?: '100.0.0' diff --git a/config/IntelliJ Code Style.xml b/config/IntelliJ Code Style.xml index 6a03e104d9d..3db7387111f 100644 --- a/config/IntelliJ Code Style.xml +++ b/config/IntelliJ Code Style.xml @@ -11,28 +11,20 @@ +