Samples: Enable experimental standard library API

This commit is contained in:
Ilya Matveev
2019-05-31 19:41:25 +03:00
committed by Ilya Matveev
parent 90decbf517
commit 3329f74c27
5 changed files with 19 additions and 4 deletions
+6 -1
View File
@@ -4,7 +4,7 @@ plugins {
kotlin("multiplatform") kotlin("multiplatform")
} }
// Add two additional presets for Raspberry Pi. // Add two additional presets for Raspberry Pi and Linux/ARM64.
val raspberryPiPresets: List<KotlinNativeTargetPreset> = listOf("linuxArm32Hfp", "linuxArm64").map { val raspberryPiPresets: List<KotlinNativeTargetPreset> = listOf("linuxArm32Hfp", "linuxArm64").map {
kotlin.presets[it] as KotlinNativeTargetPreset kotlin.presets[it] as KotlinNativeTargetPreset
} }
@@ -44,4 +44,9 @@ kotlin {
getByName(mainSourceSetName).dependsOn(echoServerMain) getByName(mainSourceSetName).dependsOn(echoServerMain)
} }
} }
// Enable experimental stdlib API used by the sample.
sourceSets.all {
languageSettings.useExperimentalAnnotation("kotlin.ExperimentalStdlibApi")
}
} }
+5
View File
@@ -54,4 +54,9 @@ kotlin {
} }
} }
} }
// Enable experimental stdlib API used by the sample.
sourceSets.all {
languageSettings.useExperimentalAnnotation("kotlin.ExperimentalStdlibApi")
}
} }
+1 -1
View File
@@ -34,7 +34,7 @@ kotlin {
} }
compilations["main"].cinterops { compilations["main"].cinterops {
val tensorflow by creating { val tensorflow by creating {
includeDirs(tensorflowHome.resolve("/include")) includeDirs(tensorflowHome.resolve("include"))
} }
} }
} }
+2 -2
View File
@@ -36,8 +36,8 @@ kotlin {
compilations["main"].cinterops { compilations["main"].cinterops {
val torch by creating { val torch by creating {
includeDirs( includeDirs(
torchHome.resolve("/include"), torchHome.resolve("include"),
torchHome.resolve("/include/TH") torchHome.resolve("include/TH")
) )
} }
} }
+5
View File
@@ -46,4 +46,9 @@ kotlin {
} }
} }
} }
// Enable experimental stdlib API used by the sample.
sourceSets.all {
languageSettings.useExperimentalAnnotation("kotlin.ExperimentalStdlibApi")
}
} }