I remember Rene doing something similar:
http://markmail.org/thread/niseybxbjynckr2c#query:+page:1+mid:pgdhc7hrfn2e27o5+state:results

Basically boils down to adding a snippet like:
[code src="build.gradle"]
import org.gradle.api.internal.artifacts.publish.DefaultPublishArtifact

artifacts {
   archives new DefaultPublishArtifact("something", "dll", "dll", null, new
Date(), file("path/to/something.dll"))
}
[/code]

On Mon, May 9, 2011 at 8:09 AM, Magnus Rundberget
<[email protected]>wrote:

>  Hi,
>
> I've searched a bit, but couldn't really find a good/descriptive solution
> on how to solve the following.
>
>
> I have a java project producing a jar. Deploying this to my maven
> repository works a charm.
> However the same project also produces a dll based on the jar (using ikvm).
>
> Now I'm struggling on figuring out how to upload the generated dll to my
> maven repo using gradle.
>
> any suggestions on how to proceed ?
> (see ikvm task below for reference)
>
>
> cheers
> Magnus
>
>
> ---- ikvm task for info ----
> task ikvm(dependsOn: jar) {
>     def ikvmHome = System.getenv()['IKVM_HOME']
>     def ikvmExec = "$ikvmHome/bin/ikvmc.exe"
>     ikvmOutDir = file("$buildDir/ikvm")
>     ikvmTmpDir = file("$buildDir/ikvm/tmp")
>     def ikvmDll = new File(ikvmOutDir, "${project.name}Ikvm.dll")
>
>     inputs.files configurations.compile
>     outputs.files ikvmDll
>
>
>     doFirst {
>         assert ikvmHome, "Du må sette miljoevariable IKVM_HOME til katalog
> hvor ikvm er installert"
>         if (!ikvmOutDir.exists()) {
>             ikvmOutDir.mkdir()
>         }
>         if (!ikvmTmpDir.exists()) {
>             ikvmOutDir.mkdir()
>         }
>     }
>
>     doLast {
>         copy {
>             from configurations.runtime
>             into ikvmTmpDir
>         }
>         new ByteArrayOutputStream().withStream { os ->
>             def result = exec {
>                 commandLine = [ikvmExec, "-out:$ikvmDll", jar.archivePath,
> "-recurse:build/ikvm/tmp/*.jar"]
>                 errorOutput = os
>                 ignoreExitValue = true
>             }
>             if (result.exitValue != 0) {
>                 def outputAsString = os.toString()
>                 println "------ Feil i opprettelse av ikvm dll: $ikvmDll
> -------"
>                 println outputAsString
>                 result.assertNormalExitValue()
>             }
>         }
>     }
> }
> build.dependsOn ikvm
>



-- 
Learn from the past. Live in the present. Plan for the future.
Blog: http://eric-berry.blogspot.com
jEdit <http://www.jedit.org> - Programmer's Text Editor
Bazaar <http://bazaar.canonical.com> - Version Control for Humans

Reply via email to