1
0
mirror of https://github.com/mamoe/mirai.git synced 2025-04-24 20:43:33 +08:00

[build] Fix android source set not depends on jvmBaseMain when using jvm android target

This commit is contained in:
Karlatemp 2023-07-11 01:35:19 +08:00
parent eecff3bc4e
commit 1903d10333
No known key found for this signature in database
GPG Key ID: BA173CA2B9956C59

View File

@ -60,13 +60,18 @@ private fun Project.configureAndroidTargetWithJvm() {
}
}
val jvmBaseMain by sourceSets.getting
val jvmBaseTest by sourceSets.getting
sourceSets.getByName("androidTest").configureJvmTest("configureAndroidTargetWithJvm")
sourceSets.getByName("androidTest").kotlin.srcDir(projectDir.resolve("src/androidUnitTest/kotlin"))
sourceSets.getByName("androidTest").dependsOn(jvmBaseTest)
sourceSets.getByName("androidMain").apply {
dependencies {
compileOnly(`android-runtime`)
}
dependsOn(jvmBaseMain)
}
tasks.all {