is there any way to instead of generate a whole iO...
# korge
p
is there any way to instead of generate a whole iOS app based on a korge project, just generate the source, or a library that can be used by a 'typical' iOS app ?
a
I would also this for android and js as well
p
i made it for android, can help you with that
@Deactivated User made some changes on the korge's plugin
message has been deleted
by defining androidLibrary = true you get what you want
then there's an android view i developed
give me a second I can share it here
sorry there's some custom code
a
And how do I import that lib to my android application?
p
Copy code
import org.jfrog.gradle.plugin.artifactory.dsl.*

publishing {
    publications {
        register("aar", MavenPublication::class) {
            groupId = "<http://com.xyz|com.xyz>"
            artifactId = "toolframework"
            version = project.version.toString()

            artifact("$buildDir/platforms/android/build/outputs/aar/android-debug.aar")
            artifact("sourcesJar")
        }
    }
}
what i do is to use the jfrog plugin to publish to artifactory
that publishes the generated aar, and then on the project i want to import it i just use the implementation dependency targeting that repo
a
Thank you so much for the info. Now we just need an ios equivalent
p
sure man, np
let’s see what can we do on ios
d
the korge plugin uses the kotlin gradle plugin to build a library, you can call just the task to generate the library. Additionally it creates a project on the build/platforms/ios IIRC that references that library and open that project on XCode, or you can just reference the library in another project. Never tried, but should be possible. Does that solves your question, or I missed something?
p
thx @Deactivated User, i think that answers the question
i’m on a mac machine now, will give it a try and come back with something
👍 1
i was able to run my korge app on ios
now i’m trying to open the korge project with xcode
getting this error
d
Uhmm. Is the framework referenced and existing?
I think there were several versions. Debug/Release and iphone/tvos etc.
Maybe you have a version in the dropdown that has not been compiled yet?
p
i’ve just opened the url that gradle printed to the log
Task :prepareKotlinNativeIosProject
COMMAND: xcodegen ⚙️ Generating plists... ⚙️ Generating project... ⚙️ Writing project... Created project at /Users/pablocaviglia/devel/projects/tool_framework_multi_platform/build/platforms/ios/app.xcodeproj
it looks like it still happens
d
Didnt you said that you got it working on ios? The gradle task is failing? Or only when opened with xcode?
p
no no, it’s working fine using gradle tasks
the problem is when I open the link (of the working task of gradle) that contains the route to the generate .xcodeproj file
d
I see. Well I think I had that issue myself and was because the dropdown of the project had a configuration pointing to an unexisting framework (for example iosX64-debug instead of iosArm64-debug or pointing to the release version while the debug version was the one generated)
p
ok, not sure what happebed, probably something related to the build folder
i deleted it
re build
and worked at once
🎉 1
who knows!