2

我正在使用以下代码使用 Gradle 运行 fortify,但是此代码需要时间来生成报告,我不确定如何优化此脚本以更快地运行,如果有人可以帮助我优化此脚本,那就太好了

// Add a new configuration
    configurations {
        fortify { extendsFrom compile }
    }

    // pull in the fortify libs for the new configuration
    dependencies {
        fortify fileTree(dir: 'C:/Program Files/Fortify Software/HP Fortify v3.20/Core/lib', include: '*.jar')
    }

    task fortifyReport(dependsOn: compileJava) << {
        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.6",
        maxHeap:'4096M' ,
        use64bit:true ,
        debug:true ,
        verbose:true ,
        failonerror:true ,
        scan:true ,
        logFile:file("$buildDir/fortify/Fortify.log"),
        resultsFile:file("$buildDir/fortify/abc.fpr")
        ){
           fileset(dir:'com/abc/xyz') {
              include(name:'**/*.java')}
        }
    }
4

0 回答 0