bmuschko / gradle-clover-plugin

Gradle plugin for generating a code coverage report using Clover
Apache License 2.0
74 stars 49 forks source link

Grails 3 Project #87

Closed danvega closed 7 years ago

danvega commented 7 years ago

I am trying to use this plugin in a Grails 3 project. These are some of the bits from my build.gradle

buildscript {
    repositories {
        mavenLocal()
        maven { url "https://repo.grails.org/grails/core" }
        jcenter()
    }
    dependencies {
        classpath "org.grails:grails-gradle-plugin:$grailsVersion"
        classpath "com.bertramlabs.plugins:asset-pipeline-gradle:2.8.2"
        classpath 'com.bmuschko:gradle-clover-plugin:2.1.0'
    }
}

apply plugin: 'com.bmuschko.clover'

dependencies {
    compile "org.springframework.boot:spring-boot-starter-logging"
    compile "org.springframework.boot:spring-boot-autoconfigure"
    compile "org.grails:grails-core"
    compile "org.springframework.boot:spring-boot-starter-actuator"
    compile "org.springframework.boot:spring-boot-starter-tomcat"
    compile "org.grails:grails-dependencies"
    compile "org.grails:grails-web-boot"
    compile "org.grails.plugins:cache"
    compile "org.grails.plugins:scaffolding"
    console "org.grails:grails-console"
    profile "org.grails.profiles:web-plugin"
    provided "org.grails:grails-plugin-services"
    provided "org.grails:grails-plugin-domain-class"
    runtime "com.bertramlabs.plugins:asset-pipeline-grails:2.8.2"
    testCompile "org.grails:grails-plugin-testing"
    testCompile "org.grails.plugins:geb"
    testRuntime "org.seleniumhq.selenium:selenium-htmlunit-driver:2.47.1"
    testRuntime "net.sourceforge.htmlunit:htmlunit:2.18"

    clover 'org.openclover:clover:4.2.0'
}
clover {
    licenseLocation = File.createTempFile('clover', '.license').absolutePath
    targetPercentage = '85%'
}

If I refresh my gradle project I only see a task called cloverAggregateDatabases. If I run that task it looks like it ran but nothing happens.

2:44:02 PM: Executing external task 'cloverAggregateDatabases'...
:compileAstJava NO-SOURCE
:compileAstGroovy NO-SOURCE
:processAstResources NO-SOURCE
:astClasses UP-TO-DATE
:compileJava NO-SOURCE
:configScript UP-TO-DATE
:compileGroovy UP-TO-DATE
:copyAstClasses NO-SOURCE
:assetPluginPackage UP-TO-DATE
:copyCommands NO-SOURCE
:copyTemplates NO-SOURCE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:compileTestJava NO-SOURCE
:compileTestGroovy NO-SOURCE
:processTestResources NO-SOURCE
:testClasses UP-TO-DATE
:test NO-SOURCE
:compileIntegrationTestJava NO-SOURCE
:compileIntegrationTestGroovy NO-SOURCE
:processIntegrationTestResources NO-SOURCE
:integrationTestClasses UP-TO-DATE
:integrationTest NO-SOURCE
:mergeTestReports UP-TO-DATE
:cloverAggregateDatabases

BUILD SUCCESSFUL

Total time: 8.947 secs
2:44:11 PM: External task execution finished 'cloverAggregateDatabases'.

I try and manually run gradle cloverGenerateReport but again it doesn't seem that like that task completed and I don't see any reports anywhere.

:compileAstJava UP-TO-DATE                                                                                         
:compileAstGroovy UP-TO-DATE     
:processAstResources UP-TO-DATE     
:astClasses UP-TO-DATE      
:compileJava UP-TO-DATE      
:configScript UP-TO-DATE      
:compileGroovy UP-TO-DATE                                                                                                      
:copyAstClasses UP-TO-DATE      
:assetPluginPackage UP-TO-DATE      
:copyCommands UP-TO-DATE      
:copyTemplates UP-TO-DATE      
:processResources UP-TO-DATE      
:classes UP-TO-DATE      
:compileTestJava UP-TO-DATE      
:compileTestGroovy UP-TO-DATE      
:processTestResources UP-TO-DATE      
:testClasses UP-TO-DATE      
:test UP-TO-DATE      
:compileIntegrationTestJava UP-TO-DATE      
:compileIntegrationTestGroovy UP-TO-DATE      
:processIntegrationTestResources UP-TO-DATE      
:integrationTestClasses UP-TO-DATE      
:integrationTest UP-TO-DATE      
:mergeTestReports UP-TO-DATE      
:cloverAggregateDatabases                 
:cloverGenerateReport                                                                                                       

BUILD SUCCESSFUL

Total time: 10.833 secs

What am I missing?

Alex-Vol-SV commented 7 years ago

This is currently not working for Grails 3. The issue has been identified and will be fixed soon in milestone 2.1.1.

There is a branch with a preliminary change that corrects the problem. See comments in #75

danvega commented 7 years ago

Awesome! Thank you so much Alex for the reply. Appreciate it!

Alex-Vol-SV commented 7 years ago

Duplicate of #75