forked from pEp.foundation/libpEpTransport
Kotlin: DPE-62 Check if OS is Windows and run relevant commands in each case.
parent
b571d3cd23
commit
c97a48e8fa
|
@ -1,3 +1,4 @@
|
|||
import org.gradle.internal.os.OperatingSystem
|
||||
|
||||
plugins {
|
||||
id 'org.jetbrains.kotlin.jvm' version '1.5.0'
|
||||
|
@ -37,19 +38,29 @@ dependencies {
|
|||
|
||||
task cleanSrc() {
|
||||
description = "make clean"
|
||||
exec{
|
||||
def command = ['make', 'clean']
|
||||
workingDir "../../src"
|
||||
commandLine command
|
||||
if (!OperatingSystem.current().isWindows()) {
|
||||
exec {
|
||||
def command = ['make', 'clean']
|
||||
workingDir "../../src"
|
||||
commandLine command
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task makeSrc(dependsOn: 'cleanSrc') {
|
||||
description = "make src"
|
||||
exec{
|
||||
def command = ['make', 'all']
|
||||
workingDir "../../src"
|
||||
commandLine command
|
||||
if (OperatingSystem.current().isWindows()) {
|
||||
exec {
|
||||
def command = ['cmd', '/c', 'generate_code.cmd']
|
||||
workingDir "../../build-windows"
|
||||
commandLine command
|
||||
}
|
||||
} else {
|
||||
exec {
|
||||
def command = ['make', 'all']
|
||||
workingDir "../../src"
|
||||
commandLine command
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue