You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Validate Javac version with Android runtime version
In NativeScript 4.1.0 we add support for Java 10. However, older versions of the Android runtime cannot work with Java 10, so verification for the current environment and local builds depends on the current Android runtime version.
In order to handle this, add projectDir parameter to the API. In case it is passed, we'll check if Android Runtime version is specified in the package.json and we'll verify if it is supported for the current Java version.
@@ -478,16 +479,20 @@ Library that helps identifying if the environment can be used for development of
478
479
479
480
/**
480
481
* Checks if the Android tools are valid.
482
+
* @param {string} projectDir @optional The project directory. Used to determine the Android Runtime version and validate the Java compiler version against it.
483
+
* If it is not passed or the project does not have Android runtime, this validation is skipped.
481
484
* @return {NativeScriptDoctor.IWarning[]} An array of errors from the validation checks. If there are no errors will return [].
* @param {string} installedJavaVersion The version of javac to check.
491
+
* @param {string} projectDir @optional The project directory. Used to determine the Android Runtime version and validate the Java compiler version against it.
492
+
* If it is not passed or the project does not have Android runtime, this validation is skipped.
488
493
* @return {NativeScriptDoctor.IWarning[]} An array of errors from the validation checks. If there are no errors will return [].
// If we got here, something terribly wrong happened.
373
+
thrownewError(`The determined Android runtime version ${runtimeVersion} based on project directory ${projectDir} is not valid. Unable to verify if the current system is setup for Android development.`);
0 commit comments