feat: configure Spotless license headers

This commit is contained in:
Harsh Shandilya 2022-10-26 01:54:38 +05:30
parent 720f946f41
commit 5319669a8e
No known key found for this signature in database
2 changed files with 9 additions and 1 deletions

View File

@ -25,12 +25,14 @@ class SpotlessPlugin : Plugin<Project> {
kotlin {
ktfmt(KTFMT_VERSION).googleStyle()
target("**/*.kt")
targetExclude("**/build/", "**/gen/")
targetExclude("**/build/", "/spotless/")
licenseHeaderFile(project.file("spotless/license.kt"))
}
kotlinGradle {
ktfmt(KTFMT_VERSION).googleStyle()
target("**/*.kts")
targetExclude("**/build/")
licenseHeaderFile(project.file("spotless/license.kt"), "import|plugins|@file")
}
format("xml") {
target("**/*.xml")

6
spotless/license.kt Normal file
View File

@ -0,0 +1,6 @@
/*
* Copyright © $YEAR Harsh Shandilya.
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
*/