-
-
Save astellingwerf/91dd9bcc690f9a3adafa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add a new configuration | |
configurations { | |
fortify { extendsFrom compile } | |
} | |
// pull in the fortify libs for the new configuration | |
dependencies { | |
// fortify 'com.fortify:sourceanalyzer:3.90' // Ideally | |
fortify files('/home/astellin/fortify/HP_Fortify_SCA_and_Apps_4.10/Core/lib/sourceanalyzer.jar') // For now | |
} | |
// the 2 new tasks | |
task fortifyReport << { | |
ant.properties['build.compiler'] = 'com.fortify.dev.ant.SCACompiler' | |
ant.typedef(name: 'sca', classname: 'com.fortify.dev.ant.SourceanalyzerTask', | |
classpath: configurations.fortify.asPath) | |
ant.sca(jdk: "1.7", | |
debug: true, | |
verbose: true, | |
failonerror: true, | |
scan: true, | |
logFile: file("$buildDir/reports/fortify/Fortify.log"), | |
resultsFile: file("$buildDir/reports/fortify/${project.name}.fpr"), | |
classpath: configurations.compile.asPath | |
) { | |
fileset(dir: 'src/java') { | |
include(name: '**/*.java') | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment