Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Configuration for the Plugin for Multiplatform Targets #2

Closed
handstandsam opened this issue May 31, 2022 · 1 comment
Closed

Comments

@handstandsam
Copy link
Owner

There is currently some hard coded target configurations in this plugin. It would be nice to specify those to pass into the plugin.

@handstandsam
Copy link
Owner Author

Looked more into this. The recommended way is to apply your config if the KotlinMultiplatformExtension is non-null.

project.extensions.findByType(
    org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension::class.java
)?.apply {
    listOf(
        iosSimulatorArm64()
    ).forEach { nativeTarget ->
        nativeTarget.binaries.framework {
            baseName = "jvm_kmp4free"
        }
    }
}

I had originally looked at having this be a configuration block like:

kmp4free {
    config = { 
        // CONFIG WOULD HAVE GONE HERE
    }
}

This doesn't work though because configuration is determined during project evaluation, but we need this config for evaluation. Therefore, the method first listed is the best approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant