Hi, Is it possible to write once with my “compilat...
# kotlin-native
v
Hi, Is it possible to write once with my “compilations.main.cinterops” block for android/ios
Copy code
targets {
        // Android Arm64 Platform (Parent Platform)
        androidNativeArm64("androidNativeArm64")

        // Android Arm32 Platform
        androidNativeArm32("androidNativeArm32")

        // Configure Android
        configure([androidNativeArm64, androidNativeArm32]) {
            compilations.main.cinterops {
                XXXXXX
            }

            binaries {
                sharedLib {
                    baseName = "AndroidNative"
                }
            }
        }

        // *********************************************************

        // iOS Arm64 Platform (Parent Platform)
        iosArm64("iOSArm64")

        // iOS X64 Platform
        iosX64("iOSX64")

        // Configure iOS
        configure([iOSArm64, iOSX64]) {
            compilations.main.cinterops {
                XXXXXX
            }

            binaries {
                framework {
                    baseName = "iOS"
                }
            }
        }

        // *********************************************************

        // JVM Platform
        jvm()
    }
Thanks
a
Please try something like this.
v
@Artyom Degtyarev [JB] Thanks, this is useful to me