Thread
#multiplatform
    f

    Fanis Paschos

    1 year ago
    Hello everyone, I am really sorry for the ‘simple’ question, but I am quite new to KMM. I have one KMM App (like general utils library for both Android & iOS apps that I have) from Plugin in Android Studio. — How do I build both .jar & .framework to transfer them to my main project and where do they get saved? Thanks guys 🙂
    Kris Wong

    Kris Wong

    1 year ago
    are you familiar with gradle?
    f

    Fanis Paschos

    1 year ago
    Hello @Kris Wong. Just a little bit. Shall I add code there?
    As I can see, there is a packForXcode variable
    Kris Wong

    Kris Wong

    1 year ago
    run the assemble task. this will build all your targets.
    f

    Fanis Paschos

    1 year ago
    Shall I place something similar there;
    Ok, great
    And where should I look for the output .jar file?
    Kris Wong

    Kris Wong

    1 year ago
    run
    find build/ -name *.jar
    f

    Fanis Paschos

    1 year ago
    I guess, that you are talking about this assemble, right?
    Kris Wong

    Kris Wong

    1 year ago
    yes
    f

    Fanis Paschos

    1 year ago
    Sorry, but I am not really familiar
    how do I run this command? and where?
    i Am using a MacBook
    Kris Wong

    Kris Wong

    1 year ago
    you know how to use the terminal?
    f

    Fanis Paschos

    1 year ago
    Just a little bit
    Kris Wong

    Kris Wong

    1 year ago
    you can run that command in your source root
    though it may be better to replace 'build/' with '.' depending on your setup
    f

    Fanis Paschos

    1 year ago
    it says ‘operation not permitted’
    Well, I fixed that
    now there are a lot of these files
    which one should I look for? *thanks a lot for your help!
    Kris Wong

    Kris Wong

    1 year ago
    there should only be a couple
    ah, I see there's probably some intermediates
    f

    Fanis Paschos

    1 year ago
    yes, exactly
    which one should I look for though?
    Kris Wong

    Kris Wong

    1 year ago
    it should be named the same as your project
    probably under build/libs
    f

    Fanis Paschos

    1 year ago
    are these the ones?
    Kris Wong

    Kris Wong

    1 year ago
    do you have an android target or a JVM target?
    f

    Fanis Paschos

    1 year ago
    Sorry but, how do I check that?
    Kris Wong

    Kris Wong

    1 year ago
    in your build.gradle[.kts]
    f

    Fanis Paschos

    1 year ago
    I think it is Android(if I found that correctly)
    android has its own archive format - aar
    f

    Fanis Paschos

    1 year ago
    Oh ok
    So, shall I look for .aar?
    and, how do I build into .aar?
    Kris Wong

    Kris Wong

    1 year ago
    yes
    f

    Fanis Paschos

    1 year ago
    as I can see, under settings.gradle.kts there are these two lines of code
    include(":androidApp")
    include(":shared")
    How do I create the .aar file though?
    Kris Wong

    Kris Wong

    1 year ago
    the assemble task
    f

    Fanis Paschos

    1 year ago
    ok. I just did it, but the file says that it has modified 5 days ago 😕
    Shouldn’t it say seconds ago?
    Kris Wong

    Kris Wong

    1 year ago
    only if something has changed in the meantime
    otherwise you can clean and run it again
    f

    Fanis Paschos

    1 year ago
    Ok, I will try now!!
    afterwards, I copy/paste the .aar file under /libs/ folder and then place in the gradle(app) the following line:
    implementation files('libs/myname.aar')
    is that correct?
    Kris Wong

    Kris Wong

    1 year ago
    i don't recall if that's completely correct, but it's correct in principal at least
    f

    Fanis Paschos

    1 year ago
    Ok ok, great
    will figure out the rest
    @Kris Wong I am really thankful!! Thank you for your time and effort to help me, due to the fact I am quite new to KMM 🙂
    have a wonderful night!! till the next time!! cya! 🙂