Browse Source

Kotlin: DPE-62 Check if OS is Windows and run relevant commands in each case.

DPE-62
ignaciogarcia 7 months ago
parent
commit
c97a48e8fa
Signed by: Ignacio GPG Key ID: 5E6A455C909DD623
1 changed files with 19 additions and 8 deletions
  1. +19
    -8
      build-gradle/transport/build.gradle

+ 19
- 8
build-gradle/transport/build.gradle View File

@ -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…
Cancel
Save