@@ -64,7 +64,7 @@ async function createRepositoryCfg(): Promise<void> {
6464async function getJDKPath ( editor : UnityEditor ) : Promise < string > {
6565 let jdkPath : string | undefined = undefined ;
6666
67- if ( satisfies ( editor . version . version , '>= 2019.0.0') ) {
67+ if ( editor . version . isGreaterThanOrEqualTo ( ' 2019.0.0') ) {
6868 logger . info ( 'Using JDK bundled with Unity 2019+' ) ;
6969 jdkPath = await ResolveGlobToPath ( [ editor . editorRootPath , '**' , 'AndroidPlayer' , 'OpenJDK' ] ) ;
7070
@@ -73,7 +73,6 @@ async function getJDKPath(editor: UnityEditor): Promise<string> {
7373 }
7474 } else {
7575 logger . info ( 'Using system JDK for Unity versions prior to 2019' ) ;
76- // use system JDK
7776 jdkPath = process . env . JAVA_HOME || process . env . JDK_HOME ;
7877
7978 if ( ! jdkPath ) {
@@ -88,7 +87,7 @@ async function getJDKPath(editor: UnityEditor): Promise<string> {
8887
8988async function getSdkManager ( editor : UnityEditor ) : Promise < string > {
9089 let globPath : string [ ] = [ ] ;
91- if ( satisfies ( editor . version . version , '>= 2019.0.0') ) {
90+ if ( editor . version . isGreaterThanOrEqualTo ( ' 2019.0.0') ) {
9291 logger . info ( 'Using sdkmanager bundled with Unity 2019+' ) ;
9392 switch ( process . platform ) {
9493 case 'darwin' :
@@ -138,7 +137,7 @@ async function getAndroidSdkPath(editor: UnityEditor, androidTargetSdk: number):
138137 let sdkPath : string ;
139138
140139 // if 2019+ test editor path, else use system android installation
141- if ( satisfies ( editor . version . version , '>= 2019.0.0') ) {
140+ if ( editor . version . isGreaterThanOrEqualTo ( ' 2019.0.0') ) {
142141 try {
143142 sdkPath = await ResolveGlobToPath ( [ editor . editorPath , '**' , 'PlaybackEngines' , 'AndroidPlayer' , 'SDK' , 'platforms' , `android-${ androidTargetSdk } /` ] ) ;
144143 } catch ( error ) {
@@ -185,7 +184,6 @@ async function execSdkManager(sdkManagerPath: string, javaPath: string, args: st
185184 cmdEnv . JAVA_HOME = process . platform === 'win32' ? `"${ javaPath } "` : javaPath ;
186185 cmdEnv . JDK_HOME = process . platform === 'win32' ? `"${ javaPath } "` : javaPath ;
187186 cmdEnv . SKIP_JDK_VERSION_CHECK = 'true' ;
188- cmdEnv . JAVA_TOOL_OPTIONS = '--enable-native-access=ALL-UNNAMED' ;
189187 let cmd = sdkManagerPath ;
190188 let cmdArgs = args ;
191189
0 commit comments