<@U12AGS8JG> By updating to kotlin 1.4.30 and usin...
# kotest
p
@sam By updating to kotlin 1.4.30 and using the
watchos
shortcut, you have effectively removed watchosx86. Can you remove the shortcut and add the separate watchos targets manually?
s
It was removed because jetbrains changed the watchos and hadn't published a coroutines that was compatible
I think they may have released an updated coroutines yesterday
p
I think you have it mixed up
If I understand correctly they published x86 but not x64
But by using the shortcut you don't publish the x86 any longer
s
I think in 4.4.1 we didn't publish any watchos pending the the coroutines update
p
You have
This one is missing now because the
watchos()
shortcut doesn't include it any more
s
Ok, but didn't they deprecate one watchos in 1.4.30 and introduce another target?
p
Yes they did
s
Can you make a PR to add the appropriate targets, not using the shortcuts? And I can release.
p
Will do
s
awesome
p
@sam I don't like copy-pasting the code all over the place, I'd go with a refactor to use a plugin, d'accord?
s
Yep
p
Running into strange gradle issues 😕
dependencies { implementation("org.jetbrains.kotlinkotlin gradle plugin1.4.31") implementation("org.jetbrains.kotlinkotlin compiler embeddable1.4.31") } When I add this to the buildSrc build.gradle it can't resolve the projects any longer. Any idea on that?
I think its because of different kotlin versions bundled to gradle 😕
Would you be fine with a groovy file that's applied?
s
Yes
c
why do you need kotlin compiler embeddable in the buildSrc build file?
p
So I can configure the
KotlinMultiplatformExtension
from the plugin
c
in the build file you just declare the dependency on the gradle dsl, for example like this
Copy code
plugins {
    `kotlin-dsl`
    `kotlin-dsl-precompiled-script-plugins`
}

repositories {
    gradlePluginPortal() // so that external plugins can be resolved in dependencies section
    mavenCentral()
}
dependencies {
    // hotfix to make kotlin scratch files work in idea
    implementation(kotlin("script-runtime"))
}
and then you can create a buildSrc/src/main/kotlin/myPlugin.gradle.kts file and put everything there, for example
Copy code
plugins {
    java
    `maven-publish`
    signing
}
...
java {
    @Suppress("UnstableApiUsage")
    withJavadocJar()
    @Suppress("UnstableApiUsage")
    withSourcesJar()
}

signing {
    sign(publishing.publications[pub])
}
so you would put the dependencies and the plugin in that file and not into the build file, or does that not work with the multiproject plugijn?
in buildSrc/build.gradle.kts you can’t use a newer kotlin plugin but in the src/main build file you can do what you like
p
I tried that already but that's leads to weird issues itself
Now a sync either fails with: e: /home/paul/repos/kotest/buildSrc/src/main/kotlin/kotest-multiplatform.gradle.kts: (9, 1): Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: public fun DependencyHandler.kotlin(module: String, version: String? = ...): Any defined in org.gradle.kotlin.dsl public fun PluginDependenciesSpec.kotlin(module: String): PluginDependencySpec defined in org.gradle.kotlin.dsl
And every third sync fails with: Caused by: org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'org.jetbrains.kotlin.multiplatform'] was not found in any of the following sources: