Skip to content

[Xamarin.Android.Build.Tasks] remove $XAMARIN_BUILD_ID #9223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 20, 2024
Merged
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 @@ -139,7 +139,6 @@ Copyright (C) 2016 Xamarin. All rights reserved.
AndroidPackageName="$(_AndroidPackage)"
EnablePreloadAssembliesDefault="$(_AndroidEnablePreloadAssembliesDefault)"
InstantRunEnabled="$(_InstantRunEnabled)">
<Output TaskParameter="BuildId" PropertyName="_XamarinBuildId" />
</GeneratePackageManagerJava>
</Target>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ public class GeneratePackageManagerJava : AndroidTask
{
public override string TaskPrefix => "GPM";

Guid buildId = Guid.NewGuid ();

[Required]
public ITaskItem[] ResolvedAssemblies { get; set; }

Expand Down Expand Up @@ -81,9 +79,6 @@ public class GeneratePackageManagerJava : AndroidTask
public bool EnableSGenConcurrent { get; set; }
public string? CustomBundleConfigFile { get; set; }

[Output]
public string BuildId { get; set; }

bool _Debug {
get {
return string.Equals (Debug, "true", StringComparison.OrdinalIgnoreCase);
Expand All @@ -92,9 +87,6 @@ bool _Debug {

public override bool RunTask ()
{
BuildId = buildId.ToString ();
Log.LogDebugMessage (" [Output] BuildId: {0}", BuildId);

var doc = AndroidAppManifest.Load (Manifest, MonoAndroidHelper.SupportedVersions);
int minApiVersion = doc.MinSdkVersion == null ? 4 : (int) doc.MinSdkVersion;
// We need to include any special assemblies in the Assemblies list
Expand Down Expand Up @@ -191,9 +183,6 @@ void AddEnvironment ()
AddEnvironmentVariable (defaultMonoDebug[0], defaultMonoDebug[1]);
}

if (!environmentParser.HavebuildId)
AddEnvironmentVariable ("XAMARIN_BUILD_ID", BuildId);

if (!environmentParser.HaveHttpMessageHandler) {
if (HttpClientHandlerType == null)
AddEnvironmentVariable (defaultHttpMessageHandler[0], defaultHttpMessageHandler[1]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -942,8 +942,6 @@ public void GenerateJavaStubsAndAssembly ([Values (true, false)] bool isRelease)
var targets = new [] {
"_GenerateJavaStubs",
"_GeneratePackageManagerJava",
"_CompileNativeAssemblySources",
"_CreateApplicationSharedLibraries",
};
var proj = new XamarinAndroidApplicationProject {
IsRelease = isRelease,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ namespace Xamarin.Android.Tasks
class EnvironmentFilesParser
{
public bool BrokenExceptionTransitions { get; set; }
public bool HavebuildId { get; private set; }
public bool HaveHttpMessageHandler { get; private set; }
public bool HaveLogLevel { get; private set; }
public bool HaveMonoDebug { get; private set; }
Expand Down Expand Up @@ -46,8 +45,6 @@ public void Parse (ITaskItem[] environments, SequencePointsMode sequencePointsMo
log.LogCodedWarning ("XA2000", Properties.Resources.XA2000_gcParams_bridgeImpl);
}
}
if (lineToWrite.StartsWith ("XAMARIN_BUILD_ID=", StringComparison.Ordinal))
HavebuildId = true;
if (lineToWrite.StartsWith ("MONO_DEBUG=", StringComparison.Ordinal)) {
HaveMonoDebug = true;
if (sequencePointsMode != SequencePointsMode.None && !lineToWrite.Contains ("gen-compact-seq-points"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1728,17 +1728,9 @@ because xbuild doesn't support framework reference assemblies.
EnableMarshalMethods="$(_AndroidUseMarshalMethods)"
CustomBundleConfigFile="$(AndroidBundleConfigurationFile)"
>
<Output TaskParameter="BuildId" PropertyName="_XamarinBuildId" />
</GeneratePackageManagerJava>
<Touch Files="$(_AndroidStampDirectory)_GeneratePackageManagerJava.stamp" AlwaysCreate="True" />
<WriteLinesToFile
File="$(_AndroidBuildIdFile)"
Lines="$(_XamarinBuildId)"
Overwrite="true"
WriteOnlyWhenDifferent="true"
/>
<ItemGroup>
<FileWrites Include="$(_AndroidBuildIdFile)" />
<FileWrites Include="@(_EnvironmentAssemblySource)" />
</ItemGroup>
</Target>
Expand Down Expand Up @@ -2547,7 +2539,6 @@ because xbuild doesn't support framework reference assemblies.
<Delete Files="$(_AndroidAapt2VersionFile)" />
<Delete Files="$(IntermediateOutputPath)R.txt" />
<Delete Files="$(_AndroidMainDexListFile)" />
<Delete Files="$(_AndroidBuildIdFile)" />
<Delete Files="$(_ResolvedUserAssembliesHashFile)" />
</Target>

Expand Down
Loading