Skip to content

Commit

Permalink
some build refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
robertfmurdock committed Jul 16, 2023
1 parent acebbfa commit 988167a
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 67 deletions.
6 changes: 0 additions & 6 deletions client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,6 @@ tasks {
lintKotlinJsMain {
dependsOn("kspKotlinJs")
}
withType(FormatTask::class) {
exclude { spec -> spec.file.absolutePath.contains("generated") }
}
withType(LintTask::class) {
exclude { spec -> spec.file.absolutePath.contains("generated") }
}
}

artifacts {
Expand Down
9 changes: 0 additions & 9 deletions client/components/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import org.jmailen.gradle.kotlinter.tasks.FormatTask
import org.jmailen.gradle.kotlinter.tasks.LintTask

plugins {
id("com.zegreatrob.jsmints.plugins.minreact")
id("com.zegreatrob.coupling.plugins.jstools")
Expand Down Expand Up @@ -30,12 +27,6 @@ tasks {
lintKotlinJsMain {
dependsOn("kspKotlinJs")
}
withType(FormatTask::class) {
exclude { spec -> spec.file.absolutePath.contains("generated") }
}
withType(LintTask::class) {
exclude { spec -> spec.file.absolutePath.contains("generated") }
}
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
package com.zegreatrob.coupling.plugins

import org.jmailen.gradle.kotlinter.tasks.FormatTask
import org.jmailen.gradle.kotlinter.tasks.LintTask

repositories {
mavenCentral()
}

plugins {
id("org.jmailen.kotlinter")
}

afterEvaluate {
tasks {
withType<FormatTask> {
exclude { spec -> spec.file.absolutePath.contains("generated") }
}
withType<LintTask> {
exclude { spec -> spec.file.absolutePath.contains("generated") }
}
}
}
9 changes: 0 additions & 9 deletions libraries/action/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import org.jmailen.gradle.kotlinter.tasks.FormatTask
import org.jmailen.gradle.kotlinter.tasks.LintTask

plugins {
id("com.zegreatrob.coupling.plugins.mp")
id("com.zegreatrob.testmints.action-mint")
Expand Down Expand Up @@ -35,12 +32,6 @@ tasks {
"formatKotlinJsTest" {
dependsOn("kspTestKotlinJs")
}
withType(FormatTask::class) {
exclude { spec -> spec.file.absolutePath.contains("generated") }
}
withType(LintTask::class) {
exclude { spec -> spec.file.absolutePath.contains("generated") }
}
"lintKotlinJsMain" {
dependsOn("kspKotlinJs")
}
Expand Down
66 changes: 23 additions & 43 deletions server/action/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,59 +13,39 @@ kotlin {
useCommonJs()
}
}
sourceSets {
getByName("commonMain") {
dependencies {
api(project(":libraries:repository:core"))
api(project(":libraries:model"))
api(project(":libraries:action"))
api("com.zegreatrob.testmints:action")
api("com.zegreatrob.testmints:action-async")
implementation("com.benasher44:uuid")
implementation("io.github.microutils:kotlin-logging")
implementation("org.jetbrains.kotlin:kotlin-stdlib-js")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core")
}
}
getByName("commonTest") {
dependencies {
api(project(":libraries:stub-model"))
api(project(":libraries:test-action"))
implementation(project(":libraries:repository:memory"))
implementation("com.zegreatrob.testmints:async")
implementation("com.zegreatrob.testmints:minassert")
implementation("com.zegreatrob.testmints:minspy")
implementation("com.zegreatrob.testmints:standard")
implementation("org.jetbrains.kotlin:kotlin-test-annotations-common")
implementation("org.jetbrains.kotlin:kotlin-test-common")
}
}

getByName("jsTest") {
dependencies {
api(project(":libraries:logging"))
implementation("org.jetbrains.kotlin:kotlin-test-js")
}
}
}

sourceSets.named("jsMain") {
kotlin.srcDir("build/generated/ksp/js/jsMain/kotlin")
}

}
dependencies {
commonMainApi(project(":libraries:repository:core"))
commonMainApi(project(":libraries:model"))
commonMainApi(project(":libraries:action"))
commonMainApi("com.zegreatrob.testmints:action")
commonMainApi("com.zegreatrob.testmints:action-async")
commonMainImplementation("com.benasher44:uuid")
commonMainImplementation("io.github.microutils:kotlin-logging")
commonMainImplementation("org.jetbrains.kotlin:kotlin-stdlib-js")
commonMainImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-core")

commonTestApi(project(":libraries:stub-model"))
commonTestApi(project(":libraries:test-action"))
commonTestImplementation(project(":libraries:repository:memory"))
commonTestImplementation("com.zegreatrob.testmints:async")
commonTestImplementation("com.zegreatrob.testmints:minassert")
commonTestImplementation("com.zegreatrob.testmints:minspy")
commonTestImplementation("com.zegreatrob.testmints:standard")
commonTestImplementation("org.jetbrains.kotlin:kotlin-test-annotations-common")
commonTestImplementation("org.jetbrains.kotlin:kotlin-test-common")

"jsTestApi"(project(":libraries:logging"))
"jsTestImplementation"("org.jetbrains.kotlin:kotlin-test-js")
}
tasks {
"formatKotlinJsMain" {
dependsOn("kspKotlinJs")
}
"lintKotlinJsMain" {
dependsOn("kspKotlinJs")
}
withType(FormatTask::class) {
exclude { spec -> spec.file.absolutePath.contains("generated") }
}
withType(LintTask::class) {
exclude { spec -> spec.file.absolutePath.contains("generated") }
}
}

0 comments on commit 988167a

Please sign in to comment.