On Oct 6, 2008, at 11:06 PM, Adam Murdoch wrote:
Hans Dockter wrote:
Hi Russel,
On Oct 6, 2008, at 10:44 AM, Russel Winder wrote:
With the Gradle script:
ant.property ( file : 'build.properties' )
type = 'jar'
group = 'org.codehaus.gant'
version = ant.antProject.properties.gantVersion
usePlugin ( 'groovy' )
dependencies {
addMavenRepo ( "file://$
{ System.properties.'user.home' }/.m2/repository" )
groovy ( 'org.codehaus.groovy:groovy-all:1.6-beta-2-
SNAPSHOT' )
compile ( 'commons-cli:commons-cli:' +
ant.antProject.properties.commonsCliVersion )
testCompile ( 'junit:junit:' +
ant.antProject.properties.junitVersion )
}
sourceCompatibility = 1.5
targetCompatibility = 1.5
then compilation succeeds (but the tests fail, that is another issue
though).
If however, I move the compatibility specifications above the
usePlugin
specification then I get a javac invocation failure:
this is expected but unintuitive behavior. We want to introduce
name spaces very soon. You then would write:
usePlugin('java')
java.sourceCompatibility = 1.5
...
Then it would be clearer that you first have to introduce the
namespace before you can assign something to it.
Possibly. Another approach - not necessarily incompatible with
namespaces - might be to apply a project's additional properties to
a plugin convention object when the convention object is added.
This would also allow the convention properties to be overridden
from the command-line.
Good idea.
Sidetopic: Are you in favor of namespaces for plugins?
- Hans
--
Hans Dockter
Gradle Project lead
http://www.gradle.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email