You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aurora.apache.org by ma...@apache.org on 2014/01/15 22:37:25 UTC

[02/50] [abbrv] git commit: Generate JS thrift files.

Generate JS thrift files.


Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/e76d2ae0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/e76d2ae0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/e76d2ae0

Branch: refs/heads/mansu/AURORA-4187_scheduler_home_page-no-seed
Commit: e76d2ae06798c0a3b2b48ad3214bbe519463560f
Parents: dd6f5c0
Author: Suman Karumuri <sk...@twitter.com>
Authored: Mon Dec 30 16:19:17 2013 -0800
Committer: Suman Karumuri <sk...@twitter.com>
Committed: Mon Jan 13 15:24:38 2014 -0800

----------------------------------------------------------------------
 build.gradle | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/e76d2ae0/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index b4b055c..92e7753 100644
--- a/build.gradle
+++ b/build.gradle
@@ -20,6 +20,7 @@ buildscript {
 buildDir = 'dist'
 def generatedDir = "$buildDir/generated-src"
 def generatedJavaDir = "$generatedDir/gen-java"
+def generatedJSDir = "$generatedDir/gen-js"
 
 compileJava {
   sourceCompatibility = 1.7
@@ -87,6 +88,7 @@ sourceSets {
     compileClasspath += sourceSets.generated.output
     resources {
       srcDir '3rdparty/javascript'
+      srcDir generatedJSDir
     }
   }
   test {
@@ -201,6 +203,7 @@ task generateSources(dependsOn: 'bootstrapThrift') {
   inputs.file inputFiles
   outputs.dir outputDir
   doFirst {
+    // Generate Java thrift files.
     outputDir.exists() || outputDir.mkdirs()
     inputFiles.each { File file ->
       exec {
@@ -208,6 +211,15 @@ task generateSources(dependsOn: 'bootstrapThrift') {
         args = ['--gen', 'java:hashcode', '-o', outputDir, file]
       }
     }
+
+    // Generate JS thrift files
+    inputFiles.each { File file ->
+      exec {
+          executable = thriftBinary
+          args = ['--gen', 'js', '-o', outputDir, file]
+      }
+    }
+
     // These are the 'root' structs, the tool recursively generates all composed structs.
     // TODO(wfarner): Change codegen tool to generate for all structs in a thrift file.
     ['JobConfiguration', 'Lock', 'ScheduledTask', 'Quota'].each {