| defaultTasks 'build' |
| |
| ext { |
| // Shared path roots |
| REPO_DIR = file('../../../../../../..') |
| TOOLS_DIR = file("$REPO_DIR/tools") |
| ROOT_DIR = file("$TOOLS_DIR/gpu") |
| GO_SRC_DIR = file("$ROOT_DIR/src") |
| GO_BIN_DIR = file("$ROOT_DIR/bin") |
| DEPS_DIR = file("$ROOT_DIR/deps") |
| GPU_SDK_DIR = file("$ROOT_DIR/sdk") |
| |
| // Go package names |
| GPU_MODULE = 'android.googlesource.com/platform/tools/gpu' |
| |
| // Full project file globs |
| allGoFiles = fileTree(dir:'.', include: '**/*.go', exclude: ['cc', '**/*_binary*.go']) |
| allBinaryFiles = fileTree(dir:'.', include: '**/*_binary*.go', exclude: ['cc']) |
| |
| // Shortcut path building functions |
| bin = {String name -> new File(GO_BIN_DIR, name) } |
| } |
| |
| // Standard lifecycle rules |
| apply plugin: 'base' |
| |
| // Set up all the build directories to be in a separate parallel tree |
| buildDir = file("$ROOT_DIR/build") |
| subprojects { |
| buildDir = file("${parent.buildDir}/${name}") |
| } |
| |
| if (project.hasProperty('PrintCommands')) { |
| allprojects { |
| tasks.withType(Exec) { |
| doFirst { |
| println commandLine |
| } |
| } |
| } |
| } |