I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 23c5710d authored by sponge's avatar sponge
Browse files

Move to newer ASDK and ant, does not compile

parent 52a60b37
No related branches found
No related tags found
No related merge requests found
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.i2p.android.router"
android.versionCode="4208704"
android.versionName="0.8.7-4_b1-API8"
android.versionCode="4718912"
android.versionName="0.9.0-20_b1-API8"
android:installLocation="preferExternal"
>
<uses-permission android:name="android.permission.INTERNET" />
......
File moved
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<project name="imported">
<!--
================================================================================
New I2P rules
================================================================================
-->
<!-- overrides of those in main_rules.xml -->
<target name="-pre-build" depends="findI2PSource, copy-i2p-resources, incrementBuild" >
<!-- aapt messes up when resources are added or deleted, just build every time -->
<delete dir="${gen.absolute.dir}/net" verbose="${verbose}" />
<!-- screw it, do the classes too, until I add the depend class -->
<delete dir="${out.absolute.dir}/classes/net" verbose="${verbose}" />
</target>
<target name="-pre-compile" depends="buildrouter" />
<target name="-post-compile" depends="hackcleanup, jbigi" />
<!-- new rules -->
<target name="findI2PSource" >
<!-- override with i2psrc=path/to/source in local.properties -->
<property name="i2psrc" value="../i2p.i2p" />
<property name="i2pbase" location="${i2psrc}" />
<available file="${i2psrc}" property="i2p.present" />
<fail message="I2P source directory ${i2psrc} was not found. Install it there or set i2psrc=/path/to/source in local.properties" >
<condition>
<not>
<isset property="i2p.present" />
</not>
</condition>
</fail>
<echo message="Using I2P source at ${i2pbase}" />
</target>
<!-- <target name="buildrouter" depends="findI2PSource, -dirs" > -->
<target name="buildrouter" depends="findI2PSource" >
<!-- build router and core -->
<ant dir="${i2pbase}" >
<target name="buildRouter" />
<target name="buildI2PTunnel" />
<target name="buildAddressbook" />
</ant>
<!-- router -->
<copy file="${i2pbase}/build/router.jar" todir="${jar.libs.dir}" />
<!-- core -->
<!-- org.bouncycastle.crypto already in android
but we need a little trickery because our HMac is incompatible...
and the libs aren't in the SDK to compile against??? -->
<jar destfile="${jar.libs.dir}/crypto.jar" >
<zipfileset src="${i2pbase}/build/i2p.jar" >
<include name="org/bouncycastle/crypto/Digest.class" />
<include name="org/bouncycastle/crypto/Mac.class" />
<include name="org/bouncycastle/crypto/digests/GeneralDigest.class" />
<include name="org/bouncycastle/crypto/digests/MD5Digest.class" />
</zipfileset >
</jar>
<!-- lots of unneeded stuff could be deleted here -->
<jar destfile="${jar.libs.dir}/i2p.jar" >
<zipfileset src="${i2pbase}/build/i2p.jar" >
<exclude name="net/i2p/util/LogWriter.class" />
<exclude name="net/i2p/util/SecureDirectory.class" />
<exclude name="net/i2p/util/SecureFile.class" />
<exclude name="net/i2p/util/SecureFileOutputStream.class" />
<exclude name="org/bouncycastle/crypto/Digest.class" />
<exclude name="org/bouncycastle/crypto/Mac.class" />
<exclude name="org/bouncycastle/crypto/digests/GeneralDigest.class" />
<exclude name="org/bouncycastle/crypto/digests/MD5Digest.class" />
</zipfileset >
</jar>
<!-- i2ptunnel -->
<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}" />
<jar destfile="${jar.libs.dir}/i2ptunnel.jar" >
<zipfileset src="${i2pbase}/apps/i2ptunnel/java/build/i2ptunnel.jar" >
<exclude name="net/i2p/i2ptunnel/I2PTunnelGUI.class" />
</zipfileset >
</jar>
<!-- addressbook - make a jar, it's a war in the i2p distro -->
<jar destfile="${jar.libs.dir}/addressbook.jar"
basedir="${i2pbase}/apps/addressbook/build"
excludes="net/i2p/addressbook/Servlet.class" />
</target>
<!-- some resources -->
<!-- <target name="copy-i2p-resources" depends="findI2PSource, -dirs" > -->
<target name="copy-i2p-resources" depends="findI2PSource" >
<copy file="LICENSE.txt" tofile="res/raw/license_app_txt" />
<copy file="licenses/LICENSE-Apache2.0.txt" tofile="res/raw/license_apache20_txt" />
<copy file="${i2pbase}/installer/resources/themes/console/images/i2plogo.png" todir="res/drawable/" />
<copy file="${i2pbase}/installer/resources/themes/console/images/outbound.png" todir="res/drawable/" />
<copy file="${i2pbase}/installer/resources/themes/console/images/inbound.png" todir="res/drawable/" />
<copy file="${i2pbase}/installer/resources/themes/console/light/images/header.png" todir="res/drawable/" />
<copy file="${i2pbase}/installer/resources/themes/console/light/console.css" tofile="res/raw/console_css" />
<copy file="${i2pbase}/installer/resources/blocklist.txt" tofile="res/raw/blocklist_txt" />
<copy file="${i2pbase}/installer/resources/hosts.txt" tofile="res/raw/hosts_txt" />
<copy file="${i2pbase}/licenses/LICENSE-ElGamalDSA.txt" tofile="res/raw/license_elgamaldsa_txt" />
<copy file="${i2pbase}/licenses/LICENSE-SHA256.txt" tofile="res/raw/license_sha256_txt" />
<copy file="${i2pbase}/licenses/LICENSE-BSD.txt" tofile="res/raw/license_bsd_txt" />
<copy file="${i2pbase}/licenses/LICENSE-SNTP.txt" tofile="res/raw/license_sntp_txt" />
<copy file="${i2pbase}/licenses/LICENSE-LGPLv2.1.txt" tofile="res/raw/license_lgplv2_1_txt" />
<copy file="${i2pbase}/licenses/LICENSE-InstallCert.txt" tofile="res/raw/license_installcert_txt" />
<copy file="${i2pbase}/licenses/LICENSE-BlockFile.txt" tofile="res/raw/license_blockfile_txt" />
<copy file="${i2pbase}/licenses/LICENSE-GPLv2.txt" tofile="res/raw/license_gplv2_txt" />
<copy file="${i2pbase}/licenses/LICENSE-GPLv3.txt" tofile="res/raw/license_gplv3_txt" />
<copy file="${i2pbase}/licenses/LICENSE-LGPLv3.txt" tofile="res/raw/license_lgplv3_txt" />
<copy file="${i2pbase}/licenses/LICENSE-Addressbook.txt" tofile="res/raw/license_addressbook_txt" />
</target>
<target name="hackcleanup">
<delete file="${jar.libs.dir}/crypto.jar" />
</target>
<target name="jbigi" depends="findI2PSource" >
<exec executable="sh" osfamily="unix" failonerror="true">
<arg value="-c" />
<arg value="jni/build.sh ${i2pbase}" />
</exec>
<copy file="jni/libjbigi.so" todir="${native.libs.dir}/armeabi" />
</target>
<target name="incrementBuild" depends="findI2PSource" >
<buildnumber file="scripts/build.number" />
<exec executable="sh" osfamily="unix" failonerror="true">
<arg value="-c" />
<arg value="scripts/setversion.sh ${i2pbase}" />
</exec>
<!-- this loads my.version.code and my.version.name -->
<property file="scripts/version.properties" />
</target>
<!-- install now does both -->
<target name="reinstall" depends="install" />
<target name="distclean" depends="clean">
<delete dir="${jar.libs.dir}" verbose="${verbose}" />
<delete file="res/drawable/i2plogo.png" verbose="${verbose}"/>
<delete file="res/drawable/outbound.png" verbose="${verbose}"/>
<delete file="res/drawable/inbound.png" verbose="${verbose}"/>
<delete file="res/drawable/header.png" verbose="${verbose}"/>
<delete file="res/raw/console_css" verbose="${verbose}"/>
<delete file="res/raw/blocklist_txt" verbose="${verbose}" />
<delete file="res/raw/hosts_txt" verbose="${verbose}" />
<delete file="res/raw/license_app_txt" />
<delete file="res/raw/license_apache20_txt" />
<delete file="res/raw/license_elgamaldsa_txt" />
<delete file="res/raw/license_sha256_txt" />
<delete file="res/raw/license_bsd_txt" />
<delete file="res/raw/license_sntp_txt" />
<delete file="res/raw/license_lgplv2_1_txt" />
<delete file="res/raw/license_installcert_txt" />
<delete file="res/raw/license_blockfile_txt" />
<delete file="res/raw/license_gplv2_txt" />
<delete file="res/raw/license_gplv3_txt" />
<delete file="res/raw/license_lgplv3_txt" />
<delete dir="jni/build/" verbose="${verbose}" />
<delete file="scripts/build.number" verbose="${verbose}" />
<delete file="scripts/version.properties" verbose="${verbose}" />
</target>
<!-- just to make it easier -->
<target name="create-signing-keys" >
<echo message="key store is ${key.store}" />
<echo message="key store password is ${key.store.password}" />
<echo message="key alias is ${key.alias}" />
<input message="Enter common name for new key (your name): " addproperty="release.cn" />
<fail message="You must enter a name" >
<condition>
<equals arg1="${release.cn}" arg2="" />
</condition>
</fail>
<input message="Enter password for new key (6 characters minimum): " addproperty="release.password" />
<fail message="You must enter a password" >
<condition>
<equals arg1="${release.password}" arg2="" />
</condition>
</fail>
<echo message="Generating keys, this may take a while..." />
<exec executable="keytool" inputstring="${release.password}${line.separator}${release.password}${line.separator}" osfamily="unix" failonerror="true">
<arg value="-genkey" />
<arg value="-v" />
<arg value="-alias" />
<arg value="${key.alias}" />
<arg value="-keystore" />
<arg value="${key.store}" />
<arg value="-validity" />
<arg value="10000" />
<arg value="-keyalg" />
<arg value="RSA" />
<arg value="-keysize" />
<arg value="4096" />
<arg value="-storepass" />
<arg value="${key.store.password}" />
<arg value="-dname" />
<arg value="cn=${release.cn}, ou=Apps, o=I2P, c=DE" />
</exec>
<echo message="Created keys:" />
<exec executable="keytool" inputstring="android${line.separator}" osfamily="unix" failonerror="true">
<arg value="-list" />
<arg value="-v" />
<arg value="-alias" />
<arg value="${key.alias}" />
<arg value="-keystore" />
<arg value="${key.store}" />
</exec>
<echo message="BACK UP your key store file ${key.store} and your password!" />
</target>
<target name="verifyKeystore" >
<available file="${key.store}" property="keystore.present" />
<fail message="You must first create a keystore and keys with 'ant create-signing-keys'" >
<condition>
<not>
<isset property="keystore.present" />
</not>
</condition>
</fail>
</target>
<target name="verifyWorkspace" >
<echo message="Everything is checked in, right? Let's be sure:" />
<exec executable="mtn" failonerror="true">
<arg value="st" />
</exec>
<echo message="If there are any modified files above, stop now!" />
<echo message="(except AndroidManifest.xml)" />
</target>
<target name="verify" depends="verifyKeystore, verifyWorkspace, release" >
<exec executable="jarsigner" osfamily="unix" failonerror="true">
<arg value="-verify" />
<arg value="-verbose" />
<arg value="-certs" />
<arg value="${out.release.file}" />
</exec>
<echo message="" />
<echo message="Release file is ${out.release.file}" />
<echo message="Android version name: ${my.version.name}" />
<echo message="Android version code: ${my.version.code}" />
<echo message="File size:" />
<exec executable="ls" failonerror="true">
<arg value="-l" />
<arg value="${out.release.file}" />
</exec>
<echo message="SHA256 sum:" />
<exec executable="sha256sum" failonerror="true">
<arg value="${out.release.file}" />
</exec>
<echo message="Don't forget to mtn ci AndroidManifest.xml" />
<echo message="Don't forget to mtn tag w: android-${my.version.name}" />
<copy file="${out.release.file}" tofile="I2PAndroid-${my.version.name}.apk" />
<echo message="Release file copied to I2PAndroid-${my.version.name}.apk" />
</target>
<!--
================================================================================
From here down copied from SDK tools/ant/main_rules.xml from Tools version 11
and then modified
================================================================================
-->
<!-- not necessary to copy if setup import="true" -->
<!--
override this because the ant task com.android.ant.AaptExecLoopTask has issues:
a) it uses version.code which main_rules sets to "" and
b) it can't set versionName via the aapt task, have to use the aapt command line
-->
<!-- Puts the project's resources into the output package file
This actually can create multiple resource package in case
Some custom apk with specific configuration have been
declared in default.properties.
-->
<target name="-package-resources">
<echo>Packaging resources</echo>
<exec executable="${aapt}" failonerror="true" >
<arg value="package" />
<arg value="--version-code" />
<arg value="${my.version.code}" />
<arg value="--version-name" />
<arg value="${my.version.name}" />
<arg value="-f" />
<arg value="-m" />
<arg value="-M" />
<arg value="AndroidManifest.xml" />
<arg value="-I" />
<arg value="${android.jar}" />
<arg value="-S" />
<arg value="${resource.absolute.dir}" />
<arg value="-J" />
<arg value="${gen.absolute.dir}" />
<arg value="-F" />
<arg value="${out.absolute.dir}/${resource.package.file.name}" />
</exec>
</target>
</project>
......@@ -5,7 +5,16 @@
# uncomment to skip
# exit 0
THISDIR=$(realpath $(dirname $(which $0)))
#
# No, no no, 'realpath' is not standard unix or coreutils.
#
# Use of 'which' is pretty bad too. Since 'which' would hit anything
# with the same filename that is +x in the path, and we don't want to do that,
# we use $0 as-is, because it contains _exactly_ what we are looking for.
#
#THISDIR=$(realpath $(dirname $(which $0)))
THISDIR=$(dirname $(readlink -f $0))
cd $THISDIR
LIBFILE=$PWD/libjbigi.so
......@@ -17,7 +26,14 @@ then
fi
I2PBASE=${1:-../../i2p.i2p}
export NDK=$(realpath ../../android-ndk-r5b/)
#
# Wrong again. We want to be able to not have to update this script
# every time a new NDK comes out. We solve this by using readlink with
# a wild card, deglobbing automatically sorts to get the highest revision.
# the dot at the end ensures that it is a directory, and not a file.
#
#export NDK=$(realpath ../../android-ndk-r5b/)
export NDK=readlink -ne $(for last in ../../android-ndk-r*/.; do true; done ; echo $last)
#
# API level, must match that in ../AndroidManifest.xml
......
# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
File moved
......@@ -2,7 +2,17 @@
# Get the version number and fix up AndroidManifest.xml
# Public domain
#
THISDIR=$(realpath $(dirname $(which $0)))
#
# No, no no, 'realpath' is not standard unix or coreutils.
#
# Use of 'which' is pretty bad too. Since 'which' would hit anything
# with the same filename that is +x in the path, and we don't want to do that,
# we use $0 as-is, because it contains _exactly_ what we are looking for.
#
#THISDIR=$(realpath $(dirname $(which $0)))
THISDIR=$(dirname $(readlink -ne $0))
cd $THISDIR
MANIFEST=../AndroidManifest.xml
TMP=AndroidManifest.xml.tmp
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment