mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-18 07:14:09 +01:00
Merge pull request #292 from willis7/master
Fix bug introduced with #282
This commit is contained in:
@@ -27,10 +27,10 @@ buildscript {
|
|||||||
classpath "com.gradle.publish:plugin-publish-plugin:0.9.0"
|
classpath "com.gradle.publish:plugin-publish-plugin:0.9.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
plugins {
|
plugins {
|
||||||
id 'nu.studer.plugindev' version '1.0.3'
|
id 'nu.studer.plugindev' version '1.0.3'
|
||||||
}
|
}*/
|
||||||
|
|
||||||
apply plugin: 'idea'
|
apply plugin: 'idea'
|
||||||
apply plugin: 'groovy'
|
apply plugin: 'groovy'
|
||||||
@@ -62,3 +62,20 @@ apply from: 'conf/publish/local.gradle'
|
|||||||
//apply from: 'conf/publish/maven.gradle'
|
//apply from: 'conf/publish/maven.gradle'
|
||||||
apply from: 'conf/publish/gradlePluginsPortal.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
|
//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'
|
||||||
|
}
|
||||||
@@ -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')
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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"
|
||||||
|
}
|
||||||
@@ -100,7 +100,7 @@ class DependencyCheckTask extends DefaultTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def generateReportDirectory(String currentProjectName) {
|
def generateReportDirectory(String currentProjectName) {
|
||||||
"${outputDirectory}/${currentProjectName}"
|
"${getOutputDirectory()}/${currentProjectName}"
|
||||||
}
|
}
|
||||||
|
|
||||||
def overrideProxySetting() {
|
def overrideProxySetting() {
|
||||||
|
|||||||
Reference in New Issue
Block a user