Compare commits

...

5 Commits
4.1.0 ... 4.1.1

Author SHA1 Message Date
Steve Gill
6cda55b35f Set VERSION to 4.1.1 (via coho) 2015-07-31 16:50:01 -07:00
Steve Gill
da3f026974 Update JS snapshot to version 4.1.1 (via coho) 2015-07-31 16:50:01 -07:00
Steve Gill
7427b15f5f updated release notes 2015-07-31 16:40:14 -07:00
Steve Gill
28580a2f4c CB-9428 update script now bumps up minSdkVersion to 14 if it is less than that. 2015-07-31 16:38:44 -07:00
Vladimir Kotikov
31295566f3 CB-9430 Fixes check_reqs failure when javac returns an extra line 2015-07-31 16:38:34 -07:00
8 changed files with 66 additions and 38 deletions

View File

@@ -21,6 +21,11 @@
## Release Notes for Cordova (Android) ##
Update these notes using: git log --pretty=format:'* %s' --topo-order --no-merges *remote*/4.1.x...HEAD
### Release 4.1.1 (Aug 2015) ###
* CB-9428 update script now bumps up minSdkVersion to 14 if it is less than that
* CB-9430 Fixes check_reqs failure when javac returns an extra line
### Release 4.1.0 (Jul 2015) ###
* CB-9185 Fixed an issue when unsigned apks couldn't be found. This closes #202

View File

@@ -1 +1 @@
4.1.0
4.1.1

View File

@@ -155,7 +155,8 @@ module.exports.check_java = function() {
// javac writes version info to stderr instead of stdout
return tryCommand('javac -version', msg, true);
}).then(function (output) {
return /^javac ((?:\d+\.)+(?:\d+))/i.exec(output)[1];
var match = /javac ((?:\d+\.)+(?:\d+))/i.exec(output)[1];
return match && match[1];
});
});
};

View File

@@ -290,12 +290,31 @@ function extractProjectNameFromManifest(projectPath) {
return m[1];
}
// Cordova-android updates sometimes drop support for older versions. Need to update minSDK in existing projects.
function updateMinSDKInManifest(projectPath) {
var manifestPath = path.join(projectPath, 'AndroidManifest.xml');
var manifestData = fs.readFileSync(manifestPath, 'utf8');
var minSDKVersion = 14;
//grab minSdkVersion from Android.
var m = /android:minSdkVersion\s*=\s*"(.*?)"/i.exec(manifestData);
if (!m) {
throw new Error('Could not find minSDKVersion in ' + manifestPath);
}
//if minSDKVersion in Android.manifest is less than our current min, replace it
if(Number(m[1]) < minSDKVersion) {
console.log('Updating minSdkVersion from ' + m[1] + ' to ' + minSDKVersion + ' in AndroidManifest.xml');
shell.sed('-i', /android:minSdkVersion\s*=\s*"(.*?)"/, 'android:minSdkVersion="'+minSDKVersion+'"', manifestPath);
}
}
// Returns a promise.
exports.updateProject = function(projectPath, shared) {
return Q()
.then(function() {
var projectName = extractProjectNameFromManifest(projectPath);
var target_api = check_reqs.get_target();
updateMinSDKInManifest(projectPath);
copyJsAndLibrary(projectPath, shared, projectName);
copyScripts(projectPath);
copyBuildRules(projectPath);

View File

@@ -20,6 +20,6 @@
*/
// Coho updates this line:
var VERSION = "4.1.0";
var VERSION = "4.1.1";
console.log(VERSION);

View File

@@ -1,5 +1,5 @@
// Platform: android
// a83e94b489774dc8e514671e81c6154eda650af1
// 2c29e187e4206a6a77fba940ef6f77aef5c7eb8c
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -19,7 +19,7 @@
under the License.
*/
;(function() {
var PLATFORM_VERSION_BUILD_LABEL = '4.1.0';
var PLATFORM_VERSION_BUILD_LABEL = '4.1.1';
// file: src/scripts/require.js
/*jshint -W079 */
@@ -328,7 +328,7 @@ module.exports = cordova;
});
// file: D:/cordova/cordova-android/cordova-js-src/android/nativeapiprovider.js
// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/android/nativeapiprovider.js
define("cordova/android/nativeapiprovider", function(require, exports, module) {
/**
@@ -351,7 +351,7 @@ module.exports = {
});
// file: D:/cordova/cordova-android/cordova-js-src/android/promptbasednativeapi.js
// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/android/promptbasednativeapi.js
define("cordova/android/promptbasednativeapi", function(require, exports, module) {
/**
@@ -376,7 +376,6 @@ module.exports = {
// file: src/common/argscheck.js
define("cordova/argscheck", function(require, exports, module) {
var exec = require('cordova/exec');
var utils = require('cordova/utils');
var moduleExports = module.exports;
@@ -861,7 +860,7 @@ module.exports = channel;
});
// file: D:/cordova/cordova-android/cordova-js-src/exec.js
// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/exec.js
define("cordova/exec", function(require, exports, module) {
/**
@@ -1230,6 +1229,7 @@ if (!window.console.warn) {
// Register pause, resume and deviceready channels as events on document.
channel.onPause = cordova.addDocumentEventHandler('pause');
channel.onResume = cordova.addDocumentEventHandler('resume');
channel.onActivated = cordova.addDocumentEventHandler('activated');
channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready');
// Listen for DOMContentLoaded and notify our channel subscribers.
@@ -1357,6 +1357,7 @@ if (!window.console.warn) {
// Register pause, resume and deviceready channels as events on document.
channel.onPause = cordova.addDocumentEventHandler('pause');
channel.onResume = cordova.addDocumentEventHandler('resume');
channel.onActivated = cordova.addDocumentEventHandler('activated');
channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready');
// Listen for DOMContentLoaded and notify our channel subscribers.
@@ -1500,7 +1501,7 @@ exports.reset();
});
// file: D:/cordova/cordova-android/cordova-js-src/platform.js
// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/platform.js
define("cordova/platform", function(require, exports, module) {
module.exports = {
@@ -1576,7 +1577,7 @@ function onMessageFromNative(msg) {
});
// file: D:/cordova/cordova-android/cordova-js-src/plugin/android/app.js
// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/plugin/android/app.js
define("cordova/plugin/android/app", function(require, exports, module) {
var exec = require('cordova/exec');
@@ -1672,6 +1673,10 @@ module.exports = {
// file: src/common/pluginloader.js
define("cordova/pluginloader", function(require, exports, module) {
/*
NOTE: this file is NOT used when we use the browserify workflow
*/
var modulemapper = require('cordova/modulemapper');
var urlutil = require('cordova/urlutil');
@@ -1860,15 +1865,14 @@ utils.typeName = function(val) {
/**
* Returns an indication of whether the argument is an array or not
*/
utils.isArray = function(a) {
return utils.typeName(a) == 'Array';
};
utils.isArray = Array.isArray ||
function(a) {return utils.typeName(a) == 'Array';};
/**
* Returns an indication of whether the argument is a Date or not
*/
utils.isDate = function(d) {
return utils.typeName(d) == 'Date';
return (d instanceof Date);
};
/**
@@ -1902,17 +1906,25 @@ utils.clone = function(obj) {
* Returns a wrapped version of the function
*/
utils.close = function(context, func, params) {
if (typeof params == 'undefined') {
return function() {
return func.apply(context, arguments);
};
} else {
return function() {
return func.apply(context, params);
};
}
return function() {
var args = params || arguments;
return func.apply(context, args);
};
};
//------------------------------------------------------------------------------
function UUIDcreatePart(length) {
var uuidpart = "";
for (var i=0; i<length; i++) {
var uuidchar = parseInt((Math.random() * 256), 10).toString(16);
if (uuidchar.length == 1) {
uuidchar = "0" + uuidchar;
}
uuidpart += uuidchar;
}
return uuidpart;
}
/**
* Create a UUID
*/
@@ -1924,6 +1936,7 @@ utils.createUUID = function() {
UUIDcreatePart(6);
};
/**
* Extends a child object from a parent object using classical inheritance
* pattern.
@@ -1933,6 +1946,7 @@ utils.extend = (function() {
var F = function() {};
// extend Child from Parent
return function(Child, Parent) {
F.prototype = Parent.prototype;
Child.prototype = new F();
Child.__super__ = Parent.prototype;
@@ -1952,18 +1966,7 @@ utils.alert = function(msg) {
};
//------------------------------------------------------------------------------
function UUIDcreatePart(length) {
var uuidpart = "";
for (var i=0; i<length; i++) {
var uuidchar = parseInt((Math.random() * 256), 10).toString(16);
if (uuidchar.length == 1) {
uuidchar = "0" + uuidchar;
}
uuidpart += uuidchar;
}
return uuidpart;
}
});

View File

@@ -31,7 +31,7 @@ import android.webkit.WebChromeClient.CustomViewCallback;
* are not expected to implement it.
*/
public interface CordovaWebView {
public static final String CORDOVA_VERSION = "4.1.0";
public static final String CORDOVA_VERSION = "4.1.1";
void init(CordovaInterface cordova, List<PluginEntry> pluginEntries, CordovaPreferences preferences);

View File

@@ -1,6 +1,6 @@
{
"name": "cordova-android",
"version": "4.1.0",
"version": "4.1.1",
"description": "cordova-android release",
"main": "bin/create",
"repository": {