|
Tom Eyckmans wrote: Thank you Adam for the info, I think a Gradle init script would be a better place for these declarations. This would be overloading the .properties file a little too much. dependencies.groovy:<jdk-alias>:<jdk version>=<path to jdk home> => dependencies.groovy:default:1.5.6=/home/teyckmans/bin/groovy-1.5.6 We should try to treat groovy exactly the same way we treat any other library we integrate with. That is, we can go and find it in a repository. I don't see that we need to declare groovy versions anywhere other than the dependencies section of a project. (included the jdk-alias for people who change the jdk itself and may have different setups of the same jdk-version - for none jdk development this is irrelevant I think) and allow it to be used in the build like so: This is a good idea. For the JUnit / TestNG dependencies we need to have some way to have finer control over the resolved dependencies, with this I mean we need to be able to get a list of all the files that represent the JUnit/TestNG dependency so we can use the file paths to create an Ant path so we can do a taskdef with the correct files ( currently I scan the classpath files for a file that starts with testng - not a very nice/safe way of doing it). (This sentence contained way to many 'so we can do's :P). This also applies to our use of groovy. I think the approach is good (ie the library has already been declared in the compile/runtime configurations, so let's just use it from there). We can improve the implementation by, say, providing a way to resolve just a particular module (junit/testng/groovy) from a configuration. With this I think of another dependency on Ant (currently we kinda force the version that ships with Gradle). We could do something similar like the Java/ Groovy JDKs => ant(':default:1.7.1'). But allowing the Ant version to be configured posses another difficulty. The Ant task to execute TestNG is included in the TestNG distribution but the Ant task to execute JUnit is not part of the JUnit distribution but can only be found in ant-junit. I've checked the maven repo and the versions of ant-junit (ends on 1.6.5) published are not the same as ant (ends on 1.7.0) so it is not a 1-1 relation ship. The only decent solution I can think of is, is natively supporting JUnit and not depend on Ant for the execution of the JUnit tests (I think we are planning along this line anyway so that shouldn't be a problem). Strictly speaking ant is a transitive dependency of the application (that is, it is a dependency of the junit/testng/groovy tasks, not a direct dependency of the application). What we should do in our integrations is either assert that the version of ant we will use to run the task (ie the one distributed with Gradle) is compatible with the versions specified by the tasks, or run the task in another classloader with the correct version of ant (which we already do for the groovy compile task) Servlet API I can't really folow how the servlet-api.jar finds its way onto the compile classpath? You declare it in your compile configuration. The jetty plugin provides an implementation of that API at runtime. If this is an issue with the Jetty plugin we might make the dependencies section in the gradle.properties file more generic and make it so that subsections (java, groovy) are handled by some kind of handler that reads the config and makes the java/groovy methods available in the dependencies block. This would make it also possible to add for example a jetty method available in the dependencies block (and by that make the servlet-api that gets on the classpath configurable). I think we should the dynamic java/groovy method stuff anyway would be nice :). When you are writing plugins or tasks (as a library or in your buildSrc project) you need to include the Gradle API in your compile classpath, and you need an implementation in your runtime classpath. In the Hudson Gradle plugin you can configure the available homes of gradle and choose that one that needs to be used by a specific build task (I'm sure you mean something different). A good idea. Tom--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
- [gradle-dev] TestFramework integration & dependency manag... Tom Eyckmans
- Re: [gradle-dev] TestFramework integration & depende... Adam Murdoch
- Re: [gradle-dev] TestFramework integration & dep... Tom Eyckmans
- Re: [gradle-dev] TestFramework integration &... Adam Murdoch
- Re: [gradle-dev] TestFramework integration &... Tom Eyckmans
- Re: [gradle-dev] TestFramework integration &... Hans Dockter
- Re: [gradle-dev] TestFramework integration & dep... Hans Dockter
- Re: [gradle-dev] TestFramework integration &... Adam Murdoch
