0


We are using gradle-cobertura-plugin, and have a main project with lots of subprojects, but have to exclude cobertura for some subprojects. Tried using the following:

project('test-modules:functional-tests') {
   cobertura {
       skip = true
   }
} 

But gradle complains that

Deprecated dynamic property: "skip" on "net.saliman.gradle.plugin.cobertura.CoberturaExtension_Decorated@6e56dd10", value: "true"

What is the way to skip this subproject?

Thanks,
Paddy

Robert Harvey
  • 178,213
  • 47
  • 333
  • 501
Paddy
  • 3,472
  • 5
  • 29
  • 48
  • Is that a warning or an error? – Robert Harvey Oct 24 '13 at 17:20
  • I guess because it says skip is deprecated, it is not skipping the task for that subproject, so that way it is not working and not just a warning that I can ignore - "Creating properties on demand (a.k.a. dynamic properties) has been deprecated and is scheduled to be removed in Gradle 2.0. Please read http://gradle.org/docs/current/dsl/org.gradle.api.plugins.ExtraPropertiesExtension.html for information on the replacement for dynamic properties. Deprecated dynamic property: "skip" on "task ':test-modules:functional-tests:compileJava'", value: "true"." – Paddy Oct 24 '13 at 17:56

1 Answers1

0

the coberbura configuration does not know any skip flag, so you're introducing a new property here, this is what the deprecation warning tries to tell you. I don't know the details about the Cobertura plugin, but you can disable the cobertura task by setting enabled=false

coberturaTask.enabled = false // you have to replace 'coberturaTask' with the correct task name here

cheers,

René

Rene Groeschke
  • 27,999
  • 10
  • 69
  • 78
  • Hi @René, this isn't working, I tried giving like this at the beginning and end of the concerned sub project and also in the root project like "project('subprojectname') { cobertura.enabled = false }" but it does not enforce it – Paddy Oct 25 '13 at 04:18
  • Hi Paddy, can you give me a link to the gradle cobertura plugin you're using? – Rene Groeschke Oct 25 '13 at 06:49
  • Hi @René, I was using an earlier version but upgraded to the latest version available for gradle of the plugin https://github.com/stevesaliman/gradle-cobertura-plugin/ available @ http://mvnrepository.com/artifact/net.saliman/gradle-cobertura-plugin/2.0.0 . I tried giving cobertura.enabled = false individually in the projects to exclude as well as using the "project('subprojectname') { cobertura.enabled = false }" format in root project, but even with this latest version, no luck, it is triggering cobertura for those projects to exclude – Paddy Oct 27 '13 at 05:49