Fixed client building (thanks alkemist from Freenode#gradle)
This commit is contained in:
@ -1,33 +1,34 @@
|
|||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
|
|
||||||
task buildJars(type: Exec) {
|
|
||||||
outputs.dir('libs')
|
|
||||||
commandLine 'ant', 'buildrouter'
|
|
||||||
}
|
|
||||||
compileJava.dependsOn buildJars
|
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
client
|
client
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
configurations.default.extendsFrom configurations.client
|
||||||
'default' configurations.client
|
|
||||||
|
task buildClient(type: Exec) {
|
||||||
|
outputs.dir('libs')
|
||||||
|
commandLine 'ant', 'buildclient'
|
||||||
|
}
|
||||||
|
task buildRouter(type: Exec) {
|
||||||
|
outputs.dir('libs')
|
||||||
|
commandLine 'ant', 'buildrouter'
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO an empty routerjars.jar is added to the classpath
|
// TODO an empty routerjars.jar is added to the classpath
|
||||||
|
|
||||||
artifacts {
|
artifacts {
|
||||||
client file('libs/i2p.jar')
|
client file: file('libs/i2p.jar'), builtBy: buildClient
|
||||||
client file('libs/mstreaming.jar')
|
client file: file('libs/mstreaming.jar'), builtBy: buildClient
|
||||||
client file('libs/streaming.jar')
|
client file: file('libs/streaming.jar'), builtBy: buildClient
|
||||||
|
|
||||||
'default' file('libs/router.jar')
|
'default' file: file('libs/router.jar'), builtBy: buildRouter
|
||||||
'default' file('libs/i2ptunnel.jar')
|
'default' file: file('libs/i2ptunnel.jar'), builtBy: buildRouter
|
||||||
'default' file('libs/addressbook.jar')
|
'default' file: file('libs/addressbook.jar'), builtBy: buildRouter
|
||||||
'default' file('libs/BOB.jar')
|
'default' file: file('libs/BOB.jar'), builtBy: buildRouter
|
||||||
}
|
}
|
||||||
|
|
||||||
clean.dependsOn cleanBuildJars
|
clean.dependsOn cleanBuildClient, cleanBuildRouter
|
||||||
|
|
||||||
clean << {
|
clean << {
|
||||||
exec {
|
exec {
|
||||||
|
@ -16,11 +16,17 @@
|
|||||||
</fail>
|
</fail>
|
||||||
<echo message="Using I2P source at ${i2pbase}" />
|
<echo message="Using I2P source at ${i2pbase}" />
|
||||||
|
|
||||||
|
<available property="have.streaming" file="${i2pbase}/build/streaming.jar" />
|
||||||
<available property="have.router" file="${i2pbase}/build/router.jar" />
|
<available property="have.router" file="${i2pbase}/build/router.jar" />
|
||||||
<available property="have.bob" file="${i2pbase}/apps/BOB/dist/BOB.jar" />
|
<available property="have.bob" file="${i2pbase}/apps/BOB/dist/BOB.jar" />
|
||||||
<available property="have.i2ptunnel" file="${i2pbase}/apps/i2ptunnel/java/build/i2ptunnel.jar" />
|
<available property="have.i2ptunnel" file="${i2pbase}/apps/i2ptunnel/java/build/i2ptunnel.jar" />
|
||||||
<available property="have.addressbook" file="${i2pbase}/apps/addressbook/dist/addressbook.jar" />
|
<available property="have.addressbook" file="${i2pbase}/apps/addressbook/dist/addressbook.jar" />
|
||||||
|
|
||||||
|
<!-- builds core, ministreaming and streaming -->
|
||||||
|
<target name="buildStreaming" unless="have.streaming">
|
||||||
|
<ant dir="${i2pbase}" inheritall="false" useNativeBasedir="true" target="buildStreaming" />
|
||||||
|
</target>
|
||||||
|
|
||||||
<target name="buildRouter" unless="have.router">
|
<target name="buildRouter" unless="have.router">
|
||||||
<ant dir="${i2pbase}" inheritall="false" useNativeBasedir="true" target="buildRouter" />
|
<ant dir="${i2pbase}" inheritall="false" useNativeBasedir="true" target="buildRouter" />
|
||||||
</target>
|
</target>
|
||||||
@ -36,15 +42,9 @@
|
|||||||
<ant dir="${i2pbase}" inheritall="false" useNativeBasedir="true" target="buildBOB" />
|
<ant dir="${i2pbase}" inheritall="false" useNativeBasedir="true" target="buildBOB" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="buildrouter" depends="buildRouter, buildI2PTunnelJar, buildAddressbook, buildBOB">
|
<target name="buildclient" depends="buildStreaming">
|
||||||
|
|
||||||
<!-- router -->
|
|
||||||
<copy file="${i2pbase}/build/router.jar" todir="${jar.libs.dir}" />
|
|
||||||
|
|
||||||
<!-- bob -->
|
|
||||||
<copy file="${i2pbase}/apps/BOB/dist/BOB.jar" todir="${jar.libs.dir}" />
|
|
||||||
<!-- core -->
|
<!-- core -->
|
||||||
|
|
||||||
<!-- lots of unneeded stuff could be deleted here -->
|
<!-- lots of unneeded stuff could be deleted here -->
|
||||||
<jar destfile="${jar.libs.dir}/i2p.jar" >
|
<jar destfile="${jar.libs.dir}/i2p.jar" >
|
||||||
<zipfileset src="${i2pbase}/build/i2p.jar" >
|
<zipfileset src="${i2pbase}/build/i2p.jar" >
|
||||||
@ -52,9 +52,18 @@
|
|||||||
</zipfileset>
|
</zipfileset>
|
||||||
</jar>
|
</jar>
|
||||||
|
|
||||||
<!-- i2ptunnel -->
|
<!-- streaming -->
|
||||||
<copy file="${i2pbase}/apps/ministreaming/java/build/mstreaming.jar" todir="${jar.libs.dir}" />
|
<copy file="${i2pbase}/apps/ministreaming/java/build/mstreaming.jar" todir="${jar.libs.dir}" />
|
||||||
<copy file="${i2pbase}/apps/streaming/java/build/streaming.jar" todir="${jar.libs.dir}" />
|
<copy file="${i2pbase}/apps/streaming/java/build/streaming.jar" todir="${jar.libs.dir}" />
|
||||||
|
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="buildrouter" depends="buildRouter, buildI2PTunnelJar, buildAddressbook, buildBOB">
|
||||||
|
|
||||||
|
<!-- router -->
|
||||||
|
<copy file="${i2pbase}/build/router.jar" todir="${jar.libs.dir}" />
|
||||||
|
|
||||||
|
<!-- i2ptunnel -->
|
||||||
<jar destfile="${jar.libs.dir}/i2ptunnel.jar" >
|
<jar destfile="${jar.libs.dir}/i2ptunnel.jar" >
|
||||||
<zipfileset src="${i2pbase}/apps/i2ptunnel/java/build/i2ptunnel.jar" >
|
<zipfileset src="${i2pbase}/apps/i2ptunnel/java/build/i2ptunnel.jar" >
|
||||||
<exclude name="net/i2p/i2ptunnel/I2PTunnelGUI.class" />
|
<exclude name="net/i2p/i2ptunnel/I2PTunnelGUI.class" />
|
||||||
@ -64,6 +73,9 @@
|
|||||||
<!-- addressbook -->
|
<!-- addressbook -->
|
||||||
<copy file="${i2pbase}/apps/addressbook/dist/addressbook.jar" todir="${jar.libs.dir}" />
|
<copy file="${i2pbase}/apps/addressbook/dist/addressbook.jar" todir="${jar.libs.dir}" />
|
||||||
|
|
||||||
|
<!-- bob -->
|
||||||
|
<copy file="${i2pbase}/apps/BOB/dist/BOB.jar" todir="${jar.libs.dir}" />
|
||||||
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="clean">
|
<target name="clean">
|
||||||
|
Reference in New Issue
Block a user