Skip to content

Commit 8722663

Browse files
Allow MaximumCompatibleNDKMajorVersion=28 (#263)
Context: dotnet/android@80559b5 We are already using the 28.x Android NDK, so we should allow it here. I also updated a unit test that was outdated.
1 parent 2609c38 commit 8722663

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/Xamarin.Android.Tools.AndroidSdk/Sdks/AndroidSdkBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ abstract class AndroidSdkBase
1111
{
1212
// When this changes, update the test: Xamarin.Android.Tools.Tests.AndroidSdkInfoTests.Ndk_MultipleNdkVersionsInSdk
1313
const int MinimumCompatibleNDKMajorVersion = 16;
14-
const int MaximumCompatibleNDKMajorVersion = 26;
14+
const int MaximumCompatibleNDKMajorVersion = 28;
1515

1616
static readonly char[] SourcePropertiesKeyValueSplit = new char[] { '=' };
1717

tests/Xamarin.Android.Tools.AndroidSdk-Tests/AndroidSdkInfoTests.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public void Ndk_MultipleNdkVersionsInSdk ()
7171
{
7272
// Must match like-named constants in AndroidSdkBase
7373
const int MinimumCompatibleNDKMajorVersion = 16;
74-
const int MaximumCompatibleNDKMajorVersion = 25;
74+
const int MaximumCompatibleNDKMajorVersion = 28;
7575

7676
CreateSdks(out string root, out string jdk, out string ndk, out string sdk);
7777

@@ -95,9 +95,12 @@ public void Ndk_MultipleNdkVersionsInSdk ()
9595
"23.1.7779620",
9696
"24.0.8215888",
9797
"25.0.8775105",
98-
"26.0.3735928559", // 0xdeadbeef
98+
"26.0.10792818",
99+
"27.0.11718014",
100+
"28.0.12433566",
101+
"29.0.3735928559", // 0xdeadbeef
99102
};
100-
string expectedVersion = "25.0.8775105";
103+
string expectedVersion = ndkVersions [^2]; // Second to last is the highest compatible version
101104
string expectedNdkPath = Path.Combine (sdk, "ndk", expectedVersion);
102105

103106
try {

0 commit comments

Comments
 (0)