Hi I have built a kotlin multiplatform library. ...
# multiplatform
a
Hi I have built a kotlin multiplatform library. My question is: Every time I make a change inside the library, I publish it to maven local to test locally. Every time i run
./gradlew build
task, It build both debug & release framework for ios which is slow. Is there a way to generate only debug framework while testing it locally? Also is there a way to completely skip generating ios framework & generate only android framework? Thanks in advance.
s
If you add sample app inside your lib repo then you don't need build any framework for testing purpose This is how I test lib change on device : https://github.com/swapnil-musale/KDeviceInfo/blob/master/sampleApp/composeApp/build.gradle.kts#L36
a
The app is in a separate repository & the library is in a separate repository. I cannot add it as a project dependency.
cc: @Pablichjenkov
i
You can use ./gradlew tasks to see all the tasks you could use, if you are talking about just the android part you can generate with the command that looks like:
./gradlew publishReleasePublicationToMavenLocal
of course with the maven-publish plugin imported and well configured in build.gradle
On the other hand if you want just the iOS part and if you have configured the XCFrameworks without cocoapods the command to generate iOS debug framework should look like:
./gradlew assembleKmpSharedDebugXCFramework
in which KmpShared woould be the name of your shared module
But anyways, all these stuff you can check it out by executing
./gradlew tasks --all
a
Thanks a lot @Ivan Carracedo Asensio 🙌