Safer access to runTask in samples.
This commit is contained in:
committed by
Ilya Matveev
parent
16a8fdcf4e
commit
e89fefca8c
@@ -10,7 +10,7 @@ kotlin {
|
|||||||
binaries {
|
binaries {
|
||||||
executable() {
|
executable() {
|
||||||
entryPoint = 'sample.csvparser.main'
|
entryPoint = 'sample.csvparser.main'
|
||||||
runTask.args './European_Mammals_Red_List_Nov_2009.csv', 4, 100
|
runTask?.args './European_Mammals_Red_List_Nov_2009.csv', 4, 100
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ kotlin {
|
|||||||
if (presets.mingwX64 == hostPreset) {
|
if (presets.mingwX64 == hostPreset) {
|
||||||
// Add lib path to `libcurl` and its dependencies:
|
// Add lib path to `libcurl` and its dependencies:
|
||||||
linkerOpts += ["-L${MPPTools.mingwPath()}/lib".toString()]
|
linkerOpts += ["-L${MPPTools.mingwPath()}/lib".toString()]
|
||||||
runTask.environment('PATH': "${MPPTools.mingwPath()}/bin".toString())
|
runTask?.environment('PATH': "${MPPTools.mingwPath()}/bin".toString())
|
||||||
}
|
}
|
||||||
runTask.args('https://www.jetbrains.com/')
|
runTask?.args('https://www.jetbrains.com/')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ kotlin {
|
|||||||
binaries {
|
binaries {
|
||||||
executable() {
|
executable() {
|
||||||
entryPoint = 'sample.echoserver.main'
|
entryPoint = 'sample.echoserver.main'
|
||||||
runTask.args(3000)
|
runTask?.args(3000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ kotlin {
|
|||||||
entryPoint = 'sample.gitchurn.main'
|
entryPoint = 'sample.gitchurn.main'
|
||||||
if (presets.mingwX64 == hostPreset) {
|
if (presets.mingwX64 == hostPreset) {
|
||||||
linkerOpts = ["-L${MPPTools.mingwPath()}/lib".toString()]
|
linkerOpts = ["-L${MPPTools.mingwPath()}/lib".toString()]
|
||||||
runTask.environment('PATH', "${MPPTools.mingwPath()}/bin".toString())
|
runTask?.environment('PATH', "${MPPTools.mingwPath()}/bin".toString())
|
||||||
}
|
}
|
||||||
runTask.args(project.getRootProject().getRootDir().toString() + '/..')
|
runTask?.args(project.getRootProject().getRootDir().toString() + '/..')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
compilations.main.cinterops {
|
compilations.main.cinterops {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ kotlin {
|
|||||||
entryPoint = 'sample.gtk.main'
|
entryPoint = 'sample.gtk.main'
|
||||||
if (presets.mingwX64 == hostPreset) {
|
if (presets.mingwX64 == hostPreset) {
|
||||||
linkerOpts += ["-L${MPPTools.mingwPath()}/lib".toString()]
|
linkerOpts += ["-L${MPPTools.mingwPath()}/lib".toString()]
|
||||||
runTask.environment('PATH', "${MPPTools.mingwPath()}/bin".toString())
|
runTask?.environment('PATH', "${MPPTools.mingwPath()}/bin".toString())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ kotlin {
|
|||||||
binaries {
|
binaries {
|
||||||
executable() {
|
executable() {
|
||||||
entryPoint = 'sample.nbechoserver.main'
|
entryPoint = 'sample.nbechoserver.main'
|
||||||
runTask.args(3000)
|
runTask?.args(3000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ kotlin {
|
|||||||
executable() {
|
executable() {
|
||||||
entryPoint = 'sample.tensorflow.main'
|
entryPoint = 'sample.tensorflow.main'
|
||||||
linkerOpts += ["-L$tensorflowHome/lib".toString(), '-ltensorflow']
|
linkerOpts += ["-L$tensorflowHome/lib".toString(), '-ltensorflow']
|
||||||
runTask.environment('LD_LIBRARY_PATH', "$tensorflowHome/lib".toString())
|
runTask?.environment('LD_LIBRARY_PATH', "$tensorflowHome/lib".toString())
|
||||||
runTask.environment('DYLD_LIBRARY_PATH', "$tensorflowHome/lib".toString())
|
runTask?.environment('DYLD_LIBRARY_PATH', "$tensorflowHome/lib".toString())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
compilations.main.cinterops {
|
compilations.main.cinterops {
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ kotlin {
|
|||||||
linkerOpts += ['-lSDL2']
|
linkerOpts += ['-lSDL2']
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
runTask.workingDir(project.provider {
|
runTask?.workingDir(project.provider {
|
||||||
kotlin.targets.tetris.binaries.getExecutable(buildType).outputDirectory
|
kotlin.targets.tetris.binaries.getExecutable(buildType).outputDirectory
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ kotlin {
|
|||||||
executable() {
|
executable() {
|
||||||
entryPoint = 'sample.torch.main'
|
entryPoint = 'sample.torch.main'
|
||||||
linkerOpts += ["-L$torchHome/lib".toString(), '-lATen']
|
linkerOpts += ["-L$torchHome/lib".toString(), '-lATen']
|
||||||
runTask.dependsOn 'downloadMNIST'
|
runTask?.dependsOn 'downloadMNIST'
|
||||||
runTask.environment('LD_LIBRARY_PATH', "$torchHome/lib".toString())
|
runTask?.environment('LD_LIBRARY_PATH', "$torchHome/lib".toString())
|
||||||
runTask.environment('DYLD_LIBRARY_PATH', "$torchHome/lib".toString())
|
runTask?.environment('DYLD_LIBRARY_PATH', "$torchHome/lib".toString())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
compilations.main.cinterops {
|
compilations.main.cinterops {
|
||||||
|
|||||||
Reference in New Issue
Block a user