mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-01-24 01:35:44 +07:00
Created :core:generateSources gradle task
:core:generateSources calls :core:createFlatBuffers :core:createFlatBuffers will only error out if not up-to-date on non-windows :core:compileJava depends on :core:generateSources
This commit is contained in:
parent
f81198781d
commit
85780c6ba8
@ -92,11 +92,18 @@ flatbuffers {
|
||||
|
||||
task createFlatBuffers(type: FlatBuffers) {
|
||||
doFirst {
|
||||
if (OperatingSystem.current() != OperatingSystem.WINDOWS) {
|
||||
throw new GradleException("'flatc' can only run on Windows")
|
||||
if (!state.upToDate && OperatingSystem.current() != OperatingSystem.WINDOWS) {
|
||||
throw new GradleException("'$name' can only run on $OperatingSystem.WINDOWS")
|
||||
}
|
||||
}
|
||||
|
||||
inputDir = flatbuffersSourceDirs
|
||||
outputDir = generatedSourceDirs
|
||||
}
|
||||
|
||||
task generateSources {
|
||||
outputs.dir project.ext.flatbuffersSourceDirs
|
||||
}
|
||||
|
||||
generateSources.dependsOn 'createFlatBuffers'
|
||||
compileJava.dependsOn 'generateSources'
|
||||
|
Loading…
Reference in New Issue
Block a user