OK, the first two lines of my build.gradle are:
group = 'edu.sc.seis'
version = '3.0.0beta7'
so I think it should be set before anything else happens. But it is a
multiproject, and I do set some stuff up in the top level build.gradle
I played around with commenting things out, and found that if I
comment out this task definition in the top level build.gradle and run
'gradle jar' in the subproject, then the jar file is named
proj-version.jar, but if I leave it in, it is named proj.jar. Weird!
task newcopyToLib(dependsOn: configurations.default.buildArtifacts,
type: Copy) {
into "$buildDir/output/lib"
from configurations.default
from configurations.default.allArtifacts*.file
}
thanks,
Philip
On Wed, Jun 9, 2010 at 2:53 AM, Adam Murdoch <[email protected]> wrote:
>
>
> On 9/06/10 2:24 AM, Philip Crotwell wrote:
>>
>> Hi
>>
>> I filed a bug report on jar artifacts from the java plugin not
>> including the version number. In other words the default is myproj.jar
>> instead of myproj-1.0.7.jar. See GRADLE-963
>>
>> In the mean time, is there a way to tell the java plugin to name the
>> jar file output to include the version in the name? My read of the
>> documentation seemed to indicate that this should be the way it works,
>> and I was unable to find how to set that as the default name in the
>> user guide.
>>
>> This<name>-<version>.jar convention seems to be a pretty standard
>> java practice, and one I think is very useful and it would be great if
>> it was the default I think.
>>
>
> This is the default. The version should be included in the jar name.
> However, the version is included in the jar name only if a version has been
> specified for the project.
>
> Some reasons why this might not be working:
> - You're not actually setting the version property
> - You're (indirectly) using the jar file name before the version property
> has been set
> - Something's broken in Gradle (or one of the updated dependencies).
>
> How are you setting the project version?
>
>
> --
> Adam Murdoch
> Gradle Developer
> http://www.gradle.org
> CTO, Gradle Inc. - Gradle Training, Support, Consulting
> http://www.gradle.biz
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email