What's the purpose of `ios_framework_name` in the ...
# kotlin-native
s
What's the purpose of
ios_framework_name
in the build.gradle file? Can we use that variable to change the name of the generated framework for iOS?
k
in what build.gradle file?
s
Well, for now I have only one build.gradle file. In mid/long term, I will split it in multiple files so it will be cleaner, but I have higher priorities for now.
k
well, it's your build.gradle file. in theory you should know what the variables are for 😛
it's not part of the Kotlin plugin, at least
s
I mean, it's not my variable. I saw it in some samples from the net that were using this block in their build.gradle file and was wondering the purpose.
Copy code
buildscript {
    ext.ios_framework_name = 'myToto2'
}
It doesn't seem like a custom variable, more of a property of ext. Not sure what ext is either though.
k
that's just an "extra"
it's basically a normal variable
s
Ah I see. So it was custom after all in their samples.
k
yes. it's not necessary unless you want to rename your framework file
otherwise it uses the project name
it used to be necessary
s
Yeah, I'm looking to rename my framework file. But only the root folder, not the underlying files under. For instance, Iet's say that the project name is MySDK. Now I would like to append the version to the .framework, so it would output like this: MySDK-1.0.0.framework. However, I'd like the rest of this tree hierarchy to remain unchanged. So, for instance, the header file would still look like this: MySDK-1.0.0.framework/Headers/MySDK.h. So just using
baseName = "$MySDK-${version}"
doesn't work since it renames the whole framework (not just the root directory).
The other approach I could take is to insert a sub-directory just before the framework for the version. Something like this:
.../1.0.0/MySDK.framework
. But not sure how to accomplish this either.