Merge pull request #292 from willis7/master

Fix bug introduced with #282
This commit is contained in:
Jeremy Long
2015-07-28 06:07:48 -04:00
4 changed files with 75 additions and 3 deletions

View File

@@ -27,10 +27,10 @@ buildscript {
classpath "com.gradle.publish:plugin-publish-plugin:0.9.0"
}
}
/*
plugins {
id 'nu.studer.plugindev' version '1.0.3'
}
}*/
apply plugin: 'idea'
apply plugin: 'groovy'
@@ -62,3 +62,20 @@ apply from: 'conf/publish/local.gradle'
//apply from: 'conf/publish/maven.gradle'
apply from: 'conf/publish/gradlePluginsPortal.gradle'
//apply from: 'conf/publish/bintray.gradle' // according to the documentation of plugindev, this line has to be placed and the very end of the build file
sourceSets {
integTest {
groovy.srcDir file('src/integTest/groovy')
resources.srcDir file('src/integTest/resources')
compileClasspath = sourceSets.main.output + configurations.testRuntime
runtimeClasspath = output + compileClasspath
}
}
task integTest(type: Test) {
group = 'verification'
testClassesDir = sourceSets.integTest.output.classesDir
classpath = sourceSets.integTest.runtimeClasspath
reports.html.destination = file("$buildDir/reports/integ")
jvmArgs '-XX:MaxPermSize=256m'
}

View File

@@ -0,0 +1,34 @@
package com.tools.security.plugin
import nebula.test.IntegrationSpec
import nebula.test.functional.ExecutionResult
/**
* @author Sion Williams
*/
class DependencyCheckGradlePluginIntegSpec extends IntegrationSpec {
def "I can add the plugin to a build with no errors"() {
setup:
buildFile << '''
apply plugin: 'dependency-check'
'''.stripIndent()
when:
ExecutionResult result = runTasksSuccessfully('tasks')
then:
result.standardOutput.contains('dependencyCheck - Produce dependency security report.')
}
def "I can override outputDir with extension"() {
setup:
writeHelloWorld('com.example')
copyResources('outputDir.gradle', 'build.gradle')
when:
runTasksSuccessfully('dependencyCheck')
then:
fileExists('build/dependencyCheckReport')
}
}

View File

@@ -0,0 +1,21 @@
/**
* Build file to exercise dependency check
* @author Sion Williams
*/
apply plugin: 'java'
apply plugin: 'dependency-check'
sourceCompatibility = 1.5
version = '1.0'
repositories {
mavenCentral()
}
dependencies {
compile group: 'commons-collections', name: 'commons-collections', version: '3.2'
}
dependencyCheck {
outputDirectory = "${buildDir}/dependencyCheckReport"
}

View File

@@ -100,7 +100,7 @@ class DependencyCheckTask extends DefaultTask {
}
def generateReportDirectory(String currentProjectName) {
"${outputDirectory}/${currentProjectName}"
"${getOutputDirectory()}/${currentProjectName}"
}
def overrideProxySetting() {