@@ -71,7 +71,7 @@ public void Ndk_MultipleNdkVersionsInSdk ()
71
71
{
72
72
// Must match like-named constants in AndroidSdkBase
73
73
const int MinimumCompatibleNDKMajorVersion = 16 ;
74
- const int MaximumCompatibleNDKMajorVersion = 21 ;
74
+ const int MaximumCompatibleNDKMajorVersion = 23 ;
75
75
76
76
CreateSdks ( out string root , out string jdk , out string ndk , out string sdk ) ;
77
77
@@ -91,8 +91,10 @@ public void Ndk_MultipleNdkVersionsInSdk ()
91
91
"21.2.6472646" ,
92
92
"21.3.6528147" ,
93
93
"22.0.7026061" ,
94
+ "22.1.7171670" ,
95
+ "23.1.7779620" ,
94
96
} ;
95
- string expectedVersion = "21.3.6528147 " ;
97
+ string expectedVersion = "23.1.7779620 " ;
96
98
string expectedNdkPath = Path . Combine ( sdk , "ndk" , expectedVersion ) ;
97
99
98
100
try {
@@ -137,7 +139,7 @@ public void Ndk_PathInSdk()
137
139
File . WriteAllText ( Path . Combine ( ndkPath , $ "ndk-stack{ extension } ") , "" ) ;
138
140
139
141
var info = new AndroidSdkInfo ( logger , androidSdkPath : sdk , androidNdkPath : null , javaSdkPath : jdk ) ;
140
-
142
+
141
143
Assert . AreEqual ( ndkPath , info . AndroidNdkPath , "AndroidNdkPath not found inside sdk!" ) ;
142
144
}
143
145
finally
@@ -308,7 +310,7 @@ public void Sdk_GetCommandLineToolsPaths ()
308
310
var latestToolsVersion = "latest" ;
309
311
var toolsVersion = "2.1" ;
310
312
var higherToolsVersion = "11.2" ;
311
-
313
+
312
314
void recreateCmdlineToolsDirectory ( ) {
313
315
Directory . Delete ( cmdlineTools , recursive : true ) ;
314
316
Directory . CreateDirectory ( cmdlineTools ) ;
@@ -324,7 +326,7 @@ void recreateCmdlineToolsDirectory () {
324
326
325
327
Assert . AreEqual ( toolsPaths . Count ( ) , 1 , "Incorrect number of elements" ) ;
326
328
Assert . AreEqual ( toolsPaths . First ( ) , Path . Combine ( sdk , "cmdline-tools" , toolsVersion ) , "Incorrect command line tools path" ) ;
327
-
329
+
328
330
// Test that cmdline-tools is preferred over tools
329
331
recreateCmdlineToolsDirectory ( ) ;
330
332
CreateFauxAndroidSdkToolsDirectory ( sdk , createToolsDir : true , toolsVersion : latestToolsVersion , createOldToolsDir : true ) ;
@@ -347,7 +349,7 @@ void recreateCmdlineToolsDirectory () {
347
349
&& toolsPathsList [ 1 ] . Equals ( Path . Combine ( sdk , "cmdline-tools" , higherToolsVersion ) , StringComparison . Ordinal )
348
350
&& toolsPathsList [ 2 ] . Equals ( Path . Combine ( sdk , "cmdline-tools" , toolsVersion ) , StringComparison . Ordinal )
349
351
&& toolsPathsList [ 3 ] . Equals ( Path . Combine ( sdk , "tools" ) , StringComparison . Ordinal ) ;
350
-
352
+
351
353
Assert . IsTrue ( isOrderCorrect , "Tools order is not descending" ) ;
352
354
} finally {
353
355
Directory . Delete ( root , recursive : true ) ;
@@ -386,10 +388,10 @@ static void CreateFauxAndroidSdkToolsDirectory (string androidSdkDirectory, bool
386
388
if ( createToolsDir ) {
387
389
string androidSdkToolsPath = Path . Combine ( androidSdkDirectory , "cmdline-tools" , toolsVersion ?? "1.0" ) ;
388
390
string androidSdkToolsBinPath = Path . Combine ( androidSdkToolsPath , "bin" ) ;
389
-
391
+
390
392
Directory . CreateDirectory ( androidSdkToolsPath ) ;
391
393
Directory . CreateDirectory ( androidSdkToolsBinPath ) ;
392
-
394
+
393
395
File . WriteAllText ( Path . Combine ( androidSdkToolsBinPath , IsWindows ? "lint.bat" : "lint" ) , "" ) ;
394
396
}
395
397
@@ -399,7 +401,7 @@ static void CreateFauxAndroidSdkToolsDirectory (string androidSdkDirectory, bool
399
401
400
402
Directory . CreateDirectory ( androidSdkToolsPath ) ;
401
403
Directory . CreateDirectory ( androidSdkToolsBinPath ) ;
402
-
404
+
403
405
File . WriteAllText ( Path . Combine ( androidSdkToolsBinPath , IsWindows ? "lint.bat" : "lint" ) , "" ) ;
404
406
}
405
407
@@ -414,7 +416,7 @@ static void CreateFauxAndroidSdkDirectory (
414
416
ApiInfo [ ] apiLevels = null )
415
417
{
416
418
CreateFauxAndroidSdkToolsDirectory ( androidSdkDirectory , createToolsDir , toolsVersion , createOldToolsDir ) ;
417
-
419
+
418
420
var androidSdkPlatformToolsPath = Path . Combine ( androidSdkDirectory , "platform-tools" ) ;
419
421
var androidSdkPlatformsPath = Path . Combine ( androidSdkDirectory , "platforms" ) ;
420
422
var androidSdkBuildToolsPath = Path . Combine ( androidSdkDirectory , "build-tools" , buildToolsVersion ) ;
0 commit comments