Skip to content

Commit

Permalink
Remove buildSrc (#301)
Browse files Browse the repository at this point in the history
* Remove redundant extensions

* Remove redundant receiver parameter

* Simplify call chain

* Apply idea-ext plugin in root build file

* Migrate buildSrc to build file
  • Loading branch information
3flex authored Jan 20, 2024
1 parent af986ad commit 735f028
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 48 deletions.
9 changes: 8 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import org.gradle.initialization.IGradlePropertiesLoader.ENV_PROJECT_PROPERTIES_PREFIX
import org.gradle.initialization.IGradlePropertiesLoader.SYSTEM_PROJECT_PROPERTIES_PREFIX
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"
id("com.gradle.plugin-publish") version "1.2.1"
id("com.diffplug.spotless") version "6.24.0"
id("com.github.johnrengelman.shadow") version "8.1.1"
id("org.jetbrains.gradle.plugin.idea-ext")
id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.7"
id("com.github.ben-manes.versions") version "0.50.0"
id("org.ajoberstar.stutter") version "0.7.3"
}
Expand Down Expand Up @@ -41,6 +44,10 @@ repositories {
}

val licenseHeaderFile = file("gradle/license-header.txt")
fun readCopyrightHeader(licenseHeaderFile: File) =
licenseHeaderFile.readLines()
.joinToString("\n") { line -> line.substring(min(line.length, 3)) }
.trim()
spotless {
lineEndings = com.diffplug.spotless.LineEnding.UNIX
kotlin {
Expand Down
11 changes: 0 additions & 11 deletions buildSrc/build.gradle.kts

This file was deleted.

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

This file was deleted.

0 comments on commit 735f028

Please sign in to comment.