Implement bidirection build

This commit is contained in:
Victor Shcherb 2012-01-14 21:03:10 +01:00
parent 76530bf5f4
commit a8b4ff78cf
2 changed files with 34 additions and 42 deletions

View file

@ -49,10 +49,6 @@
<!-- extension targets. Uncomment the ones where you want to do custom work
in between standard targets -->
<!--
<target name="-pre-build">
</target>
<target name="-pre-compile">
</target>
/* This is typically used for code obfuscation.
Compiled code location: ${out.classes.absolute.dir}
@ -73,31 +69,30 @@
<exclude name="**/*.java" />
</fileset>
</copy>
<if> <isset property="net.osmand"/>
<then>
<replaceregexp file="AndroidManifest.xml" match='package="net.osmand.plus"' replace='package="net.osmand"' byline="true" />
<replaceregexp file="res/values/no_translate.xml" match='"app_name"&gt;(.*)&lt;' replace='"app_name"&gt;Osmand&lt;' byline="true" />
</then>
<else>
<replaceregexp file="AndroidManifest.xml" match='package="net.osmand"' replace='package="net.osmand.plus"' byline="true" />
<replaceregexp file="res/values/no_translate.xml" match='"app_name"&gt;(.*)&lt;' replace='"app_name"&gt;Osmand&lt;+' byline="true" />
</else>
</if>
</target>
<target name="-package-resources">
<echo>Packaging resources and assets...</echo>
<exec executable="${aapt}">
<!-- failonerror="true"> -->
<arg value="package" />
<arg value="-f" />
<arg value="-M" />
<arg value="${base.dir}/AndroidManifest.xml" />
<arg value="-S" />
<arg value="${resource.absolute.dir}" />
<arg value="-A" />
<arg value="${asset.absolute.dir}" />
<arg value="-I" />
<arg value="${android.jar}" />
<arg value="-F" />
<arg value="${out.absolute.dir}/${resource.package.file.name}" />
<arg value="${raw.absolute.dir}" />
</exec>
</target>
<!-- Compiles this project's .java files into .class files. -->
<target name="-compile" depends="-build-setup, -pre-build, -code-gen, -pre-compile">
<do-only-if-manifest-hasCode elseText="hasCode = false. Skipping...">
<!-- Osmand plus support -->
<mkdir dir="${gen.absolute.dir}/net/osmand/plus"/>
<copy todir="${gen.absolute.dir}/net/osmand/plus">
<fileset dir="${gen.absolute.dir}/net/osmand">
<include name="R.java" />
</fileset>
</copy>
<replaceregexp file="${gen.absolute.dir}/net/osmand/plus/R.java" match='package net.osmand;' replace='package net.osmand.plus;' byline="true" />
<!-- If android rules are used for a test project, its classpath should include
tested project's location -->
<condition property="extensible.classpath"
@ -120,17 +115,17 @@
classpathref="jar.libs.ref">
<src path="${source.absolute.dir}" />
<!-- osmchange -->
<compilerarg value="-Xlint"/>
<src path="${use.absolute.dir}" />
<exclude name="**/LogUtil.java" />
<exclude name="**/OsmStorageWriter.java" />
<exclude name="**/net/osmand/data/index/" />
<exclude name="**/net/osmand/data/preparation/" />
<exclude name="**/net/osmand/osm/util/" />
<exclude name="**/net/osmand/swing/" />
<exclude name="**/rtree/" />
<!-- osmchange -->
<!-- osmchange -->
<compilerarg value="-Xlint"/>
<src path="${use.absolute.dir}" />
<exclude name="**/LogUtil.java" />
<exclude name="**/OsmStorageWriter.java" />
<exclude name="**/net/osmand/data/index/" />
<exclude name="**/net/osmand/data/preparation/" />
<exclude name="**/net/osmand/osm/util/" />
<exclude name="**/net/osmand/swing/" />
<exclude name="**/rtree/" />
<!-- osmchange -->
<src path="${gen.absolute.dir}" />
<classpath>
@ -256,8 +251,8 @@
</macrodef>
<target name="debug-nondk">
<property name="nativeoff" value="true"/>
<antcall target="debug"/>
<property name="nativeoff" value="true"/>
<antcall target="debug"/>
</target>
<taskdef name="cpd" classname="net.sourceforge.pmd.cpd.CPDTask" classpathref="lib.path"/>
@ -270,9 +265,8 @@
</cpd>
</target>
<!-- NOT used now for night builds could be deleted -->
<!-- NOT used now for night builds could be deleted
<typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="lib.path" />
<target name="update">
<svn svnkit="true">
<info target="." />
@ -288,8 +282,6 @@
<replaceregexp file="${use.absolute.dir}/net/osmand/Version.java" match='(APP_DESCRIPTION.*=.*\").*(\".*)' replace='\1debug r${svn.info.rev}\2' byline="true" />
</target>
<target name="nightbuild" depends="clean,update,debug">
<ftp action="del" server="download.osmand.net" userid="${ftp.user}" password="${ftp.password}">
<fileset>
@ -304,6 +296,6 @@
</fileset>
</ftp>
</target>
</target> -->
</project>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<resources>
<string name="app_name">OsmAnd~</string>
<string name="app_name">OsmAnd</string>
<string name="app_version">0.7.0</string>
<!-- Not translatable -->
<string name="ga_api_key">UA-28342846-2</string>