Skip to content

Commit

Permalink
some build script cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
robertfmurdock committed Jul 21, 2023
1 parent 2a0736d commit c1fa550
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 89 deletions.
21 changes: 5 additions & 16 deletions libraries/stub-model/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,9 @@ kotlin {
useCommonJs()
}
}

sourceSets {
getByName("commonMain") {
dependencies {
api(project(":libraries:model"))
api(kotlin("stdlib"))
api(kotlin("stdlib-common"))
api("com.benasher44:uuid")
}
}
getByName("jsMain") {
dependencies {
api(kotlin("stdlib-js"))
}
}
}
}

dependencies {
commonMainApi(project(":libraries:model"))
commonMainApi("com.benasher44:uuid")
}
55 changes: 19 additions & 36 deletions libraries/test-action/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,55 +3,38 @@ plugins {
kotlin("plugin.serialization")
}
kotlin {

targets {
js {
nodejs()
useCommonJs()
}
jvm()
}
}

sourceSets {
getByName("commonMain") {
dependencies {
implementation(project(":libraries:action"))
implementation(project(":libraries:test-logging"))
api("com.zegreatrob.testmints:action")
api("com.zegreatrob.testmints:action-async")
api("com.zegreatrob.testmints:async")
api("com.zegreatrob.testmints:standard")
api("com.zegreatrob.testmints:minassert")
implementation("org.jetbrains.kotlin:kotlin-test")
implementation("org.jetbrains.kotlin:kotlin-stdlib-common")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core")
}
}
getByName("jvmMain") {
dependencies {
implementation(kotlin("reflect"))
implementation("org.slf4j:slf4j-simple")
dependencies {
commonMainImplementation(project(":libraries:action"))
commonMainImplementation(project(":libraries:test-logging"))
commonMainApi("com.zegreatrob.testmints:action")
commonMainApi("com.zegreatrob.testmints:action-async")
commonMainApi("com.zegreatrob.testmints:async")
commonMainApi("com.zegreatrob.testmints:standard")
commonMainApi("com.zegreatrob.testmints:minassert")
commonMainImplementation("org.jetbrains.kotlin:kotlin-test")
commonMainImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-core")
commonMainImplementation("org.jetbrains.kotlinx:kotlinx-serialization-core")

implementation("org.junit.jupiter:junit-jupiter-api")
implementation("org.junit.jupiter:junit-jupiter-engine")
"jvmMainImplementation"(kotlin("reflect"))
"jvmMainImplementation"("org.slf4j:slf4j-simple")
"jvmMainImplementation"("org.junit.jupiter:junit-jupiter-api")
"jvmMainImplementation"("org.junit.jupiter:junit-jupiter-engine")
"jvmMainImplementation"("com.fasterxml.jackson.core:jackson-databind")

implementation(kotlin("reflect"))
implementation("io.github.oshai:kotlin-logging")
implementation("com.fasterxml.jackson.core:jackson-databind")
}
}
getByName("jsMain") {
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-js")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core")
}
}
}
"jsMainImplementation"("org.jetbrains.kotlinx:kotlinx-serialization-core")
}

tasks {
named("jvmTest", Test::class) {
named<Test>("jvmTest") {
systemProperty("junit.jupiter.extensions.autodetection.enabled", "true")

useJUnitPlatform()
Expand Down
28 changes: 10 additions & 18 deletions scripts/export/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,19 @@ kotlin {
optIn("kotlinx.serialization.ExperimentalSerializationApi")
}
}
getByName("commonMain") {
dependencies {
api(project(":libraries:model"))
api(kotlin("stdlib"))
api(kotlin("stdlib-common"))
api("com.benasher44:uuid")
api("io.github.oshai:kotlin-logging")
api("org.jetbrains.kotlinx:kotlinx-serialization-json")
}
}
getByName("jsMain") {
dependencies {
api(project(":libraries:repository:dynamo"))
api(project(":libraries:json"))

api(kotlin("stdlib-js"))
}
}
}
}

dependencies {
commonMainApi(project(":libraries:model"))
commonMainApi("com.benasher44:uuid")
commonMainApi("io.github.oshai:kotlin-logging")
commonMainApi("org.jetbrains.kotlinx:kotlinx-serialization-json")

"jsMainApi"(project(":libraries:repository:dynamo"))
"jsMainApi"(project(":libraries:json"))
}

val outputFile: String? by project

tasks {
Expand Down
28 changes: 9 additions & 19 deletions scripts/import/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,16 @@ kotlin {
useCommonJs()
}
}
}

sourceSets {
getByName("commonMain") {
dependencies {
api(project(":libraries:model"))
api(kotlin("stdlib"))
api(kotlin("stdlib-common"))
api("com.benasher44:uuid")
api("io.github.oshai:kotlin-logging")
api("org.jetbrains.kotlinx:kotlinx-serialization-json")
}
}
getByName("jsMain") {
dependencies {
api(project(":libraries:json"))
api(project(":libraries:repository:dynamo"))
api(kotlin("stdlib-js"))
}
}
}
dependencies {
commonMainApi(project(":libraries:model"))
commonMainApi("com.benasher44:uuid")
commonMainApi("io.github.oshai:kotlin-logging")
commonMainApi("org.jetbrains.kotlinx:kotlinx-serialization-json")

"jsMainApi"(project(":libraries:json"))
"jsMainApi"(project(":libraries:repository:dynamo"))
}

val inputFile: String? by project
Expand Down

0 comments on commit c1fa550

Please sign in to comment.