You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafu.apache.org by ey...@apache.org on 2017/11/30 14:05:33 UTC

incubator-datafu git commit: DATAFU-118 Edited rootproject's build.gradle to make all the assemble tasks depend on the rat task and added a check for the same.

Repository: incubator-datafu
Updated Branches:
  refs/heads/master be116404b -> 4a3e83cb9


DATAFU-118 Edited rootproject's build.gradle to make all the assemble tasks depend on the rat task and added a check for the same.

Signed-off-by: Eyal Allweil <ey...@apache.org>


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

Branch: refs/heads/master
Commit: 4a3e83cb963978425b975a4ff7e6895b748c0e20
Parents: be11640
Author: Piyush Sharma <ps...@gmail.com>
Authored: Thu Mar 2 03:59:55 2017 +0530
Committer: Eyal Allweil <ey...@apache.org>
Committed: Thu Nov 30 16:05:05 2017 +0200

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


http://git-wip-us.apache.org/repos/asf/incubator-datafu/blob/4a3e83cb/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index fc2ec6c..a5a6fa0 100644
--- a/build.gradle
+++ b/build.gradle
@@ -42,6 +42,11 @@ apply from: file("gradle/dependency-versions.gradle")
 apply from: file("gradle/release.gradle")
 apply from: file("gradle/rat.gradle")
 
+// make the rat task run automatically along with the assemble tasks
+allprojects{
+  tasks.assemble.dependsOn ':rat'
+}
+
 rat {
   excludes = [
     '**/.git/**',
@@ -95,6 +100,17 @@ apply plugin: 'com.fizzpod.sweeney'
 sweeney {
   // Must use JDK 1.7
   enforce type: "equal", expect: "1.7", value: {System.getProperty('java.version').substring(0,3)}
+
+  // Ensure the assemble tasks depend on the rat task
+  def flag = true
+  project.allprojects.tasks.each{taskset->
+    taskset.each{task->
+      if(task.name.equals("assemble")){
+        flag = flag && task.getTaskDependencies().getDependencies().contains(tasks.rat)
+      }
+    }
+  }
+  enforce type: "bool", value: {flag}
 }
 
 allprojects {