@@ -23,10 +23,6 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
23
23
{ name : "lazy" , version : "^1.0.11" }
24
24
] ;
25
25
26
- private get sysInfoData ( ) : ISysInfoData {
27
- return this . $sysInfo . getSysInfo ( path . join ( __dirname , ".." , ".." , "package.json" ) ) . wait ( ) ;
28
- }
29
-
30
26
private _androidProjectPropertiesManagers : IDictionary < IAndroidProjectPropertiesManager > ;
31
27
32
28
constructor ( private $androidEmulatorServices : Mobile . IEmulatorPlatformServices ,
@@ -99,7 +95,8 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
99
95
100
96
// this call will fail in case `android` is not set correctly.
101
97
this . $androidToolsInfo . getPathToAndroidExecutable ( { showWarningsAsErrors : true } ) . wait ( ) ;
102
- this . $androidToolsInfo . validateJavacVersion ( this . sysInfoData . javacVersion , { showWarningsAsErrors : true } ) . wait ( ) ;
98
+ let javaCompilerVersion = this . $sysInfo . getJavaCompilerVersion ( ) . wait ( ) ;
99
+ this . $androidToolsInfo . validateJavacVersion ( javaCompilerVersion , { showWarningsAsErrors : true } ) . wait ( ) ;
103
100
} ) . future < void > ( ) ( ) ;
104
101
}
105
102
@@ -167,14 +164,14 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
167
164
}
168
165
} ) ;
169
166
} else {
170
- this . $logger . printMarkdown ( ` As you are using Node.js \`${ this . sysInfoData . nodeVer } \` Static Binding Generator will be turned off.` +
167
+ this . $logger . printMarkdown ( ` As you are using Node.js \`${ process . version } \` Static Binding Generator will be turned off.` +
171
168
`Upgrade your Node.js to ${ AndroidProjectService . MIN_REQUIRED_NODEJS_VERSION_FOR_STATIC_BINDINGS } or later, so you can use this feature.` ) ;
172
169
}
173
170
} ) . future < any > ( ) ( ) ;
174
171
}
175
172
176
173
private canUseStaticBindingGenerator ( ) : boolean {
177
- return semver . gte ( this . sysInfoData . nodeVer , AndroidProjectService . MIN_REQUIRED_NODEJS_VERSION_FOR_STATIC_BINDINGS ) ;
174
+ return semver . gte ( process . version , AndroidProjectService . MIN_REQUIRED_NODEJS_VERSION_FOR_STATIC_BINDINGS ) ;
178
175
}
179
176
180
177
private useGradleWrapper ( frameworkDir : string ) : boolean {
0 commit comments