diff --git a/custom_rules.xml b/custom_rules.xml index 592d85dddc496aa61e250e617b9a8303134d245c..91a0f6c1559385cf67143b5e709b4d35e525bdd9 100644 --- a/custom_rules.xml +++ b/custom_rules.xml @@ -214,7 +214,7 @@ if (!ok) { /* update version.props */ echo = project.createTask("echo"); - echo.setMessage("Updating file='" + attributes.get("file") + "'\n" + props); + echo.setMessage("(1)Updating file='" + attributes.get("file") + "'\n" + props); echo.perform(); fo = new FileOutputStream(cfg); props.store(fo, "AUTO-GENERATED FILE, DO NOT EDIT!"); @@ -223,7 +223,7 @@ bprops = new Properties(); bprops.setProperty("build.number", "1"); echo = project.createTask("echo"); - echo.setMessage("Updating file='" + attributes.get("buildfile") + "'\n" + bprops); + echo.setMessage("(2)Updating file='" + attributes.get("buildfile") + "'\n" + bprops); echo.perform(); cfg = new File(attributes.get("buildfile")); fo = new FileOutputStream(cfg); @@ -232,7 +232,7 @@ } else { /* just update version.props */ echo = project.createTask("echo"); - echo.setMessage("Updating file='" + attributes.get("file") + "'\n" + props); + echo.setMessage("(3)Updating file='" + attributes.get("file") + "'\n" + props); echo.perform(); fo = new FileOutputStream(cfg); props.store(fo, "AUTO-GENERATED FILE, DO NOT EDIT!"); @@ -275,7 +275,6 @@ ]]> </scriptdef> - <!-- files of interest --> <property name="MANIFESTfilename" value="AndroidManifest.xml" /> @@ -339,15 +338,13 @@ <!-- if the file is not available, create it with the current infos --> <propertyfilechecks file="${allversionsfilename}" condition="${allversionsfilename.present}" propsdata="my.version.name=${zap.full} my.version.code=${zap.vercode} last.CORE=${CORE} last.ROUTERBUILD=${ROUTERBUILD} " - buildfile="${buildversionfile}" + buildfile="${buildversionfilename}" mainxml="${MANIFESTfilename}" libxml="${MANIFESTROUTERfilename}" /> <loadfile srcfile="${allversionsfilename}" property="allversionsfile" encoding="UTF-8"/> <echo message="${allversionsfile}" /> - - <property file="${buildversionfile}" /> <!-- this loads my.version.code and my.version.name, and performs a copy --> <property file="${allversionsfilename}" /> @@ -355,6 +352,17 @@ <property name="version.name" value="${my.version.name}" /> <echo message="version.code '${version.code}', 'version.name '${version.name}', '${my.version.name}'" /> + <!-- If we are missing any jars, we _MUST_ make them ahead of time so + the build does not fail! _HOWEVER_ we must only do this if we are + _BUILDING_! Apache Ant does not allow us to know what target we are + about to run, because the authors believe it is 'evil' and other + nonsense. So for now (so sorry!) we force build it ahead of time + always, no matter what target was selected, until some better way + of resolving this issue apears. + --> + <ant dir="routerjars" inheritall="false" useNativeBasedir="true" > + <target name="buildrouter" /> + </ant> <!-- ================================================================================ New I2P rules @@ -371,7 +379,6 @@ <incbuildnumber file="${buildversionfilename}" /> </target> - <!-- overrides of those in main_rules.xml --> <target name="-pre-build" depends="copy-i2p-resources" > @@ -456,8 +463,12 @@ </target> <target name="distclean" depends="clean"> + <ant dir="routerjars" inheritall="false" useNativeBasedir="true" > + <target name="distclean" /> + </ant> <delete file="scripts/build.number" verbose="${verbose}" /> <delete file="scripts/version.properties" verbose="${verbose}" /> + <delete file="AndroidManifest.xml" verbose="${verbose}" /> </target> <!-- just to make it easier --> diff --git a/routerjars/custom_rules.xml b/routerjars/custom_rules.xml index 5cf60669f64eda6d23ca2166602eff5885b0553f..da50048c8a5dea7cc99541fec371e8943d28c3d4 100644 --- a/routerjars/custom_rules.xml +++ b/routerjars/custom_rules.xml @@ -34,7 +34,6 @@ </target> <target name="-pre-clean"> - <delete dir="${jar.libs.dir}" verbose="${verbose}" /> </target> <!-- new rules --> @@ -94,7 +93,9 @@ </target> <target name="distclean" depends="clean"> + <delete dir="${jar.libs.dir}" verbose="${verbose}" /> <delete dir="jni/build/" verbose="${verbose}" /> + <delete file="AndroidManifest.xml" verbose="${verbose}" /> </target> </project>