summaryrefslogtreecommitdiff
path: root/platforms/android/custom_rules.xml
blob: 66483d3dc02f8bfd368838687125dfb065eda336 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?xml version="1.0" encoding="UTF-8"?>
<project>
    <target name="-pre-compile">
        <!-- Fix library references due to bug in build.xml: See: https://groups.google.com/forum/#!topic/android-developers/0ivH-YqCjzg -->
        <pathconvert property="fixedJarsPath" refid="project.all.jars.path">
          <filtermapper>
            <replacestring from="/bin/" to="/ant-build/"/>
            <replacestring from="\bin\" to="\ant-build\"/>
          </filtermapper>
        </pathconvert>
        <path id="project.all.jars.path">
          <pathelement path="${fixedJarsPath}"/>
        </path>
        <echo message="Set jars path to: ${toString:project.all.jars.path}"/>
    </target>
    <!-- Rename AndroidManifest.xml so that Eclipse's import wizard doesn't detect ant-build as a project -->
    <target name="-post-build">
        <move file="ant-build/AndroidManifest.xml" tofile="ant-build/AndroidManifest.cordova.xml" failonerror="false" overwrite="true" />
        <move file="CordovaLib/ant-build/AndroidManifest.xml" tofile="CordovaLib/ant-build/AndroidManifest.cordova.xml" failonerror="false" overwrite="true" />
    </target>
</project>