• s

    Sourabh Rawat

    1 year ago
    How to run a full stack web app in continuous mode ?
    s
    Big Chungus
    53 replies
    Copy to Clipboard
  • ntherning

    ntherning

    1 year ago
    Hi folks! I want to share how we are invoking Gradle from our Xcode project when building our iOS app. We only build the configuration (Release/Debug/simulator/device) actually requested by Xcode. We also generate a dependencies file (Makefile style
    .d
    -file) which Xcode uses to determine whether Gradle needs to be run at all. Xcode will discover changes to
    .kt
    files (which we edit in Android Studio, they aren't part of the Xcode project), changes to the Gradle files, etc and only then rebuild the framework. It works nicely so far. Would be great to get some feedback on the approach. https://gist.github.com/ntherning/dafd5979bdfb660bbf516066ca056931
    ntherning
    e
    3 replies
    Copy to Clipboard
  • l

    leandro

    1 year ago
    Anyone having issues declaring
    coreLibraryDesugaring
    inside
    androidMain
    dependencies? It seems that this function does not exist for the
    multiplatform
    plugin
    l
    Javier
    +1
    11 replies
    Copy to Clipboard
  • Elka

    Elka

    1 year ago
    Does anyone have any idea if Kotlin will ever support having these kind of dependencies? With the current Kotlin version, we end up with redundant classes because module are being built separately.
    Elka
    kpgalligan
    2 replies
    Copy to Clipboard
  • r

    rocketraman

    1 year ago
    What's the best IDE to use on a Mac to be able to open a KMM project and edit both Swift code and Kotlin/Native? I've tried using Appcode with the K/N plugin but it dosen't really seem to understand my project. It ignores the top-level gradle file. If I use the Xcode workspace to open the project, and I can't seem to import my existing shared library code.
    r
    Big Chungus
    +1
    13 replies
    Copy to Clipboard
  • s

    Sebastien Leclerc Lavallee

    1 year ago
    I’m trying to make the Cocoapods plugin working with iOS app (Tried official and Touchlab fork). I’ve enabled the plugin and generated my podspec file (also fix the path of the script because my setup is a bit different). It does create the “dummy” framework in
    shared/build/cocoapods/framework/shared.framework
    Back to the ios folder, I’m doing
    pod install
    and it does install everything. When I hit build, it fails with error like
    could not build module shared
    . When inspecting the imported shared.framwork, I see it’s still have the
    dummy.h
    so makes me think the sync didn’t worked. Where can I get more info about that
    before_compile
    script which calls task
    gradlew shared:syncFramework
    ? Also, I did try to manually call the
    ./gradle shared:syncFramework
    task but it fails with
    Task syncFramework not found in project shared
    . Why? Did checkout Touchlab’s KampKit and can compile without any issue… when comparing what they did, it’s pretty much the same. I’m clearly missing something but can’t point exactly what… Anyone with some hint? Thanks!
    s
    John O'Reilly
    +2
    5 replies
    Copy to Clipboard
  • Vinod Rai

    Vinod Rai

    1 year ago
    trying to generate .js file so it can be used like other .js files in HTML but getting this error.
    Could not create an instance of type org.jetbrains.kotlin.gradle.targets.js.subtargets.KotlinBrowserJs.
    > Failed to apply plugin [class 'org.gradle.language.base.plugins.LifecycleBasePlugin']
       > Cannot add task 'clean' as a task with that name already exists.
    Here is the common code Gradle for js source.
    js {
            moduleName = "EmtCore"
            binaries.executable()
            browser {
                webpackTask {
                    outputFileName = "$moduleName.js"
                }
                runTask {
                    outputFileName = "$moduleName.js"
                }
            }
        }
    can anyone guide how to generate .js file
    Vinod Rai
    1 replies
    Copy to Clipboard
  • Sebouh Aguehian

    Sebouh Aguehian

    1 year ago
    I’m testing Android Studio KMM plugin (0.1.3-release-54-Studio4.1). When I add a cinterop dependency to the iOS shared code, debugging a unit test no longer works. It seems gradle waits on
    :shared:iosTest
    forever. Has anyone experience this before?
    Sebouh Aguehian
    Artyom Degtyarev [JB]
    8 replies
    Copy to Clipboard
  • joney

    joney

    1 year ago
    joney
    Tristan Hamilton
    2 replies
    Copy to Clipboard
  • h

    Hyun

    1 year ago
    Hi, everyone. I need some advice for this architecture sample I shared the sample previously. but I added some improvement. Sample supports • To share VIewModel Android, Ios both • To share Navigation stack by Android, Ios both • To use ‘function’ way to draw on Compose, SwiftUi both as able to share Navigation. View side code got simpler just drawing UI and deliver user action to viewModel. dependency between each Screen is removed. just ViewModel interact between viewModels. I’m wondering if this is fine approach. Android
    fun SampleScreen(val model: SampleViewModel) {
        Screen(model) {
            Column {
                Text("greeting : ${+model.greeting}")
                Text("reply result : ${+model.replyResult}")
                Button("Reply") { model.onClick() }
            }
        }
    }
    Ios • code looks similar though if ui is complicated, code also not be similar.
    func SampleScreen(_ model: ApiSingleViewModel) -> some View {
        Screen(model) {
            Column {
                Text("current value : \(+model.greeting ?? "")")
                Text("reply result : \(+model.replyResult ?? "")")
                Button("Reply") { model.onClick() }
            }
        }
    }
    Common
    class SampleViewModel(val api: SampleApi = serviceLocator.sampleApi) : BaseViewModel() {
    
        //[add] is for ios to watch each Flow, DataFlow will be migrated to SharedFlow
        val greeting by add { DataFlow<String>() }
        val replyResult by add { DataFlow<String>() }
    
        override fun onInitialized() {
            //initStatus handle error and loading ui, also retry on error
            greeting.load(initStatus) {
                api.getGreeting("Hyun", "Programmer")
            }
        }
    
        fun onClick() {
            //initStatus hide ui on loading, error.
            //status doesn't hide ui but show loading, error ui
            replyResult.load(status) {
                api.reply("Thanks")
                navigate(SomeOtherViewModel()) // you can navigate this way.
            }
        }
    }
    h
    Arkadii Ivanov
    3 replies
    Copy to Clipboard