• b

    basher

    3 years ago
    Does anyone know how to check the machine host in groovy gradle?
    b
    2 replies
    Copy to Clipboard
  • s

    sunbreak

    3 years ago
    With kotlin/MPP 1.3.31
    fun foo(block: (Int) -> Unit) { ... }
    in Kotlin would be
    func foo(block: (KotlinInt) -> KotlinUnit)
    in Swfit, and
    foo(Function1<Integer, Unit> block)
    in Java. Both require KotlinUnit.Init() (or Unit.INSTANCE) After upgraded to 1.3.40, it can be
    func foo(block: (KotlinInt) -> Void)
    in Swift, without the KotlinUnit.Init(). Would it possible to omit the Unit.INSTANCE in Java?
    s
    1 replies
    Copy to Clipboard
  • n

    Nikolai

    3 years ago
    Hi, everyone Is it possible to use cocoapods in multiplatform projects? And if yes can someone provide an example? I saw some examples added some lines to build.gradle and managed to build it. But I can’t import it in iOS part of common module.
    n
    Kris Wong
    4 replies
    Copy to Clipboard
  • j

    JoakimForslund

    3 years ago
    Anyone know how to either create a working shadowJar/jar package task configuration for groovy with the generated
    JS Client and JVM Server
    project for 1.3.40 ? (more specificly the jvm server)
    j
    2 replies
    Copy to Clipboard
  • a

    adiba

    3 years ago
    Anyone know why IntelliJ IDEA creates mobile projects with android and shared code coupled together in the same module? https://discuss.kotlinlang.org/t/structuring-modular-android-kotlin-multiplatform-projects-intellij-idea/13238
    a
    b
    2 replies
    Copy to Clipboard
  • l

    Liang Song

    3 years ago
    Hi I am testing generics support for Objective-C/Swift in
    1.3.40
    , I have two interfaces
    interface CompletionHandler<T> {
        fun onCompletion(result: T)
        fun onException(exception: Exception)
    }
    interface TestGenerics {
        fun test(completionHandler: CompletionHandler<String>)
    }
    the signature of
    TestGenerics
    in the generated Objective-C header is
    __attribute__((swift_name("TestGenerics")))
    @protocol TMDTestGenerics
    @required
    - (void)testCompletionHandler:(id<TMDCompletionHandler>)completionHandler __attribute__((swift_name("test(completionHandler:)")));
    @end;
    Looks like it is still not supported
    l
    b
    4 replies
    Copy to Clipboard
  • c

    coletz

    3 years ago
    kotlin{
      jvm("desktop"){
        compilations.main.kotlinOptions.jvmTarget = "1.8"
      }
    }
    It is still using java 11, so javafx is not working 😦 Anyone know how can I force the compiler to use java 8?
    c
    r
    +1
    5 replies
    Copy to Clipboard
  • v

    Vojtech Hrdina

    3 years ago
    Hi, anyone could help?1. https://github.com/JetBrains/kotlin-native/issues/3094 - Warning will be ignored by default in 1.3.41 - How it will be fixed? Do we still need add -Xcc -Wno-swift-name-attribute in build settings? 2. Any idea how to add more than one multitiplatform library in iOS project? ex: I have multiplatform library libA, libB, libC. iOS appA has only libA, appB should have libA, libB, libC - but it is limited by https://github.com/JetBrains/kotlin-native/issues/2423. Is it possible build something like xcode-framework-core, xcode-framework-libA, xcode-framework-libB, xcode-framework-libC and import core+libA, lib… to iOS app? Or only one workaround is write gradle task to compile multiple source sets into one xcode-framwork?
    v
    1 replies
    Copy to Clipboard
  • Fudge

    Fudge

    3 years ago
    I'm having a helluva time trying to publish a multiplatform library to bintray. The problem I'm stuck on is this error when syncing gradle;
    Could not get unknown property 'java' for SoftwareComponentInternal set of type org.gradle.api.internal.component.DefaultSoftwareComponentContainer.
    This is my build.gradle: https://pastebin.com/vxanr3UU I have found people doing it in many other ways, but I haven't found a solution that works from start to finish. How do I work around this error?
    Fudge
    2 replies
    Copy to Clipboard
  • egorand

    egorand

    3 years ago
    I’m trying to setup a multiplatform test project that at the moment contains code only in
    src/commonTest
    and
    src/jvmTest
    . The CI build fails with the following message:
    > Task :wire-tests:linkDebugTestLinuxX64 FAILED
    e: Could not find "/home/travis/build/square/wire/wire-tests/build/classes/kotlin/linuxX64/main/wire-tests.klib" in [/home/travis/build/square/wire, /home/travis/.konan/klib, /home/travis/.konan/kotlin-native-linux-1.3/klib/common, /home/travis/.konan/kotlin-native-linux-1.3/klib/platform/linux_x64].
    Pretty sure it’s a project misconfiguration problem, but I can’t figure it out, any ideas? The Gradle build can be found here: https://github.com/square/wire/blob/egorand/190629/kotlin-test-protos-to-common/wire-tests/build.gradle
    egorand
    Artyom Degtyarev [JB]
    2 replies
    Copy to Clipboard