Skip to content

Commit

Permalink
Migrate buildSrc to build file
Browse files Browse the repository at this point in the history
  • Loading branch information
3flex committed Jan 20, 2024
1 parent fa2743d commit f9977ce
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 33 deletions.
10 changes: 7 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.gradle.ext.copyright
import org.jetbrains.gradle.ext.settings
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import kotlin.math.min

plugins {
id("org.jetbrains.kotlin.jvm") version "1.8.22"
Expand Down Expand Up @@ -44,7 +45,10 @@ repositories {
mavenCentral()
}

val licenseHeaderFile = file("gradle/license-header.txt")
val licenseHeader = file("gradle/license-header.txt")
.readLines()
.joinToString("\n") { line -> line.substring(min(line.length, 3)) }
.trim()
spotless {
lineEndings = com.diffplug.spotless.LineEnding.UNIX
kotlin {
Expand All @@ -57,7 +61,7 @@ spotless {
"ktlint_standard_trailing-comma-on-declaration-site" to "disabled"
)
)
licenseHeaderFile(licenseHeaderFile)
licenseHeader(licenseHeader)
}
}

Expand All @@ -68,7 +72,7 @@ idea {
useDefault = "Apache-2.0"
profiles {
create("Apache-2.0") {
notice = readCopyrightHeader(licenseHeaderFile)
notice = licenseHeader
keyword = "Copyright"
}
}
Expand Down
7 changes: 0 additions & 7 deletions buildSrc/build.gradle.kts

This file was deleted.

Empty file removed buildSrc/settings.gradle.kts
Empty file.
23 changes: 0 additions & 23 deletions buildSrc/src/main/kotlin/IdeaExtExtensions.kt

This file was deleted.

0 comments on commit f9977ce

Please sign in to comment.