Skip to content

Commit 5d964fc

Browse files
Merge pull request #35 from NativeScript/vladimirov/java-8+
feat: Allow using JAVA 8+
2 parents 1cf3633 + 0255495 commit 5d964fc

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

lib/android-tools-info.ts

-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export class AndroidToolsInfo implements NativeScriptDoctor.IAndroidToolsInfo {
1414
private static REQUIRED_BUILD_TOOLS_RANGE_PREFIX = ">=23";
1515
private static VERSION_REGEX = /((\d+\.){2}\d+)/;
1616
private static MIN_JAVA_VERSION = "1.8.0";
17-
private static MAX_JAVA_VERSION = "1.9.0";
1817

1918
private toolsInfo: NativeScriptDoctor.IAndroidToolsInfoData;
2019
private androidHome = process.env["ANDROID_HOME"];
@@ -103,8 +102,6 @@ export class AndroidToolsInfo implements NativeScriptDoctor.IAndroidToolsInfo {
103102

104103
if (semver.lt(installedJavaCompilerSemverVersion, AndroidToolsInfo.MIN_JAVA_VERSION)) {
105104
warning = `Javac version ${installedJavaCompilerVersion} is not supported. You have to install at least ${AndroidToolsInfo.MIN_JAVA_VERSION}.`;
106-
} else if (semver.gte(installedJavaCompilerSemverVersion, AndroidToolsInfo.MAX_JAVA_VERSION)) {
107-
warning = `Javac version ${installedJavaCompilerVersion} is not supported. You have to install version ${AndroidToolsInfo.MIN_JAVA_VERSION}.`;
108105
}
109106

110107
if (warning) {

lib/wrappers/child-process.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export class ChildProcess {
7878

7979
public execFile(command: string, args: string[]): Promise<any> {
8080
return new Promise<any>((resolve, reject) => {
81-
childProcess.execFile(command, args, (error: any, stdout: NodeBuffer) => {
81+
childProcess.execFile(command, args, (error, stdout) => {
8282
if (error) {
8383
reject(error);
8484
} else {

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nativescript-doctor",
3-
"version": "0.12.0",
3+
"version": "1.0.0",
44
"description": "Library that helps identifying if the environment can be used for development of {N} apps.",
55
"main": "lib/index.js",
66
"types": "./typings/nativescript-doctor.d.ts",

test/android-tools-info.ts

+8-4
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,16 @@ describe("androidToolsInfo", () => {
3434
javacVersion: "1.8.0_152"
3535
},
3636
{
37-
javacVersion: "9",
38-
warnings: ["Javac version 9 is not supported. You have to install version 1.8.0."]
37+
javacVersion: "9"
3938
},
4039
{
41-
javacVersion: "9.0.1",
42-
warnings: ["Javac version 9.0.1 is not supported. You have to install version 1.8.0."]
40+
javacVersion: "9.0.1"
41+
},
42+
{
43+
javacVersion: "10"
44+
},
45+
{
46+
javacVersion: "10.0.1"
4347
},
4448
{
4549
javacVersion: "1.7.0",

0 commit comments

Comments
 (0)