0.5 -> 0.6 API changes for plugins

View: New views
2 Messages — Rating Filter:   Alert me  

0.5 -> 0.6 API changes for plugins

by Russel Winder-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I just tried compiling the prototype Gradle Cobertura plugin I have
(based on Luk Morbee's work based on Phil Messenger's work) and am now
getting a whole slew of error message I didn't used to get.  Somewhere
along the line something about the API has changed, and I think I must
have missed the memo.

I think the Gradle wiki has good documentation about the 0.5 -> 0.6
change for build.gradle file writers, but is there something similar for
API users?

Thanks.


|> gradle
:init
:processResources
:compile
/home/users/russel/Repositories/Bazaar/Masters/GradleCoberturaPlugin/src/main/java/org/gradle/api/plugins/cobertura/CoberturaPlugin.java:48: cannot find symbol
symbol  : method dependency(java.util.List<java.lang.String>,java.lang.String)
location: interface org.gradle.api.artifacts.dsl.DependencyHandler
    project.getDependencies ( ).dependency ( confs , "net.sourceforge.cobertura:cobertura:1.9.1" ) ;
                               ^
/home/users/russel/Repositories/Bazaar/Masters/GradleCoberturaPlugin/src/main/java/org/gradle/api/plugins/cobertura/CoberturaPlugin.java:55: cannot find symbol
symbol  : method setFork(boolean)
location: class java.lang.Object
    testTask.getOptions ( ).setFork ( true ) ;
                           ^
/home/users/russel/Repositories/Bazaar/Masters/GradleCoberturaPlugin/src/main/java/org/gradle/api/plugins/cobertura/CoberturaPlugin.java:56: cannot find symbol
symbol  : method getForkOptions()
location: class java.lang.Object
    testTask.getOptions ( ).getForkOptions ( ).setForkMode ( ForkMode.PER_TEST ) ;
                           ^
/home/users/russel/Repositories/Bazaar/Masters/GradleCoberturaPlugin/src/main/java/org/gradle/api/plugins/cobertura/CoberturaPlugin.java:57: cannot find symbol
symbol  : method getForkOptions()
location: class java.lang.Object
    testTask.getOptions ( ).getForkOptions ( ).setDir ( project.getProjectDir ( ) ) ;
                           ^
/home/users/russel/Repositories/Bazaar/Masters/GradleCoberturaPlugin/src/main/java/org/gradle/api/plugins/cobertura/CoberturaPlugin.java:63: cannot find symbol
symbol  : variable TEST_COMPILE
location: class org.gradle.api.plugins.JavaPlugin
          final List unmanagedClasspathFromTestCompile = ( (Compile) test.getProject ( ).task ( JavaPlugin.TEST_COMPILE ) ).getUnmanagedClasspath ( ) ;
                                                                                                          ^
/home/users/russel/Repositories/Bazaar/Masters/GradleCoberturaPlugin/src/main/java/org/gradle/api/plugins/cobertura/InstrumentTaskAction.java:65: cannot find symbol
symbol  : variable projectRoot
location: class org.gradle.api.plugins.cobertura.InstrumentTaskAction
                final File copyDir = new File ( projectRoot , getProject ( ).getBuildDir ( ).getName ( ) + File.separator + "classes-copy" ) ;
                                                ^
Note: /home/users/russel/Repositories/Bazaar/Masters/GradleCoberturaPlugin/src/main/java/org/gradle/api/plugins/cobertura/CoberturaPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
6 errors

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/GradleCoberturaPlugin/build.gradle'

Execution failed for task ':compile'.
Cause: Compile failed; see the compiler error output for details.

BUILD FAILED

Total time: 5.154 secs
|>
--
Russel.
============================================================
Dr Russel Winder                 Partner

Concertant LLP          t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road,     f: +44 8700 516 084    voip:  sip:russel.winder@...
London SW11 1EN, UK.    m: +44 7770 465 077    xmpp: russel@...


signature.asc (204 bytes) Download Attachment

Re: 0.5 -> 0.6 API changes for plugins

by Adam Murdoch-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



Russel Winder wrote:

> I just tried compiling the prototype Gradle Cobertura plugin I have
> (based on Luk Morbee's work based on Phil Messenger's work) and am now
> getting a whole slew of error message I didn't used to get.  Somewhere
> along the line something about the API has changed, and I think I must
> have missed the memo.
>
> I think the Gradle wiki has good documentation about the 0.5 -> 0.6
> change for build.gradle file writers, but is there something similar for
> API users?
>
>  

The wiki page has API changes as well (for example, towards the bottom
of the page is a list of the methods changed on the Project interface).
However, it's not complete for every API change. But, it is a wiki page,
so people can contribute stuff as they run into problems.


Adam


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

    http://xircles.codehaus.org/manage_email