From 79c5b9b44d1ff28f4a71cdbc0180118a33175d44 Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Thu, 9 Oct 2014 13:43:04 +0200 Subject: cve Check for each projects --- build.gradle | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'build.gradle') diff --git a/build.gradle b/build.gradle index 67ad2f6e..a29130bd 100644 --- a/build.gradle +++ b/build.gradle @@ -50,14 +50,14 @@ subprojects { configurations { deployerJars + cveCheck } repositories { mavenCentral() } dependencies { testCompile 'junit:junit:4.8.2' - //to use WebDav protocol on upload - //deployerJars 'org.apache.maven.wagon:wagon-webdav:1.0-beta-2' + cveCheck 'org.owasp:dependency-check-ant:1.2.5' } sourceCompatibility = 1.6 @@ -79,9 +79,33 @@ subprojects { from configurations.runtime into (new File(rootDir, 'build/alldependencies')).toString() } + + task copyDepsLocal(type: Copy) { + from configurations.runtime + into 'build/alldependencies' + } rootProject.checkCVE.dependsOn copyDeps + task checkCVELocal << { + // Redefine checkCVEAnt Ant task, with the classpath property set to our newly defined + // cveCheck configuration classpath. + ant.taskdef(name: 'checkCVEAnt', classname: 'org.owasp.dependencycheck.taskdefs.DependencyCheckTask', + classpath: configurations.cveCheck.asPath) + + // executing checkCVEAnt Task + ant.checkCVEAnt( + applicationname: project.name, + reportoutputdirectory: (new File(rootDir, 'releases/' + version + '/cvecheck/' + project.name)).toString(), + reportformat: "ALL") { + fileset(dir: 'build/alldependencies') { + include(name: '**/**') + } + } + } + checkCVELocal.dependsOn copyDepsLocal + + uploadArchives { repositories.mavenDeployer { repository(url: project.releaseRepoUrl) -- cgit v1.2.3