From 462c3b314c44f2ba311419d96024529cc3aa6329 Mon Sep 17 00:00:00 2001 From: Gregor Dschung Date: Sun, 24 Nov 2019 19:20:30 +0100 Subject: [PATCH] Use ktlint's preferences in IntelliJ --- .idea/codeStyles/Project.xml | 31 +++++++++++++++++++ .idea/codeStyles/codeStyleConfig.xml | 5 +++ .idea/inspectionProfiles/ktlint.xml | 7 +++++ .../inspectionProfiles/profiles_settings.xml | 6 ++++ gradle/formatter/spotless.license.txt | 2 +- gradle/spotless.gradle | 7 ++++- 6 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 .idea/codeStyles/Project.xml create mode 100644 .idea/codeStyles/codeStyleConfig.xml create mode 100644 .idea/inspectionProfiles/ktlint.xml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..beef505 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..0f7bc51 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + diff --git a/.idea/inspectionProfiles/ktlint.xml b/.idea/inspectionProfiles/ktlint.xml new file mode 100644 index 0000000..7d04a74 --- /dev/null +++ b/.idea/inspectionProfiles/ktlint.xml @@ -0,0 +1,7 @@ + + + + diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..64580d1 --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + diff --git a/gradle/formatter/spotless.license.txt b/gradle/formatter/spotless.license.txt index 73b81c4..0a9289a 100644 --- a/gradle/formatter/spotless.license.txt +++ b/gradle/formatter/spotless.license.txt @@ -1,5 +1,5 @@ /* - * Copyright 2016 Gregor Dschung + * Copyright 2016 - 2019 Gregor Dschung * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/gradle/spotless.gradle b/gradle/spotless.gradle index 6df575d..e5bd712 100644 --- a/gradle/spotless.gradle +++ b/gradle/spotless.gradle @@ -17,7 +17,12 @@ spotless { indentWithSpaces() trimTrailingWhitespace() } - + + kotlin { + ktlint() + licenseHeaderFile 'gradle/formatter/spotless.license.txt' + } + groovy { excludeJava() licenseHeaderFile 'gradle/formatter/spotless.license.txt'