From 13b034875b5dc751785007ef6eb9d8b7c9d83771 Mon Sep 17 00:00:00 2001 From: Mitchell Syer Date: Fri, 24 Sep 2021 21:01:03 -0400 Subject: [PATCH] Workaround StdLib issue and add KtLint to all modules (#206) * Workaround buildconfig kotlin stdlib issue * Add KtLint to all modules --- build.gradle.kts | 3 +++ server/build.gradle.kts | 12 ++---------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index c3d4819e..07a25910 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,6 +6,7 @@ plugins { kotlin("jvm") version kotlinVersion kotlin("plugin.serialization") version kotlinVersion id("org.jmailen.kotlinter") version "3.6.0" + id("com.github.gmazzo.buildconfig") version "3.0.3" apply false } allprojects { @@ -29,6 +30,7 @@ val projects = listOf( configure(projects) { apply(plugin = "org.jetbrains.kotlin.jvm") apply(plugin = "org.jetbrains.kotlin.plugin.serialization") + apply(plugin = "org.jmailen.kotlinter") java { sourceCompatibility = JavaVersion.VERSION_1_8 @@ -37,6 +39,7 @@ configure(projects) { tasks { withType { + dependsOn(formatKotlin) kotlinOptions { jvmTarget = JavaVersion.VERSION_1_8.toString() freeCompilerArgs = listOf( diff --git a/server/build.gradle.kts b/server/build.gradle.kts index 666ef9b8..10d81746 100644 --- a/server/build.gradle.kts +++ b/server/build.gradle.kts @@ -1,11 +1,10 @@ -import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar import de.undercouch.gradle.tasks.download.Download import java.time.Instant plugins { application id("com.github.johnrengelman.shadow") version "7.0.0" - id("com.github.gmazzo.buildconfig") version "3.0.3" + id("com.github.gmazzo.buildconfig") } dependencies { @@ -127,20 +126,13 @@ tasks { archiveBaseName.set(rootProject.name) archiveVersion.set(tachideskVersion) archiveClassifier.set(tachideskRevision) + destinationDirectory.set(File("$rootDir/server/build")) } test { useJUnit() } - withType { - destinationDirectory.set(File("$rootDir/server/build")) - } - - named("run") { - dependsOn(":formatKotlin", ":lintKotlin") - } - named("processResources") { duplicatesStrategy = DuplicatesStrategy.INCLUDE mustRunAfter("downloadWebUI")