mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-22 00:32:55 +08:00
[CB-3307] Rename cordova-VERSION.js -> cordova.js
This commit is contained in:
parent
20caac1b6e
commit
8a95ed8ee6
@ -33,7 +33,7 @@
|
|||||||
<p class="event received">Device is Ready</p>
|
<p class="event received">Device is Ready</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript" src="cordova-2.6.0.js"></script>
|
<script type="text/javascript" src="cordova.js"></script>
|
||||||
<script type="text/javascript" src="js/index.js"></script>
|
<script type="text/javascript" src="js/index.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
app.initialize();
|
app.initialize();
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title></title>
|
<title></title>
|
||||||
<script src="cordova-2.6.0.js"></script>
|
<script src="cordova.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
@ -26,8 +26,7 @@
|
|||||||
</filterchain>
|
</filterchain>
|
||||||
</loadfile>
|
</loadfile>
|
||||||
|
|
||||||
<!-- check that the version of ant is at least 1.8.0, as is needed
|
<!-- check that the version of ant is at least 1.8.0 -->
|
||||||
for the dblQuote property -->
|
|
||||||
<antversion property="thisantversion" atleast="1.8.0" />
|
<antversion property="thisantversion" atleast="1.8.0" />
|
||||||
<fail message="The required minimum version of ant is 1.8.0, you have ${ant.version}"
|
<fail message="The required minimum version of ant is 1.8.0, you have ${ant.version}"
|
||||||
unless="thisantversion" />
|
unless="thisantversion" />
|
||||||
@ -80,9 +79,6 @@
|
|||||||
-->
|
-->
|
||||||
<property file="ant.properties" />
|
<property file="ant.properties" />
|
||||||
|
|
||||||
<!-- We need to setup the double quote. -->
|
|
||||||
<property name="dblQuote">"</property>
|
|
||||||
|
|
||||||
<!-- The project.properties file is created and updated by the 'android'
|
<!-- The project.properties file is created and updated by the 'android'
|
||||||
tool, as well as ADT.
|
tool, as well as ADT.
|
||||||
|
|
||||||
@ -136,33 +132,10 @@
|
|||||||
-->
|
-->
|
||||||
<import file="${sdk.dir}/tools/ant/build.xml" />
|
<import file="${sdk.dir}/tools/ant/build.xml" />
|
||||||
|
|
||||||
<!-- Combine JavaScript files into one cordova-uncompressed.js file. -->
|
|
||||||
<target name="build-javascript" depends="clean">
|
|
||||||
|
|
||||||
<!-- Clean up existing files -->
|
|
||||||
<!--<delete file="assets/www/cordova_${version}.js"/>-->
|
|
||||||
|
|
||||||
<!-- Create uncompressed JS file -->
|
|
||||||
<concat destfile="assets/www/cordova-${version}.js">
|
|
||||||
<filelist dir="assets/js" files="cordova.android.js"/>
|
|
||||||
</concat>
|
|
||||||
|
|
||||||
<!-- update project files to reference cordova-x.x.x.min.js -->
|
|
||||||
<replaceregexp match="cordova(.*)\.js" replace="cordova-${version}.js" byline="true">
|
|
||||||
<fileset file="assets/www/index.html" />
|
|
||||||
<fileset file="../bin/templates/project/assets/www/index.html" />
|
|
||||||
</replaceregexp>
|
|
||||||
|
|
||||||
<!-- This is sketchy, but it works, ${dblQuote} does not -->
|
|
||||||
<replaceregexp match="cordovaVersion = [\u0022].*[\u0022];" replace='cordovaVersion = ${dblQuote}${version}${dblQuote};' byline="true">
|
|
||||||
<fileset file="src/org/apache/cordova/Device.java" />
|
|
||||||
</replaceregexp>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- Build Cordova jar file that includes all native code, and Cordova JS file
|
<!-- Build Cordova jar file that includes all native code, and Cordova JS file
|
||||||
that includes all JavaScript code.
|
that includes all JavaScript code.
|
||||||
-->
|
-->
|
||||||
<target name="jar" depends="build-javascript, -compile">
|
<target name="jar" depends="-compile">
|
||||||
<jar jarfile="cordova-${version}.jar" basedir="bin/classes" excludes="org/apache/cordova/R.class,org/apache/cordova/R$*.class"/>
|
<jar jarfile="cordova-${version}.jar" basedir="bin/classes" excludes="org/apache/cordova/R.class,org/apache/cordova/R$*.class"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
@ -195,10 +168,10 @@
|
|||||||
</junit>
|
</junit>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="cordova_debug" depends="build-javascript, debug">
|
<target name="cordova_debug" depends="debug">
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="cordova_release" depends="build-javascript, release">
|
<target name="cordova_release" depends="release">
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
@ -38,7 +38,7 @@ import android.telephony.TelephonyManager;
|
|||||||
public class Device extends CordovaPlugin {
|
public class Device extends CordovaPlugin {
|
||||||
public static final String TAG = "Device";
|
public static final String TAG = "Device";
|
||||||
|
|
||||||
public static String cordovaVersion = "2.6.0"; // Cordova version
|
public static String cordovaVersion = "dev"; // Cordova version
|
||||||
public static String platform = "Android"; // Device OS
|
public static String platform = "Android"; // Device OS
|
||||||
public static String uuid; // Device UUID
|
public static String uuid; // Device UUID
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user