mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-07-05 15:58:38 +07:00
Disable :core:createFlatBuffers task at configuration level if building on non-Windows
Disable :core:createFlatBuffers task at configuration level if building on non-Windows Added warning messages stating that it's been disabled (should add check)
This commit is contained in:
@ -92,8 +92,8 @@ flatbuffers {
|
||||
|
||||
task createFlatBuffers(type: FlatBuffers) {
|
||||
doFirst {
|
||||
if (!state.upToDate && OperatingSystem.current() != OperatingSystem.WINDOWS) {
|
||||
throw new GradleException("'$name' can only run on $OperatingSystem.WINDOWS")
|
||||
if (OperatingSystem.current() != OperatingSystem.WINDOWS) {
|
||||
throw new GradleException("'$name' can only run on Windows")
|
||||
}
|
||||
}
|
||||
|
||||
@ -105,5 +105,10 @@ task generateSources {
|
||||
outputs.dir project.ext.flatbuffersSourceDirs
|
||||
}
|
||||
|
||||
if (OperatingSystem.current() != OperatingSystem.WINDOWS) {
|
||||
logger.warn("Disabling $createFlatBuffers.name because it can only run on Windows")
|
||||
createFlatBuffers.enabled = false
|
||||
}
|
||||
|
||||
generateSources.dependsOn 'createFlatBuffers'
|
||||
compileJava.dependsOn 'generateSources'
|
||||
|
Reference in New Issue
Block a user