Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ static class KnownProperties
public const string AndroidLatestStableFrameworkVersion = "AndroidLatestStableFrameworkVersion";
public const string AndroidMxeFullPath = "AndroidMxeFullPath";
public const string AndroidNdkDirectory = "AndroidNdkDirectory";
public const string AndroidPackVersion = "AndroidPackVersion";
public const string AndroidPackVersionSuffix = "AndroidPackVersionSuffix";
public const string AndroidSdkDirectory = "AndroidSdkDirectory";
public const string AndroidSupportedHostJitAbis = "AndroidSupportedHostJitAbis";
public const string AndroidSupportedTargetAotAbis = "AndroidSupportedTargetAotAbis";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ namespace Xamarin.Android.Prepare
properties.Add (KnownProperties.AndroidLatestStableFrameworkVersion, StripQuotes ("@AndroidLatestStableFrameworkVersion@"));
properties.Add (KnownProperties.AndroidMxeFullPath, StripQuotes (@"@AndroidMxeFullPath@"));
properties.Add (KnownProperties.AndroidNdkDirectory, StripQuotes (@"@AndroidNdkDirectory@"));
properties.Add (KnownProperties.AndroidPackVersion, StripQuotes (@"@AndroidPackVersion@"));
properties.Add (KnownProperties.AndroidPackVersionSuffix, StripQuotes (@"@AndroidPackVersionSuffix@"));
properties.Add (KnownProperties.AndroidSdkDirectory, StripQuotes (@"@AndroidSdkDirectory@"));
properties.Add (KnownProperties.AndroidSupportedHostJitAbis, StripQuotes ("@AndroidSupportedHostJitAbis@"));
properties.Add (KnownProperties.AndroidSupportedTargetAotAbis, StripQuotes ("@AndroidSupportedTargetAotAbis@"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,12 @@ GeneratedFile Get_XABuildConfig_cs (Context context)
{
const string OutputFileName = "XABuildConfig.cs";

string xaVersion = context.Properties.GetRequiredValue (KnownProperties.AndroidPackVersion);
string? xaVersionSuffix = context.Properties.GetRequiredValue (KnownProperties.AndroidPackVersionSuffix);
if (!String.IsNullOrEmpty(xaVersionSuffix)) {
xaVersion = $"{xaVersion}-{xaVersionSuffix}";
}

var replacements = new Dictionary<string, string> (StringComparer.Ordinal) {
{ "@NDK_REVISION@", context.BuildInfo.NDKRevision },
{ "@NDK_RELEASE@", BuildAndroidPlatforms.AndroidNdkVersion },
Expand All @@ -178,7 +184,7 @@ GeneratedFile Get_XABuildConfig_cs (Context context)
{ "@ANDROID_DEFAULT_TARGET_DOTNET_API_LEVEL@", context.Properties.GetRequiredValue (KnownProperties.AndroidDefaultTargetDotnetApiLevel) },
{ "@ANDROID_LATEST_STABLE_API_LEVEL@", context.Properties.GetRequiredValue (KnownProperties.AndroidLatestStableApiLevel) },
{ "@ANDROID_LATEST_UNSTABLE_API_LEVEL@", context.Properties.GetRequiredValue (KnownProperties.AndroidLatestUnstableApiLevel) },
{ "@XAMARIN_ANDROID_VERSION@", context.Properties.GetRequiredValue (KnownProperties.ProductVersion) },
{ "@XAMARIN_ANDROID_VERSION@", xaVersion },
{ "@XAMARIN_ANDROID_COMMIT_HASH@", context.BuildInfo.XACommitHash },
{ "@XAMARIN_ANDROID_BRANCH@", context.BuildInfo.XABranch },
};
Expand Down
2 changes: 2 additions & 0 deletions build-tools/xaprepare/xaprepare/xaprepare.targets
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
<Replacement Include="@AndroidMxeFullPath@=$(AndroidMxeFullPath)" />
<Replacement Include="@AndroidNdkDirectory@=$(AndroidNdkDirectory)" />
<Replacement Include="@AndroidNdkVersion@=$(AndroidNdkVersion)" />
<Replacement Include="@AndroidPackVersion@=$(AndroidPackVersion)" />
<Replacement Include="@AndroidPackVersionSuffix@=$(AndroidPackVersionSuffix)" />
<Replacement Include="@AndroidSdkDirectory@=$(AndroidSdkDirectory)" />
<Replacement Include="@AndroidSupportedHostJitAbis@=$(AndroidSupportedHostJitAbis)" />
<Replacement Include="@AndroidSupportedTargetAotAbis@=$(AndroidSupportedTargetAotAbis)" />
Expand Down