| import org.apache.tools.ant.taskdefs.condition.Os |
| |
| def goPath = System.getenv('GOPATH') |
| def temporaryDirectory = file(goPath+'/pkg/build').absolutePath |
| def outputDirectory = file(goPath+'/bin') |
| |
| def osFamily() { |
| if (Os.isFamily(Os.FAMILY_MAC)) return 'mac' |
| if (Os.isFamily(Os.FAMILY_UNIX)) return 'linux' |
| if (Os.isFamily(Os.FAMILY_WINDOWS)) return 'windows' |
| return null |
| } |
| |
| def nativePlatform() { |
| switch (osFamily()) { |
| case 'mac': return 'osx64' |
| case 'linux': return 'linux64' |
| case 'windows': return 'windows64' |
| } |
| } |
| |
| defaultTasks 'replayd:runTests', 'replayd:installLocal' |
| |
| task all(dependsOn: ['replayd:runTests', 'replayd:installLocal', 'replayd:buildAndroid', |
| 'gfxspy:ndkBuild']) { |
| } |
| |
| // Export fields to the subprojects |
| ext.goPath = goPath |
| ext.temporaryDirectory = temporaryDirectory |
| ext.outputDirectory = outputDirectory |