Skip to content

Commit

Permalink
chore(deps): add kotlinx-coroutines-core dependency and refactor sour…
Browse files Browse the repository at this point in the history
…ceSets configuration

This commit adds the "kotlinx-coroutines-core" library to the project dependencies. It also refines the configuration of source sets, primarily for the main and test source directories, ensuring the correct resource paths are used based on the platform version. The changes optimize the project structure for better resource management and introduce asynchronous programming capabilities via coroutines.
  • Loading branch information
phodal committed Aug 9, 2024
1 parent 087501f commit 56b0b26
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -182,36 +182,38 @@ allprojects {
val testOutput = configurations.create("testOutput")

if(this.name != "ext-terminal") {
sourceSets {
main {
java.srcDirs("src/gen")
if (platformVersion == 241) {
resources.srcDirs("src/233/main/resources")
}
resources.srcDirs("src/$platformVersion/main/resources")
}
test {
resources.srcDirs("src/$platformVersion/test/resources")
}
}
kotlin {
sourceSets {
main {
// share 233 code to 241
java.srcDirs("src/gen")
if (platformVersion == 241) {
kotlin.srcDirs("src/233/main/kotlin")
resources.srcDirs("src/233/main/resources")
}
kotlin.srcDirs("src/$platformVersion/main/kotlin")
resources.srcDirs("src/$platformVersion/main/resources")
}
test {
kotlin.srcDirs("src/$platformVersion/test/kotlin")
resources.srcDirs("src/$platformVersion/test/resources")
}
}
kotlin {
sourceSets {
main {
// share 233 code to 241
if (platformVersion == 241) {
kotlin.srcDirs("src/233/main/kotlin")
}
kotlin.srcDirs("src/$platformVersion/main/kotlin")
}
test {
kotlin.srcDirs("src/$platformVersion/test/kotlin")
}
}
}
}
}

dependencies {
compileOnly(kotlin("stdlib-jdk8"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1")

testOutput(sourceSets.getByName("test").output.classesDirs)
}
}
Expand Down Expand Up @@ -725,5 +727,3 @@ fun File.isManifestFile(): Boolean {
}
return rootNode.name() == "idea-plugin"
}


0 comments on commit 56b0b26

Please sign in to comment.