Sylvain Patenaude
11/15/2019, 9:52 PMgradlew build iosTest
, I get an error like this:
Task 'iosTest' is ambiguous in root project 'MySDK'. Candidates are: 'iosTestBinaries', 'iosTestKlibrary', 'iosTestProcessResources'.
The iOS part of my build.gradle looks like this:
kotlin {
iosX64("ios") {
binaries {
framework()
}
}
sourceSets {
commonMain {
dependencies {
implementation kotlin('stdlib-common')
}
}
iosMain {
}
iosTest {
}
}
}russhwolf
11/16/2019, 2:04 AMSylvain Patenaude
11/18/2019, 7:15 PMiosTest
task. Now I have this error:
Execution failed for task ':iosTest'.
> Process 'command 'xcrun'' finished with non-zero exit value 165
And this also if it helps:
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=165):
Invalid device state
It links back to this line (the exec line) in the build.gradle:
exec { <-- this line
commandLine 'xcrun', 'simctl', 'spawn', ...
}Sylvain Patenaude
11/19/2019, 5:58 PMiosTest
task or it's an implicitely generated task based on the commonTest
sourceSet.Sylvain Patenaude
11/19/2019, 6:10 PMiosTest
in my Android/JVM build since it's in the *shared/*build.gradle.kts in your GitHub example.
If I remove the line check.dependsOn(iosTest)
, it isn't run in any of my builds (Android, iOS), but with the line, both builds run it (because of the check
dependency I guess).Sylvain Patenaude
11/19/2019, 7:08 PMiosTest
and commonTest
(but not those in jvmTest
).
2. For my Android build pipeline: run tests that are in jvmTest
and commonTest
(but not those in iosTest
).
Do I need to move the iosTest
task down in the iosTest sub-folder or can/should I achieve this by tailoring my YAML build files accordingly?
(I have 2 separate build files, android.yml and ios.yml, but they both call 'gradlew *build*' for now.)russhwolf
11/19/2019, 7:49 PMgradlew check
. If you want to do separate pipelines for each, probably you should remove the check.dependsOn(...)
and just manually call the iosTest
task as part of your ios pipeline.Sylvain Patenaude
11/19/2019, 8:08 PMjvm
target of my iOS build pipeline? Not only the test part, but the build part as well.
For instance, is iosBuild
(instead of just build
) also a predefined task for the ios
target?Sylvain Patenaude
11/19/2019, 9:01 PM