mirror of
https://github.com/apache/cordova-android.git
synced 2026-05-30 00:00:04 +08:00
feat: remove java 1.8 version check (#1241)
This commit is contained in:
-11
@@ -25,11 +25,8 @@ const java = require('./env/java');
|
||||
var REPO_ROOT = path.join(__dirname, '..', '..', '..', '..');
|
||||
const { CordovaError, ConfigParser, events } = require('cordova-common');
|
||||
var android_sdk = require('./android_sdk');
|
||||
const semver = require('semver');
|
||||
const { SDK_VERSION } = require('./gradle-config-defaults');
|
||||
|
||||
const EXPECTED_JAVA_VERSION = '1.8.x';
|
||||
|
||||
// Re-exporting these for backwards compatibility and for unit testing.
|
||||
// TODO: Remove uses and use the ./utils module directly.
|
||||
Object.assign(module.exports, { isWindows, isDarwin });
|
||||
@@ -123,14 +120,6 @@ module.exports.check_gradle = function () {
|
||||
*/
|
||||
module.exports.check_java = async function () {
|
||||
const javaVersion = await java.getVersion();
|
||||
|
||||
if (!semver.satisfies(javaVersion.version, EXPECTED_JAVA_VERSION)) {
|
||||
throw new CordovaError(
|
||||
`Requirements check failed for JDK ${EXPECTED_JAVA_VERSION}! Detected version: ${javaVersion.version}\n` +
|
||||
'Check your ANDROID_SDK_ROOT / JAVA_HOME / PATH environment variables.'
|
||||
);
|
||||
}
|
||||
|
||||
return javaVersion;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user