Changed samples to use new MPP plugin flag (#3379)

This commit is contained in:
LepilkinaElena
2019-09-25 18:25:45 +03:00
committed by GitHub
parent afe9f07cbc
commit 5ee98cb443
7 changed files with 9 additions and 7 deletions
@@ -173,7 +173,8 @@ open class BenchmarkingPlugin: Plugin<Project> {
private fun Project.configureNativeTarget(hostPreset: KotlinNativeTargetPreset) {
kotlin.targetFromPreset(hostPreset, NATIVE_TARGET_NAME) {
compilations.getByName("main").kotlinOptions.freeCompilerArgs = project.compilerArgs + listOf("-l", "kotlinx-cli")
compilations.getByName("main").kotlinOptions.freeCompilerArgs = project.compilerArgs
compilations.getByName("main").enableEndorsedLibs = true
binaries.executable(NATIVE_EXECUTABLE_NAME, listOf(RELEASE)) {
if (HostManager.hostIsMingw) {
linkerOpts.add("-L${mingwPath}/lib")
+2 -1
View File
@@ -55,7 +55,8 @@ kotlin {
}
macosX64("macos") {
compilations.main.kotlinOptions.freeCompilerArgs = ["-l", "kotlinx-cli", "-opt"] + (project.hasProperty('compilerArgs') ? compilerArgs.split() : [])
compilations.main.kotlinOptions.freeCompilerArgs = (project.hasProperty('compilerArgs') ? compilerArgs.split() : [])
compilations.main.enableEndorsedLibs = true
binaries {
framework(frameworkName, [RELEASE])
}
+1 -1
View File
@@ -24,7 +24,7 @@ kotlin {
executable(listOf(DEBUG))
}
binaries.getTest("DEBUG").apply {
freeCompilerArgs.add("-Xlibrary-to-cover=${compilations["main"].output.classesDirs.singleFile.absolutePath}")
freeCompilerArgs += listOf("-Xlibrary-to-cover=${compilations["main"].output.classesDirs.singleFile.absolutePath}")
}
}
}
+1 -1
View File
@@ -15,7 +15,7 @@ kotlin {
}
hostTarget.apply {
compilations["main"].kotlinOptions.freeCompilerArgs = listOf("-l", "kotlinx-cli")
compilations["main"].enableEndorsedLibs = true
binaries {
executable {
entryPoint = "sample.csvparser.main"
+1 -1
View File
@@ -5,7 +5,7 @@ org.gradle.parallel=true
# Pin Kotlin version:
# CHANGE_VERSION_WITH_RELEASE
kotlin_version=1.3.50
kotlin_version=1.3.60-dev-2497
# Use custom Kotlin/Native home:
org.jetbrains.kotlin.native.home=../../dist
+1 -1
View File
@@ -70,7 +70,7 @@ kotlin {
}
}
compilations["main"].kotlinOptions.freeCompilerArgs = listOf("-l", "kotlinx-cli")
compilations["main"].enableEndorsedLibs = true
}
}
+1 -1
View File
@@ -46,7 +46,7 @@ kotlin {
}
}
compilations["main"].kotlinOptions.freeCompilerArgs = listOf("-l", "kotlinx-cli")
compilations["main"].enableEndorsedLibs = true
}
// Enable experimental stdlib API used by the sample.