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)
cheersMagnus
---- 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