From c254b3e4b859564dc8fc415d4fc85299748eb388 Mon Sep 17 00:00:00 2001
From: Nils Christian Ehmke <nie@informatik.uni-kiel.de>
Date: Fri, 6 Feb 2015 14:40:38 +0100
Subject: [PATCH] Added CPD as quality tool

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

diff --git a/build.gradle b/build.gradle
index 32d2106e..833e13d6 100644
--- a/build.gradle
+++ b/build.gradle
@@ -13,6 +13,16 @@ repositories {
 	maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' } 
 }
 
+buildscript {
+	repositories {
+		mavenCentral()
+	}
+
+	dependencies {
+		classpath 'de.aaschmid.gradle.plugins:gradle-cpd-plugin:0.1'
+	}
+}
+
 configurations { 
 	windowsX86Runtime
 	windowsX64Runtime
@@ -53,6 +63,13 @@ pmd {
 	ruleSetFiles = files('config/pmd/ruleset.xml')
 }
 
+apply plugin: 'cpd'
+tasks.cpd {
+	source = sourceSets.main.allJava
+  
+	reports.xml.destination = file('build/reports/cpd/cpd.xml')
+}
+
 apply plugin: 'checkstyle'
 checkstyle {
 	ignoreFailures = true
-- 
GitLab