Skip to content

Commit 3ae0d9c

Browse files
committed
Merge branch 'main' into native-profiling-and-debugging
* main: Revert "[Xamarin.Android.Build.Tasks] fix cases of missing `@(Reference)` (dotnet#7642)" (dotnet#7726)
2 parents b9fa158 + c1efcb5 commit 3ae0d9c

File tree

3 files changed

+2
-64
lines changed

3 files changed

+2
-64
lines changed

src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.AssemblyResolution.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ _ResolveAssemblies MSBuild target.
4444
</PropertyGroup>
4545

4646
<Target Name="_ComputeFilesToPublishForRuntimeIdentifiers"
47-
DependsOnTargets="BuildOnlySettings;_FixupIntermediateAssembly;ResolveReferences;ComputeFilesToPublish;$(_RunAotMaybe)"
47+
DependsOnTargets="_FixupIntermediateAssembly;ResolveReferences;ComputeFilesToPublish;$(_RunAotMaybe)"
4848
Returns="@(ResolvedFileToPublish)">
4949
<ItemGroup>
5050
<ResolvedFileToPublish Remove="@(_SourceItemsToCopyToPublishDirectory)" />

src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/XASdkTests.cs

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,67 +1079,6 @@ public void DotNetIncremental ([Values (true, false)] bool isRelease, [Values ("
10791079
}
10801080
}
10811081

1082-
[Test]
1083-
public void ProjectDependencies ([Values(true, false)] bool projectReference)
1084-
{
1085-
// Setup dependencies App A -> Lib B -> Lib C
1086-
var path = Path.Combine ("temp", TestName);
1087-
1088-
var libB = new XASdkProject (outputType: "Library") {
1089-
ProjectName = "LibraryB",
1090-
IsRelease = true,
1091-
};
1092-
libB.Sources.Clear ();
1093-
libB.Sources.Add (new BuildItem.Source ("Foo.cs") {
1094-
TextContent = () => @"public class Foo {
1095-
public Foo () {
1096-
var bar = new Bar();
1097-
}
1098-
}",
1099-
});
1100-
1101-
var libC = new XASdkProject (outputType: "Library") {
1102-
ProjectName = "LibraryC",
1103-
IsRelease = true,
1104-
};
1105-
libC.Sources.Clear ();
1106-
libC.Sources.Add (new BuildItem.Source ("Bar.cs") {
1107-
TextContent = () => "public class Bar { }",
1108-
});
1109-
1110-
// Add a @(Reference) or @(ProjectReference)
1111-
if (projectReference) {
1112-
libB.AddReference (libC);
1113-
} else {
1114-
libB.OtherBuildItems.Add (new BuildItem.Reference ($@"..\{libC.ProjectName}\bin\Release\{libC.TargetFramework}\{libC.ProjectName}.dll"));
1115-
}
1116-
1117-
// Build libraries
1118-
var libCBuilder = CreateDotNetBuilder (libC, Path.Combine (path, libC.ProjectName));
1119-
Assert.IsTrue (libCBuilder.Build (), $"{libC.ProjectName} should succeed");
1120-
var libBBuilder = CreateDotNetBuilder (libB, Path.Combine (path, libB.ProjectName));
1121-
Assert.IsTrue (libBBuilder.Build (), $"{libB.ProjectName} should succeed");
1122-
1123-
var appA = new XASdkProject {
1124-
ProjectName = "AppA",
1125-
IsRelease = true,
1126-
Sources = {
1127-
new BuildItem.Source ("Bar.cs") {
1128-
TextContent = () => "public class Bar : Foo { }",
1129-
}
1130-
}
1131-
};
1132-
appA.AddReference (libB);
1133-
var appBuilder = CreateDotNetBuilder (appA, Path.Combine (path, appA.ProjectName));
1134-
Assert.IsTrue (appBuilder.Build (), $"{appA.ProjectName} should succeed");
1135-
1136-
var apkPath = Path.Combine (FullProjectDirectory, appA.OutputPath, $"{appA.PackageName}-Signed.apk");
1137-
FileAssert.Exists (apkPath);
1138-
var helper = new ArchiveAssemblyHelper (apkPath);
1139-
helper.AssertContainsEntry ($"assemblies/{libB.ProjectName}.dll");
1140-
helper.AssertContainsEntry ($"assemblies/{libC.ProjectName}.dll");
1141-
}
1142-
11431082
[Test]
11441083
public void DotNetDesignTimeBuild ()
11451084
{

src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2011,8 +2011,7 @@ because xbuild doesn't support framework reference assemblies.
20112011
DependsOnTargets="_ResolveAssemblies"
20122012
>
20132013
<ItemGroup>
2014-
<!-- In .NET 6+, the .NET SDK locates these files -->
2015-
<_AndroidResolvedSatellitePaths Condition=" '$(UsingAndroidNETSdk)' != 'true' " Include="@(ReferenceSatellitePaths)" />
2014+
<_AndroidResolvedSatellitePaths Include="@(ReferenceSatellitePaths)" />
20162015
<!-- Satellites from the current project, see: https://github.com/microsoft/msbuild/blob/master/src/Tasks/Microsoft.Common.CurrentVersion.targets#L4283-L4299 -->
20172016
<_AndroidResolvedSatellitePaths Include="@(IntermediateSatelliteAssembliesWithTargetPath->'$(OutDir)%(Culture)\$(TargetName).resources.dll')" />
20182017
</ItemGroup>

0 commit comments

Comments
 (0)