Upload task improvement: auto-fill dependsOn() with configuration information?

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

Upload task improvement: auto-fill dependsOn() with configuration information?

by Steven Devijver-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hey,

Right now there is a redundancy in the typical configuration of the Upload task:

task moduleJar(type: Jar) {
destinationDir = file('build/jar_for_module')
}
artifacts {
archives moduleJar
}
task uploadArchives(type: Upload) {
dependsOn moduleJar
configuration = configurations.archives
repositories {
  flatDir(dirs: dist_dir)
}
}

There's the "archives moduleJar" call and the redundant "dependsOn moduleJar" call. Since the Upload task also requires the Configuration object, is it possible to automatically feed the dependsOn() method?

Thanks

Steven


Re: Upload task improvement: auto-fill dependsOn() with configuration information?

by hdockter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Oct 16, 2009, at 11:11 AM, Steven Devijver wrote:

Hey,

Right now there is a redundancy in the typical configuration of the Upload task:

task moduleJar(type: Jar) {
destinationDir = file('build/jar_for_module')
}
artifacts {
archives moduleJar
} 
task uploadArchives(type: Upload) {
dependsOn moduleJar
configuration = configurations.archives
repositories {
   flatDir(dirs: dist_dir)
}
}

There's the "archives moduleJar" call and the redundant "dependsOn moduleJar" call. Since the Upload task also requires the Configuration object, is it possible to automatically feed the dependsOn() method?

This is the same issue as with the buildDependencies. This should work automatically (and for most of our tasks it does). There is a bug in the Upload task that this does not happen. 

The basic mechanism is that every input property (or getter) that is annotated with the @InputFile(s) property is autowired. We have forgotten to annotate the configuration property in the Upload task. Could you file a Jira?

- Hans

--
Hans Dockter
Gradle Project Manager



Re: Upload task improvement: auto-fill dependsOn() with configuration information?

by Adam Murdoch-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.


Steven Devijver wrote:
Hey,

Right now there is a redundancy in the typical configuration of the Upload task:

task moduleJar(type: Jar) {
destinationDir = file('build/jar_for_module')
}
artifacts {
archives moduleJar
}
task uploadArchives(type: Upload) {
dependsOn moduleJar
configuration = configurations.archives
repositories {
  flatDir(dirs: dist_dir)
}
}

There's the "archives moduleJar" call and the redundant "dependsOn moduleJar" call. Since the Upload task also requires the Configuration object, is it possible to automatically feed the dependsOn() method?


A good idea. This is done in trunk: http://jira.codehaus.org/browse/GRADLE-709


-- 
Adam Murdoch
Gradle Developer
http://www.gradle.org

Re: Upload task improvement: auto-fill dependsOn() with configuration information?

by hdockter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Oct 18, 2009, at 12:29 PM, Hans Dockter wrote:


On Oct 16, 2009, at 11:11 AM, Steven Devijver wrote:

Hey,

Right now there is a redundancy in the typical configuration of the Upload task:

task moduleJar(type: Jar) {
destinationDir = file('build/jar_for_module')
}
artifacts {
archives moduleJar
} 
task uploadArchives(type: Upload) {
dependsOn moduleJar
configuration = configurations.archives
repositories {
   flatDir(dirs: dist_dir)
}
}

There's the "archives moduleJar" call and the redundant "dependsOn moduleJar" call. Since the Upload task also requires the Configuration object, is it possible to automatically feed the dependsOn() method?

This is the same issue as with the buildDependencies. This should work automatically (and for most of our tasks it does). There is a bug in the Upload task that this does not happen. 

The basic mechanism is that every input property (or getter) that is annotated with the @InputFile(s) property is autowired. We have forgotten to annotate the configuration property in the Upload task. Could you file a Jira?

I have written this email in the plan and it got send with a delay. Adam was faster filed a Jira and fixed it already.

- Hans

--
Hans Dockter
Gradle Project Manager