diff --git a/kotlin-native/performance/KotlinVsSwift/build.gradle b/kotlin-native/performance/KotlinVsSwift/build.gradle index 504eabda699..19ddc7a45b2 100644 --- a/kotlin-native/performance/KotlinVsSwift/build.gradle +++ b/kotlin-native/performance/KotlinVsSwift/build.gradle @@ -47,6 +47,18 @@ task mergeJvmReports { } } +task jvmJsonReport { + subprojects.each { + dependsOn(it.getTasksByName('jvmJsonReport', true)[0]) + } +} + +task konanJsonReport { + subprojects.each { + dependsOn(it.getTasksByName('konanJsonReport', true)[0]) + } +} + subprojects.each { it.getTasksByName('jvmJsonReport', true)[0].finalizedBy mergeJvmReports it.getTasksByName('konanJsonReport', true)[0].finalizedBy mergeNativeReports diff --git a/kotlin-native/performance/KotlinVsSwift/ring/build.gradle.kts b/kotlin-native/performance/KotlinVsSwift/ring/build.gradle.kts index ce32c193cf5..952d5a6ee2e 100644 --- a/kotlin-native/performance/KotlinVsSwift/ring/build.gradle.kts +++ b/kotlin-native/performance/KotlinVsSwift/ring/build.gradle.kts @@ -13,9 +13,18 @@ val toolsPath = "../../../tools" swiftBenchmark { applicationName = "Ring" - commonSrcDirs = listOf("$toolsPath/benchmarks/shared/src/main/kotlin", "../../shared/src/main/kotlin") - nativeSrcDirs = listOf("../../shared/src/main/kotlin-native/common", "../../shared/src/main/kotlin-native/posix") + commonSrcDirs = listOf("$toolsPath/benchmarks/shared/src/main/kotlin", + "../../shared/src/main/kotlin") + nativeSrcDirs = listOf("$toolsPath/benchmarksAnalyzer/src/main/kotlin-native", + "../../shared/src/main/kotlin-native/common", + "../../shared/src/main/kotlin-native/posix") swiftSources = File("$projectDir/src").list().map { "$projectDir/src/$it" }.toList() compileTasks = listOf("buildSwift") useCodeSize = CodeSizeEntity.EXECUTABLE +} + +tasks.named("compileKotlinNative") { + dependsOn(gradle.includedBuild("benchmarksAnalyzer").task(":cinteropLibcurlMacos")) + kotlinOptions.freeCompilerArgs = listOf("-repo", project.file("$toolsPath/benchmarksAnalyzer/build/classes/kotlin/macos/main").absolutePath, + "-l", "benchmarksAnalyzer-cinterop-libcurl") } \ No newline at end of file diff --git a/kotlin-native/performance/build.gradle b/kotlin-native/performance/build.gradle index dee846b6cb8..998c99c62fd 100644 --- a/kotlin-native/performance/build.gradle +++ b/kotlin-native/performance/build.gradle @@ -4,6 +4,9 @@ import org.jetbrains.kotlin.BuildRegister import org.jetbrains.kotlin.MPPTools import org.jetbrains.kotlin.UtilsKt import org.jetbrains.kotlin.konan.CompilerVersionKt +import org.jetbrains.kotlin.konan.target.DistributionKt +import org.jetbrains.kotlin.konan.target.PlatformManager +import org.jetbrains.kotlin.konan.util.DependencyProcessor buildscript { ext.rootBuildDirectory = file('..') @@ -45,6 +48,8 @@ ext.kotlinNativeVersionInResources = true def versionString = VersionGeneratorKt.kotlinNativeVersionResourceFile(project).readLines().first() def kotlinNativeVersionObject = CompilerVersionKt.parseCompilerVersion(versionString) +def platformManager = new PlatformManager(DistributionKt.buildDistribution(UtilsKt.getKotlinNativeDist(project).path), false) + subprojects { proj -> globalProperties.each { k, v-> def key = k as String @@ -53,9 +58,11 @@ subprojects { proj -> proj.ext.set(key, value) } MiscKt.kotlinInit(proj, findProperty("cacheRedirectorEnabled")?.toString()?.toBoolean() ?: false) + proj.ext.platformManager = platformManager proj.ext["bootstrapKotlinRepo"] = BootstrapKt.getBootstrapKotlinRepo(proj) proj.ext["bootstrapKotlinVersion"] = BootstrapKt.getBootstrapKotlinVersion(proj) proj.ext["kotlin.native.home"] = proj.projectDir.relativePath(UtilsKt.getKotlinNativeDist(project)) + proj.ext["konan.home"] = proj.ext["kotlin.native.home"] proj.ext["konanVersion"] = kotlinNativeVersionObject.toString() proj.ext["kotlin.native.enabled"] = true proj.logger.info("${proj.name}<<<[kotlin.native.home] = ${proj.ext["kotlin.native.home"]}") diff --git a/kotlin-native/tools/benchmarksAnalyzer/gradle.properties b/kotlin-native/tools/benchmarksAnalyzer/gradle.properties index 379330ea8f7..c4f81d7e4d0 100644 --- a/kotlin-native/tools/benchmarksAnalyzer/gradle.properties +++ b/kotlin-native/tools/benchmarksAnalyzer/gradle.properties @@ -1,4 +1,4 @@ -org.jetbrains.kotlin.native.home=../../dist +kotlin.native.home=../../dist org.gradle.jvmargs=-Xmx2048m # Avoid building platform libraries by the MPP plugin. kotlin.native.distribution.type=prebuilt \ No newline at end of file