| import org.jetbrains.kotlin.gradle.plugin.mpp.BitcodeEmbeddingMode |
| import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFrameworkConfig |
| |
| plugins { |
| id("AndroidXPlugin") |
| id("androidx.benchmark.darwin") |
| } |
| |
| androidXMultiplatform { |
| // XCFrameworkConfig must always be called AndroidXDarwinBenchmarks |
| def xcf = new XCFrameworkConfig(project, "AndroidXDarwinBenchmarks") |
| |
| ios { |
| binaries.framework { |
| // The module name must be AndroidXDarwinBenchmarks for the discovery to work. |
| baseName = "AndroidXDarwinBenchmarks" |
| // https://youtrack.jetbrains.com/issue/KT-48552 |
| embedBitcode = BitcodeEmbeddingMode.DISABLE |
| export(project(":benchmark:benchmark-darwin")) |
| xcf.add(it) |
| } |
| } |
| |
| sourceSets { |
| commonMain { |
| dependencies { |
| api(libs.kotlinStdlib) |
| } |
| } |
| commonTest { |
| dependencies { |
| implementation(libs.kotlinTest) |
| implementation(libs.kotlinTestAnnotationsCommon) |
| } |
| } |
| iosArm64Main { |
| dependsOn(commonMain) |
| dependencies { |
| api(project(":benchmark:benchmark-darwin")) |
| } |
| } |
| iosSimulatorArm64Main { |
| dependsOn(iosArm64Main) |
| } |
| iosX64Main { |
| dependsOn(iosArm64Main) |
| } |
| } |
| } |
| |
| darwinBenchmark { |
| xcodeGenConfigFile = project.rootProject.file( |
| "benchmark/benchmark-darwin-xcode/projects/benchmark-darwin-samples-xcode.yml" |
| ) |
| xcodeProjectName = "benchmark-darwin-samples-xcode" |
| scheme = "testapp-ios" |
| // ios 13, 15.2 |
| destination = "platform=iOS Simulator,name=iPhone 13,OS=15.2" |
| referenceSha.set(androidx.getReferenceSha()) |
| } |
| |
| androidx { |
| name = "AndroidX Benchmarks - Darwin Samples" |
| inceptionYear = "2022" |
| description = "AndroidX Benchmarks - Darwin Samples" |
| } |