Fix MPP Gradle tests
* Use `maven { setUrl(...) }` in Groovy DSL
* Configure compilation tasks beforehand
in testMppBuildWithCompilerPlugins
* Prevent `gradleSettingsScript()` from failing
when no settings script is found
This commit is contained in:
+5
-3
@@ -621,9 +621,11 @@ Finished executing task ':$taskName'|
|
||||
}.single()
|
||||
|
||||
fun Project.gradleSettingsScript(): File =
|
||||
listOf("settings.gradle", "settings.gradle.kts").mapNotNull {
|
||||
File(projectDir, it).takeIf(File::exists)
|
||||
}.single()
|
||||
listOf("settings.gradle", "settings.gradle.kts").map {
|
||||
File(projectDir, it)
|
||||
}.run {
|
||||
singleOrNull { it.exists() } ?: first()
|
||||
}
|
||||
|
||||
/**
|
||||
* @param assertionFileName path to xml with expected test results, relative to test resources root
|
||||
|
||||
+3
@@ -1836,6 +1836,9 @@ class NewMultiplatformIT : BaseGradleIT() {
|
||||
noArg { annotation 'com.example.Annotation' }
|
||||
|
||||
task $printOptionsTaskName {
|
||||
// if the tasks are not configured during evaluation phase, configuring them during execution
|
||||
// leads to new dependencies unsuccessfully added to the resolved compilerPluginsClasspath configuration
|
||||
kotlin.targets.all { compilations.all { /*force to configure the*/ compileKotlinTask } }
|
||||
doFirst {
|
||||
kotlin.sourceSets.each { sourceSet ->
|
||||
def args = sourceSet.languageSettings.compilerPluginArguments
|
||||
|
||||
Reference in New Issue
Block a user