forked from github/cordova-android
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4b06eecf3e | ||
![]() |
5a9eb154e0 | ||
![]() |
655c018272 | ||
![]() |
214e857b20 | ||
![]() |
c7b0b93c9d |
@ -26,10 +26,7 @@ var fs = require('fs');
|
||||
var check_reqs = require('./../templates/cordova/lib/check_reqs');
|
||||
var ROOT = path.join(__dirname, '..', '..');
|
||||
|
||||
var MIN_SDK_VERSION = 19;
|
||||
|
||||
var CordovaError = require('cordova-common').CordovaError;
|
||||
var AndroidStudio = require('../templates/cordova/lib/AndroidStudio');
|
||||
var AndroidManifest = require('../templates/cordova/lib/AndroidManifest');
|
||||
|
||||
// Export all helper functions, and make sure internally within this module, we
|
||||
@ -348,39 +345,16 @@ function generateDoneMessage (type, link) {
|
||||
|
||||
// Returns a promise.
|
||||
exports.update = function (projectPath, options, events) {
|
||||
options = options || {};
|
||||
|
||||
return Q()
|
||||
.then(function () {
|
||||
var errorString =
|
||||
'An in-place platform update is not supported. \n' +
|
||||
'The `platforms` folder is always treated as a build artifact in the CLI workflow.\n' +
|
||||
'To update your platform, you have to remove, then add your android platform again.\n' +
|
||||
'Make sure you save your plugins beforehand using `cordova plugin save`, and save \n' + 'a copy of the platform first if you had manual changes in it.\n' +
|
||||
'\tcordova plugin save\n' +
|
||||
'\tcordova platform rm android\n' +
|
||||
'\tcordova platform add android\n'
|
||||
;
|
||||
|
||||
var isAndroidStudio = AndroidStudio.isAndroidStudioProject(projectPath);
|
||||
var isLegacy = !isAndroidStudio;
|
||||
var manifest = null;
|
||||
var builder = 'gradle';
|
||||
|
||||
if (isAndroidStudio) {
|
||||
manifest = new AndroidManifest(path.join(projectPath, 'app', 'main', 'AndroidManifest.xml'));
|
||||
builder = 'studio';
|
||||
} else {
|
||||
manifest = new AndroidManifest(path.join(projectPath, 'AndroidManifest.xml'));
|
||||
builder = 'gradle';
|
||||
}
|
||||
|
||||
if (Number(manifest.getMinSdkVersion()) < MIN_SDK_VERSION) {
|
||||
events.emit('verbose', 'Updating minSdkVersion to ' + MIN_SDK_VERSION + ' in AndroidManifest.xml');
|
||||
manifest.setMinSdkVersion(MIN_SDK_VERSION);
|
||||
}
|
||||
|
||||
manifest.setDebuggable(false).write();
|
||||
|
||||
var projectName = manifest.getActivity().getName();
|
||||
var target_api = check_reqs.get_target();
|
||||
|
||||
exports.copyJsAndLibrary(projectPath, options.link, projectName, isLegacy);
|
||||
exports.copyScripts(projectPath);
|
||||
exports.copyBuildRules(projectPath, isLegacy);
|
||||
exports.writeProjectProperties(projectPath, target_api);
|
||||
exports.prepBuildFiles(projectPath, builder);
|
||||
events.emit('log', generateDoneMessage('update', options.link));
|
||||
}).thenResolve(projectPath);
|
||||
return Q.reject(errorString);
|
||||
};
|
||||
|
@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
// Coho updates this line:
|
||||
var VERSION = "6.5.0-dev";
|
||||
var VERSION = "7.0.0";
|
||||
|
||||
module.exports.version = VERSION;
|
||||
|
||||
|
2
bin/templates/project/assets/www/cordova.js
vendored
2
bin/templates/project/assets/www/cordova.js
vendored
@ -19,7 +19,7 @@
|
||||
under the License.
|
||||
*/
|
||||
;(function() {
|
||||
var PLATFORM_VERSION_BUILD_LABEL = '6.5.0-dev';
|
||||
var PLATFORM_VERSION_BUILD_LABEL = '7.0.0';
|
||||
// file: src/scripts/require.js
|
||||
|
||||
/* jshint -W079 */
|
||||
|
@ -129,9 +129,9 @@ bintray {
|
||||
licenses = ['Apache-2.0']
|
||||
labels = ['android', 'cordova', 'phonegap']
|
||||
version {
|
||||
name = '6.5.0-dev'
|
||||
name = '7.0.0'
|
||||
released = new Date()
|
||||
vcsTag = '6.5.0-dev'
|
||||
vcsTag = '7.0.0'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ import android.webkit.WebChromeClient.CustomViewCallback;
|
||||
* are not expected to implement it.
|
||||
*/
|
||||
public interface CordovaWebView {
|
||||
public static final String CORDOVA_VERSION = "6.5.0-dev";
|
||||
public static final String CORDOVA_VERSION = "7.0.0";
|
||||
|
||||
void init(CordovaInterface cordova, List<PluginEntry> pluginEntries, CordovaPreferences preferences);
|
||||
|
||||
|
@ -38,12 +38,12 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation project(path: ":CordovaLib")
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation project(path: ':CordovaLib')
|
||||
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
|
||||
exclude group: 'com.android.support', module: 'support-annotations'
|
||||
})
|
||||
androidTestImplementation ('com.android.support.test.espresso:espresso-web:2.2.2', {
|
||||
androidTestImplementation('com.android.support.test.espresso:espresso-web:2.2.2', {
|
||||
exclude group: 'com.android.support', module: 'support-annotations'
|
||||
})
|
||||
implementation 'com.android.support:appcompat-v7:26.1.0'
|
||||
|
Loading…
Reference in New Issue
Block a user