| /** | |
| * This file was created using the `create_project.py` script located in the | |
| * `<AndroidX root>/development/project-creator` directory. | |
| * | |
| * Please use that script when creating a new project, rather than copying an existing project and | |
| * modifying its settings. | |
| */ | |
| import androidx.build.PlatformIdentifier | |
| import androidx.build.Publish | |
| import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType | |
| import org.jetbrains.kotlin.gradle.plugin.mpp.BitcodeEmbeddingMode | |
| import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFrameworkConfig | |
| plugins { | |
| id("AndroidXPlugin") | |
| } | |
| androidXMultiplatform { | |
| def xcf = new XCFrameworkConfig(project, "AndroidXDarwinBenchmarks") | |
| ios { | |
| binaries.framework { | |
| baseName = "AndroidXDarwinBenchmarks" | |
| // https://youtrack.jetbrains.com/issue/KT-48552 | |
| embedBitcode = BitcodeEmbeddingMode.DISABLE | |
| xcf.add(it) | |
| } | |
| } | |
| // needed for snapshot publishing to trigger component creation | |
| jvm() | |
| // default platform is not JVM but we need to use it because it is | |
| // the only platform built on all machines | |
| defaultPlatform(PlatformIdentifier.JVM) | |
| sourceSets { | |
| darwinMain { | |
| dependsOn(commonMain) | |
| dependencies { | |
| api(libs.kotlinStdlib) | |
| } | |
| } | |
| darwinTest { | |
| dependsOn(commonTest) | |
| dependencies { | |
| implementation(libs.kotlinTest) | |
| implementation(libs.kotlinTestAnnotationsCommon) | |
| } | |
| } | |
| iosMain { | |
| dependsOn(darwinMain) | |
| dependencies { | |
| api(project(":benchmark:benchmark-darwin-core")) | |
| } | |
| } | |
| iosArm64Main { | |
| dependsOn(iosMain) | |
| } | |
| iosSimulatorArm64Main { | |
| dependsOn(iosMain) | |
| } | |
| iosX64Main { | |
| dependsOn(iosMain) | |
| } | |
| targets.configureEach { target -> | |
| if (target.platformType == KotlinPlatformType.native) { | |
| target.compilations["main"].defaultSourceSet { | |
| dependsOn(darwinMain) | |
| } | |
| target.compilations["test"].defaultSourceSet { | |
| dependsOn(darwinTest) | |
| } | |
| target.compilations.configureEach { | |
| compilerOptions.options.optIn.add("kotlinx.cinterop.ExperimentalForeignApi") | |
| } | |
| } | |
| } | |
| } | |
| kotlin.metadata { | |
| // KT-63338 | |
| compilations.matching { it.name == "iosMain" }.configureEach { | |
| it.compileTaskProvider.configure { | |
| enabled = false | |
| } | |
| } | |
| } | |
| } | |
| androidx { | |
| name = "Benchmarks - Darwin" | |
| inceptionYear = "2022" | |
| description = "AndroidX Benchmarks - Darwin" | |
| publish = Publish.SNAPSHOT_ONLY | |
| } |