Skip to content
Closed

3.7.x #172

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3e07f26
Update JS snapshot to version 3.7.0 (via coho)
infil00p Jan 12, 2015
7320ce8
Set VERSION to 3.7.0 (via coho)
infil00p Jan 12, 2015
72e947e
CB-4914 Fix build whitespace issue
Jan 13, 2015
cfc3614
CB-8280 android: Don't apply SplashScreenDelay when .show() is called…
agrieve Jan 19, 2015
9be1106
CB-8329 Cancel outstanding ActivityResult requests when a new startAc…
agrieve Jan 19, 2015
5538a23
CB-8017 Add support for `<input type=file>` for Lollipop
agrieve Jan 19, 2015
1427c13
Allow `--ant`, `--gradle` for `cordova/run`
agrieve Jan 20, 2015
7375154
Fix exception for unknown flag in `cordova/run`
agrieve Jan 20, 2015
8c14e33
Fix `cordova/run` not finding apk when multi-arch is specified but on…
agrieve Jan 20, 2015
1f73593
Fix `cordova/build` not printing out all gradle args in console message
agrieve Jan 20, 2015
33614d1
CB-8255 Fix `cordova/build --gradleVar=--foo=bar` stripping off `=bar`
agrieve Jan 20, 2015
cf0fdf5
CB-8255 Pass `arch` to gradle regardless of `cdvBuildMultipleApks`
agrieve Jan 20, 2015
6b3ef11
Adds `cdvPrintProps` gradle task: dumps out all cdv properties
agrieve Jan 20, 2015
e4e0492
CB-8201 Add support for auth dialogs into Cordova Android
sgrebnov Jan 16, 2015
26f0401
CB-8328 Allow plugins to handle certificate challenges (close #150)
Jan 16, 2015
050dd08
gradle: Fix incorrect buildTools dependencies in framework's build.gr…
agrieve Jan 20, 2015
9514a3e
Move cordova.gradle from project template to CordovaLib
agrieve Jan 20, 2015
c3bdebd
CB-8026 Remove default target value from gradle file
agrieve Jan 20, 2015
d7fc37d
CB-8317 Make it work to load about:blank and to dispatch exit message…
shingotoda Jan 16, 2015
f388569
Updating RELASENOTES.md, this is in a weird spot, since you need the …
infil00p Jan 20, 2015
2829ed7
CB-8411 Initialize plugins only after createViews() is called
agrieve Feb 3, 2015
c5ffdff
Prune 3.7.0 RELEASENOTES to a more glanceable list
agrieve Feb 3, 2015
3bc755d
Set VERSION to 3.7.1 (via coho)
agrieve Feb 4, 2015
f4b3159
CB-8415 updated RELEASENOTES
agrieve Feb 4, 2015
a64203f
Removing Intent funtionality out of 3.7
infil00p May 15, 2015
ec1cc70
CB-9042 updated for release 3.7.2
stevengill May 20, 2015
86f9b61
CB-9042 updated releasenotes for 3.7.2 release
stevengill May 20, 2015
d654de8
CB-9042 reverted changes to cordova.js, should be same as 3.7.1
stevengill May 20, 2015
c1c0a63
CB-9135 fix the vulnerability bug
Jun 9, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,40 @@
-->
## Release Notes for Cordova (Android) ##

### Release 3.7.2 (May 2015) ###

* Removed Intent Functionality from Preferences - Preferences can no longer be set by intents

### Release 3.7.1 (January 2015) ###
* CB-8411 Initialize plugins only after `createViews()` is called (regression in 3.7.0)

### Release 3.7.0 (January 2015) ###

* CB-8328 Allow plugins to handle certificate challenges (close #150)
* CB-8201 Add support for auth dialogs into Cordova Android
* CB-8017 Add support for `<input type=file>` for Lollipop
* CB-8143 Loads of gradle improvements (try it with cordova/build --gradle)
* CB-8329 Cancel outstanding ActivityResult requests when a new startActivityForResult occurs
* CB-8026 Bumping up Android Version and setting it up to allow third-party cookies. This might change later.
* CB-8210 Use PluginResult for various events from native so that content-security-policy <meta> can be used
* CB-8168 Add support for `cordova/run --list` (closes #139)
* CB-8176 Vastly better auto-detection of SDK & JDK locations
* CB-8079 Use activity class package name, but fallback to application package name when looking for splash screen drawable
* CB-8147 Have corodva/build warn about unrecognized flags rather than fail
* CB-7881 Android tooling shouldn't lock application directory
* CB-8112 Turn off mediaPlaybackRequiresUserGesture
* CB-6153 Add a preference for controlling hardware button audio stream (DefaultVolumeStream)
* CB-8031 Fix race condition that shows as ConcurrentModificationException
* CB-7974 Cancel timeout timer if view is destroyed
* CB-7940 Disable exec bridge if bridgeSecret is wrong
* CB-7758 Allow content-url-hosted pages to access the bridge
* CB-6511 Fixes build for android when app name contains unicode characters.
* CB-7707 Added multipart PluginResult
* CB-6837 Fix leaked window when hitting back button while alert being rendered
* CB-7674 Move preference activation back into onCreate()
* CB-7499 Support RTL text direction
* CB-7330 Don't run check_reqs for bin/create.

### 3.6.4 (Sept 30, 2014) ###

* Set VERSION to 3.6.4 (via coho)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.7.0-dev
3.7.2
2 changes: 1 addition & 1 deletion bin/lib/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ function copyJsAndLibrary(projectPath, shared, projectName) {
shell.cp('-f', path.join(ROOT, 'framework', 'AndroidManifest.xml'), nestedCordovaLibPath);
shell.cp('-f', path.join(ROOT, 'framework', 'project.properties'), nestedCordovaLibPath);
shell.cp('-f', path.join(ROOT, 'framework', 'build.gradle'), nestedCordovaLibPath);
shell.cp('-f', path.join(ROOT, 'framework', 'cordova.gradle'), nestedCordovaLibPath);
shell.cp('-r', path.join(ROOT, 'framework', 'src'), nestedCordovaLibPath);
// Create an eclipse project file and set the name of it to something unique.
// Without this, you can't import multiple CordovaLib projects into the same workspace.
Expand Down Expand Up @@ -122,7 +123,6 @@ function copyBuildRules(projectPath) {
shell.cp('-f', path.join(srcDir, 'custom_rules.xml'), projectPath);

shell.cp('-f', path.join(srcDir, 'build.gradle'), projectPath);
shell.cp('-f', path.join(srcDir, 'cordova.gradle'), projectPath);
}

function copyScripts(projectPath) {
Expand Down
35 changes: 15 additions & 20 deletions bin/templates/cordova/lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,13 @@ function findOutputApksHelper(dir, build_type, arch) {
if (ret.length === 0) {
return ret;
}
// Assume arch-specific build if newest api has -x86 or -arm.
var archSpecific = !!/-x86|-arm/.exec(ret[0]);
// And show only arch-specific ones (or non-arch-specific)
ret = ret.filter(function(p) {
return !!/-x86|-arm/.exec(p) == archSpecific;
});
if (arch) {
if (arch && ret.length > 1) {
ret = ret.filter(function(p) {
return p.indexOf('-' + arch) != -1;
});
Expand Down Expand Up @@ -175,20 +177,16 @@ var builders = {
},
gradle: {
getArgs: function(cmd, arch, extraArgs) {
if (arch == 'arm' && cmd == 'debug') {
cmd = 'assembleArmv7Debug';
} else if (arch == 'arm' && cmd == 'release') {
cmd = 'assembleArmv7Release';
} else if (arch == 'x86' && cmd == 'debug') {
cmd = 'assembleX86Debug';
} else if (arch == 'x86' && cmd == 'release') {
cmd = 'assembleX86Release';
if (cmd == 'release') {
cmd = 'cdvBuildRelease';
} else if (cmd == 'debug') {
cmd = 'assembleDebug';
} else if (cmd == 'release') {
cmd = 'assembleRelease';
cmd = 'cdvBuildDebug';
}
var args = [cmd, '-b', path.join(ROOT, 'build.gradle')];
if (arch) {
args.push('-PcdvBuildArch=' + arch);
}

// 10 seconds -> 6 seconds
args.push('-Dorg.gradle.daemon=true');
args.push.apply(args, extraArgs);
Expand Down Expand Up @@ -260,7 +258,7 @@ var builders = {
var wrapper = path.join(ROOT, 'gradlew');
var args = this.getArgs(build_type == 'debug' ? 'debug' : 'release', arch, extraArgs);
return Q().then(function() {
console.log('Running: ' + wrapper + ' ' + extraArgs.join(' '));
console.log('Running: ' + wrapper + ' ' + args.concat(extraArgs).join(' '));
return spawn(wrapper, args);
});
},
Expand All @@ -270,7 +268,7 @@ var builders = {
var wrapper = path.join(ROOT, 'gradlew');
var args = builder.getArgs('clean', null, extraArgs);
return Q().then(function() {
console.log('Running: ' + wrapper + ' ' + extraArgs.join(' '));
console.log('Running: ' + wrapper + ' ' + args.concat(extraArgs).join(' '));
return spawn(wrapper, args);
});
},
Expand Down Expand Up @@ -319,8 +317,8 @@ function parseOpts(options, resolvedTarget) {
for (var i=0; options && (i < options.length); ++i) {
if (/^--/.exec(options[i])) {
var keyValue = options[i].substring(2).split('=');
var flagName = keyValue[0];
var flagValue = keyValue[1];
var flagName = keyValue.shift();
var flagValue = keyValue.join('=');
if (multiValueArgs[flagName] && !flagValue) {
flagValue = options[i + 1];
++i;
Expand Down Expand Up @@ -359,10 +357,7 @@ function parseOpts(options, resolvedTarget) {
}
}

var multiApk = ret.buildMethod == 'gradle' && process.env['BUILD_MULTIPLE_APKS'];
if (multiApk && !/0|false|no/i.exec(multiApk)) {
ret.arch = resolvedTarget && resolvedTarget.arch;
}
ret.arch = resolvedTarget && resolvedTarget.arch;

return ret;
}
Expand Down
4 changes: 2 additions & 2 deletions bin/templates/cordova/lib/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var path = require('path'),
var list = false;

for (var i=2; i<args.length; i++) {
if (/^--(debug|release|nobuild|versionCode=|minSdkVersion=|gradleArg=)/.exec(args[i])) {
if (/^--(debug|release|ant|gradle|nobuild|versionCode=|minSdkVersion=|gradleArg=)/.exec(args[i])) {
buildFlags.push(args[i]);
} else if (args[i] == '--device') {
install_target = '--device';
Expand All @@ -50,7 +50,7 @@ var path = require('path'),
} else if (args[i] == '--list') {
list = true;
} else {
console.warn('Option \'' + options[i] + '\' not recognized (ignoring).');
console.warn('Option \'' + args[i] + '\' not recognized (ignoring).');
}
}

Expand Down
11 changes: 6 additions & 5 deletions bin/templates/cordova/lib/spawn.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@ var isWindows = process.platform.slice(0, 3) == 'win';
// Takes a command and optional current working directory.
module.exports = function(cmd, args, opt_cwd) {
var d = Q.defer();
var opts = { cwd: opt_cwd, stdio: 'inherit' };
try {
// Work around spawn not being able to find .bat files.
if (isWindows) {
args.unshift('/s', '/c', cmd);
cmd = 'cmd';
args = [['/s', '/c', '"' + [cmd].concat(args).map(function(a){if (/^[^"].* .*[^"]/.test(a)) return '"' + a + '"'; return a;}).join(' ')+'"'].join(' ')];
cmd = 'cmd';
opts.windowsVerbatimArguments = true;
}
var child = child_process.spawn(cmd, args, {cwd: opt_cwd, stdio: 'inherit'});
var child = child_process.spawn(cmd, args, opts);
child.on('exit', function(code) {
if (code) {
d.reject('Error code ' + code + ' for command: ' + cmd + ' with args: ' + args);
Expand All @@ -45,5 +47,4 @@ module.exports = function(cmd, args, opt_cwd) {
d.reject(e);
}
return d.promise;
}

};
2 changes: 1 addition & 1 deletion bin/templates/cordova/version
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
*/

// Coho updates this line:
var VERSION = "3.7.0-dev";
var VERSION = "3.7.2";

console.log(VERSION);
59 changes: 47 additions & 12 deletions bin/templates/project/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ task wrapper(type: Wrapper) {
// Configuration properties. Set these via environment variables, build-extras.gradle, or gradle.properties.
// Refer to: http://www.gradle.org/docs/current/userguide/tutorial_this_and_that.html
ext {
apply from: 'cordova.gradle'
apply from: 'CordovaLib/cordova.gradle'
// The value for android.compileSdkVersion.
if (!project.hasProperty('cdvCompileSdkVersion')) {
cdvCompileSdkVersion = privateHelpers.getProjectTarget('android-19')
cdvCompileSdkVersion = privateHelpers.getProjectTarget()
}
// The value for android.buildToolsVersion.
if (!project.hasProperty('cdvBuildToolsVersion')) {
cdvBuildToolsVersion = privateHelpers.findLatestInstalledBuildTools('19.1.0')
cdvBuildToolsVersion = privateHelpers.findLatestInstalledBuildTools()
}
// Sets the versionCode to the given value.
if (!project.hasProperty('cdvVersionCode')) {
Expand All @@ -86,13 +86,55 @@ ext {
if (!project.hasProperty('cdvDebugSigningPropertiesFile')) {
cdvDebugSigningPropertiesFile = null
}
// Set by build.js script.
if (!project.hasProperty('cdvBuildArch')) {
cdvBuildArch = null
}
}

def hasBuildExtras = file('build-extras.gradle').exists()
if (hasBuildExtras) {
apply from: 'build-extras.gradle'
}

def computeBuildTargetName(debugBuild) {
def ret = 'assemble'
if (cdvBuildMultipleApks && cdvBuildArch) {
def arch = cdvBuildArch == 'arm' ? 'armv7' : cdvBuildArch
ret += '' + arch.toUpperCase().charAt(0) + arch.substring(1);
}
return ret + (debugBuild ? 'Debug' : 'Release')
}

// Make cdvBuild a task that depends on the debug/arch-sepecific task.
task cdvBuildDebug
cdvBuildDebug.dependsOn {
return computeBuildTargetName(true)
}

task cdvBuildRelease
cdvBuildRelease.dependsOn {
return computeBuildTargetName(false)
}

task cdvPrintProps << {
println('cdvCompileSdkVersion=' + cdvCompileSdkVersion)
println('cdvBuildToolsVersion=' + cdvBuildToolsVersion)
println('cdvVersionCode=' + cdvVersionCode)
println('cdvMinSdkVersion=' + cdvMinSdkVersion)
println('cdvBuildMultipleApks=' + cdvBuildMultipleApks)
println('cdvReleaseSigningPropertiesFile=' + cdvReleaseSigningPropertiesFile)
println('cdvDebugSigningPropertiesFile=' + cdvDebugSigningPropertiesFile)
println('cdvBuildArch=' + cdvBuildArch)
println('computedVersionCode=' + android.defaultConfig.versionCode)
if (android.productFlavors.has('armv7')) {
println('computedArmv7VersionCode=' + android.productFlavors.armv7.versionCode)
}
if (android.productFlavors.has('x86')) {
println('computedx86VersionCode=' + android.productFlavors.x86.versionCode)
}
}

// PLUGIN GRADLE EXTENSIONS START
// PLUGIN GRADLE EXTENSIONS END

Expand Down Expand Up @@ -207,27 +249,20 @@ gradle.taskGraph.whenReady { taskGraph ->
}
}

def ensureValueExists(filePath, props, key) {
if (props.get(key) == null) {
throw new GradleException(filePath + ': Missing key required "' + key + '"')
}
return props.get(key)
}

def addSigningProps(propsFilePath, signingConfig) {
def propsFile = file(propsFilePath)
def props = new Properties()
propsFile.withReader { reader ->
props.load(reader)
}
def storeFile = new File(ensureValueExists(propsFilePath, props, 'storeFile'))
def storeFile = new File(privateHelpers.ensureValueExists(propsFilePath, props, 'storeFile'))
if (!storeFile.isAbsolute()) {
storeFile = RelativePath.parse(true, storeFile.toString()).getFile(propsFile.getParentFile())
}
if (!storeFile.exists()) {
throw new FileNotFoundException('Keystore file does not exist: ' + storeFile.getAbsolutePath())
}
signingConfig.keyAlias = ensureValueExists(propsFilePath, props, 'keyAlias')
signingConfig.keyAlias = privateHelpers.ensureValueExists(propsFilePath, props, 'keyAlias')
signingConfig.keyPassword = props.get('keyPassword', signingConfig.keyPassword)
signingConfig.storeFile = storeFile
signingConfig.storePassword = props.get('storePassword', signingConfig.storePassword)
Expand Down
6 changes: 3 additions & 3 deletions framework/assets/www/cordova.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Platform: android
// ee7b91f28e3780afb44222a2d950ccc1bebd0b87
// 24ab6855470f2dc0662624b597c98585e56a1666
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
Expand All @@ -19,7 +19,7 @@
under the License.
*/
;(function() {
var PLATFORM_VERSION_BUILD_LABEL = '3.7.0-dev';
var PLATFORM_VERSION_BUILD_LABEL = '3.7.2';
// file: src/scripts/require.js

/*jshint -W079 */
Expand Down Expand Up @@ -1977,4 +1977,4 @@ window.cordova = require('cordova');

require('cordova/init');

})();
})();
32 changes: 15 additions & 17 deletions framework/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,21 @@ buildscript {
mavenCentral()
}

dependencies {
// Switch the Android Gradle plugin version requirement depending on the
// installed version of Gradle. This dependency is documented at
// http://tools.android.com/tech-docs/new-build-system/version-compatibility
// and https://issues.apache.org/jira/browse/CB-8143
if (gradle.gradleVersion >= "2.2") {
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0+'
}
} else if (gradle.gradleVersion >= "2.1") {
dependencies {
classpath 'com.android.tools.build:gradle:0.14.0+'
}
} else {
dependencies {
classpath 'com.android.tools.build:gradle:0.12.0+'
}
// Switch the Android Gradle plugin version requirement depending on the
// installed version of Gradle. This dependency is documented at
// http://tools.android.com/tech-docs/new-build-system/version-compatibility
// and https://issues.apache.org/jira/browse/CB-8143
if (gradle.gradleVersion >= "2.2") {
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0+'
}
} else if (gradle.gradleVersion >= "2.1") {
dependencies {
classpath 'com.android.tools.build:gradle:0.14.0+'
}
} else {
dependencies {
classpath 'com.android.tools.build:gradle:0.12.0+'
}
}
}
Expand Down
Loading