aleksey.tomin
08/13/2020, 6:14 AM./gradlew tasks see error
Please initialize at least one Kotlin target in 'my-project (:)'.
What I need to do? On 1.3.72 all OK.
--info and --debug doesn’t help me.
macOS, KMP contains OSX/minGW/android code
gradle 6.4, 6.5.1 or 6.6, jdk - 1.8 or 11 - result the same
PS: Solved - just add into root build.gradle.kts
kotlin {
jvm()
}
Thanks for @msinkgildor
08/13/2020, 6:47 AMmsink
08/13/2020, 7:10 AMsamples directory does'nt contain any code, all code is in subdirectories.
So as workaround just added dummy
kotlin {
jvm()
}
block in samples/build.gradle.kts .gildor
08/13/2020, 7:16 AMaleksey.tomin
08/13/2020, 8:15 AMaleksey.tomin
08/14/2020, 2:29 PMgildor
08/14/2020, 3:40 PMmsink
08/14/2020, 4:26 PMkotlin("multiplatform") version "1.4.0-rc" apply falsemsink
08/14/2020, 4:28 PMkotlin-libui is a little different:
in root build.gradle.kts I have kotlin("multiplatform") version Kotlin.version apply false,msink
08/14/2020, 4:29 PMinclude(":libui")
include(":samples:controlgallery")
include(":samples:datetime")
include(":samples:drawtext")
include(":samples:form")
include(":samples:hello")
include(":samples:hello-ktx")
include(":samples:histogram")
include(":samples:logo")
include(":samples:table")
include(":samples:timer")
(:samples itself even not included)msink
08/14/2020, 4:33 PMPlease initialize at least one Kotlin target in 'samples (:samples)'gildor
08/15/2020, 3:42 AMsamples, which is not used there, but used by subprojects.
I understand why you are doing this, to make Gradle generate accessors so you could apply configuration in subprojects
One way to do that is do not apply plugin to project itself, and instead use dynamic syntax to access extensiongildor
08/15/2020, 8:14 AMmsink
08/15/2020, 8:23 AMnrobi
11/04/2020, 8:49 AM4.2.0-alpha15 , but I’m not applying the kotlin mpp plugin in the root build.gradle.kts
@gildor am I missing something? 🤔nrobi
11/04/2020, 8:51 AMgildor
11/04/2020, 8:52 AMgildor
11/04/2020, 8:52 AMgildor
11/04/2020, 8:53 AMgildor
11/04/2020, 8:55 AMnrobi
11/04/2020, 9:19 AM6.7-rc-4 to 6.7 solves the issue