Skip to content

Commit 56b0b26

Browse files
committed
chore(deps): add kotlinx-coroutines-core dependency and refactor sourceSets 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.
1 parent 087501f commit 56b0b26

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

build.gradle.kts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -182,36 +182,38 @@ allprojects {
182182
val testOutput = configurations.create("testOutput")
183183

184184
if(this.name != "ext-terminal") {
185-
sourceSets {
186-
main {
187-
java.srcDirs("src/gen")
188-
if (platformVersion == 241) {
189-
resources.srcDirs("src/233/main/resources")
190-
}
191-
resources.srcDirs("src/$platformVersion/main/resources")
192-
}
193-
test {
194-
resources.srcDirs("src/$platformVersion/test/resources")
195-
}
196-
}
197-
kotlin {
198185
sourceSets {
199186
main {
200-
// share 233 code to 241
187+
java.srcDirs("src/gen")
201188
if (platformVersion == 241) {
202-
kotlin.srcDirs("src/233/main/kotlin")
189+
resources.srcDirs("src/233/main/resources")
203190
}
204-
kotlin.srcDirs("src/$platformVersion/main/kotlin")
191+
resources.srcDirs("src/$platformVersion/main/resources")
205192
}
206193
test {
207-
kotlin.srcDirs("src/$platformVersion/test/kotlin")
194+
resources.srcDirs("src/$platformVersion/test/resources")
195+
}
196+
}
197+
kotlin {
198+
sourceSets {
199+
main {
200+
// share 233 code to 241
201+
if (platformVersion == 241) {
202+
kotlin.srcDirs("src/233/main/kotlin")
203+
}
204+
kotlin.srcDirs("src/$platformVersion/main/kotlin")
205+
}
206+
test {
207+
kotlin.srcDirs("src/$platformVersion/test/kotlin")
208+
}
208209
}
209210
}
210-
}
211211
}
212212

213213
dependencies {
214214
compileOnly(kotlin("stdlib-jdk8"))
215+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1")
216+
215217
testOutput(sourceSets.getByName("test").output.classesDirs)
216218
}
217219
}
@@ -725,5 +727,3 @@ fun File.isManifestFile(): Boolean {
725727
}
726728
return rootNode.name() == "idea-plugin"
727729
}
728-
729-

0 commit comments

Comments
 (0)