I have been looking at the samples, specifically the
userguide/artifacts/uploading example.

I changed the myJar task to be of type "Zip", this creates a zip file
in addition to the jar file that is created as part of the java
plugin.

When you run "gradle uploadArchives" you get a repo folder with the
jar and zip files in it.

If however you change the build.gradle file from:

artifacts {
    archives myJar
}

to:

configurations {
    fred
}
artifacts {
    fred myJar
}


Deleting the repo folder and running "gradle uploadArchives" uploads
the jar file, but does not upload the zip file.

This is a little strange considering that the ivy.xml file created
lists these publications even though there is no resouceZip-1.0-zip
file?

<publications>
    <artifact name="uploading" type="jar" ext="jar" conf="archives"/>
    <artifact name="resourceZip" type="zip" ext="zip" conf="fred"/>
</publications>

I have tried executing "gradle uploadFred", but that produces nothing
in the repo folder.

Is this a bug? Is there something that has to be configured to upload
the zip file?

-Mike

My full build.gradle:


apply plugin: 'java'

version = 1.0
group = "myOrg"

task myJar(type: Zip) {
    baseName = 'resourceZip'
    from sourceSets.main.resources
}

configurations {
    fred
}
artifacts {
    fred myJar
//    archives myJar
}

repositories {
    flatDir(name: 'fileRepo', dirs: "$projectDir/repo")
}

uploadArchives {
    uploadDescriptor = true
    repositories {
        add project.repositories.fileRepo
    }
}

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

    http://xircles.codehaus.org/manage_email


Reply via email to