Changed samples to use new MPP plugin flag (#3379)
This commit is contained in:
@@ -173,7 +173,8 @@ open class BenchmarkingPlugin: Plugin<Project> {
|
|||||||
|
|
||||||
private fun Project.configureNativeTarget(hostPreset: KotlinNativeTargetPreset) {
|
private fun Project.configureNativeTarget(hostPreset: KotlinNativeTargetPreset) {
|
||||||
kotlin.targetFromPreset(hostPreset, NATIVE_TARGET_NAME) {
|
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)) {
|
binaries.executable(NATIVE_EXECUTABLE_NAME, listOf(RELEASE)) {
|
||||||
if (HostManager.hostIsMingw) {
|
if (HostManager.hostIsMingw) {
|
||||||
linkerOpts.add("-L${mingwPath}/lib")
|
linkerOpts.add("-L${mingwPath}/lib")
|
||||||
|
|||||||
@@ -55,7 +55,8 @@ kotlin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
macosX64("macos") {
|
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 {
|
binaries {
|
||||||
framework(frameworkName, [RELEASE])
|
framework(frameworkName, [RELEASE])
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ kotlin {
|
|||||||
executable(listOf(DEBUG))
|
executable(listOf(DEBUG))
|
||||||
}
|
}
|
||||||
binaries.getTest("DEBUG").apply {
|
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}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ kotlin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
hostTarget.apply {
|
hostTarget.apply {
|
||||||
compilations["main"].kotlinOptions.freeCompilerArgs = listOf("-l", "kotlinx-cli")
|
compilations["main"].enableEndorsedLibs = true
|
||||||
binaries {
|
binaries {
|
||||||
executable {
|
executable {
|
||||||
entryPoint = "sample.csvparser.main"
|
entryPoint = "sample.csvparser.main"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ org.gradle.parallel=true
|
|||||||
|
|
||||||
# Pin Kotlin version:
|
# Pin Kotlin version:
|
||||||
# CHANGE_VERSION_WITH_RELEASE
|
# CHANGE_VERSION_WITH_RELEASE
|
||||||
kotlin_version=1.3.50
|
kotlin_version=1.3.60-dev-2497
|
||||||
|
|
||||||
# Use custom Kotlin/Native home:
|
# Use custom Kotlin/Native home:
|
||||||
org.jetbrains.kotlin.native.home=../../dist
|
org.jetbrains.kotlin.native.home=../../dist
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ kotlin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
compilations["main"].kotlinOptions.freeCompilerArgs = listOf("-l", "kotlinx-cli")
|
compilations["main"].enableEndorsedLibs = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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.
|
// Enable experimental stdlib API used by the sample.
|
||||||
|
|||||||
Reference in New Issue
Block a user