Gradle Jacoco 플러그 인 제외 설정

공식 적 인 exclude 설정 은 작 동 하지 않 습 니 다.참고:
https://issues.gradle.org/browse/GRADLE-2955
화해시키다
http://stackoverflow.com/questions/29887805/filter-jacoco-coverage-reports-with-gradle
apply plugin: 'java'
apply plugin: 'jacoco'

jacocoTestReport {
    reports {
        xml {
            enabled true // coveralls plugin depends on xml format report
        }

        html {
            enabled true
        }
    }

    afterEvaluate {
        classDirectories = files(classDirectories.files.collect {
            fileTree(dir: it,
                    exclude: ['codeeval/**',
                              'crackingthecode/part3knowledgebased/**',
                              '**/Chapter7ObjectOrientedDesign**',
                              '**/Chapter11Testing**',
                              '**/Chapter12SystemDesignAndMemoryLimits**',
                              'projecteuler/**'])
        })
    }
}

좋은 웹페이지 즐겨찾기