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