Hi,
I'm trying to use Antenna for building a WTK project with Gradle.
It worked quite fine, I defined the tasks
cBuildToolsAntenna = "${cBuildLibDir}/antenna-bin.jar"
ant {
taskdef( name: 'wtkjad', classname:
'de.pleumann.antenna.WtkJad', classpath: cBuildToolsAntenna )
taskdef( name: "wtkpreprocess", classname:
"de.pleumann.antenna.WtkPreprocess", classpath: cBuildToolsAntenna )
taskdef( name: "wtkbuild", classname:
"de.pleumann.antenna.WtkBuild", classpath: cBuildToolsAntenna )
taskdef( name: "wtkpackage", classname:
"de.pleumann.antenna.WtkPackage", classpath: cBuildToolsAntenna )
taskdef( name: "wtkmakeprc", classname:
"de.pleumann.antenna.WtkMakePrc", classpath: cBuildToolsAntenna )
taskdef( name: "wtkrun", classname:
"de.pleumann.antenna.WtkRun", classpath: cBuildToolsAntenna )
taskdef( name: "wtkpreverify", classname:
"de.pleumann.antenna.WtkPreverify", classpath: cBuildToolsAntenna )
taskdef( name: "wtkobfuscate", classname:
"de.pleumann.antenna.WtkObfuscate", classpath: cBuildToolsAntenna )
}
and used them, for example like this
ant.wtkpreprocess( srcdir: "${cUtilsJmeCompatDir}", destdir:
"${buildDir}/${bver}preprocess",
indent: false, symbols: "${symbols}", encoding: "utf-8" )
Now I'm trying to make the same script downloading this antenna-bin.jar from
a remote repository, and only then defining the tasks.
And I cannot find a way to download the jar file. Note that I'm not using
Java plugin, which makes most of examples useless (they usually add
dependencies to tasks and methods added by a plugin).
My "dependencies" declaration looks like the following:
dependencies {
classpathResolvers.add( new org.apache.ivy.plugins.resolver.SshResolver()
) {
user = 'aaaaaaaa'
userPassword = 'bbbbbbbbbbbb'
addArtifactPattern( uriAndPath )
}
// I am not sure about these two lines
addConfiguration( "antenna" )
antenna ":antenna-bin:1.1.0-beta"
}
And now I'm stuck - I have no idea what to do with it.
What I need now is to command Ivy to download the jar file, and use its
location when defining the tasks.
I've searched all over Gradle/Ivy docs and mailing lists, but cannot find
how to work with Ivy from Gradle directly, and all indirect methods rely on
one of ready plugins, whose I cannot use.
Please help.
Thank you in advance,
Andrew