Russel Winder wrote:
I have found that by having a settings.gradle of:


        def coberturaPluginHome = new File ( System.properties.'user.home' + 
'/lib/Java/gradleCoberturaPlugin' )
def jarDirectory = new File ( coberturaPluginHome , 'jar' )
        def libDirectory = new File ( coberturaPluginHome , 'lib' )
def pluginJar = jarDirectory.listFiles ( [ accept : { File dir , String name -> ( name =~ '\\.jar$' ).find ( ) } ] as FilenameFilter ) as List
        def dependenciesJars = libDirectory.listFiles ( [ accept : { File dir , 
String name -> ( name =~ '\\.jar$' ).find ( ) } ] as FilenameFilter ) as List
def getVersionNumberOfJar ( list , root ) {
          def jarName = list.find { File file -> ( file.name =~ ( root + 
'-[0-9].*.jar$' ) ).find ( ) }
          def matcher = jarName =~ ( '.*' + root + /-(.*)\.jar/ )
          return matcher ? matcher[0][1] : null
        }
def makeDependencyPattern ( list , root ) { ':' + root + ':' + getVersionNumberOfJar ( list , root ) } addFlatDirResolver ( 'CoberturaPlugin' , jarDirectory )
        dependencies ( makeDependencyPattern ( pluginJar , 
'gradle-cobertura-plugin' ) )
addFlatDirResolver ( 'CoberturaPluginDependencies' , libDirectory )
        dependencies ( [
                        makeDependencyPattern ( dependenciesJars , 'log4j' ) ,
                        makeDependencyPattern ( dependenciesJars , 
'jakarta-oro' ) ,
                        makeDependencyPattern ( dependenciesJars , 'cobertura' 
) ,
                        ] )
The Cobertura Plugin starts.  So I think the basic Gradle stuff is now
done.  However things are still not working, but I think this is a
Cobertura Plugin issue -- or possible a weird classpath issue:


        |> gradle -DuseCobertura=true test -C rebuild
        :init
        :resources
        :compile
        :testResources
        :testCompile
        :cbInstrument
        ##teamcity[progressMessage 'Code Coverage Instrumention ...']
Build failed with an exception.
        Run with -s or -d option to get more details. Run with -f option to get 
the full (very verbose) stacktrace.
Build file '/home/users/russel/Repositories/Bazaar/Masters/ADS/build.gradle' Execution failed for task ':cbInstrument'.
        Cause: Found interface org.gradle.api.plugins.Convention, but class was 
expected
BUILD FAILED Total time: 4.789 secs


So which version of Gradle has this type as a class and which as an
interface?


It changed to an interface in trunk about 5 days ago. Everywhere else, it is a class.


Adam


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to