Skip to content

Commit f055975

Browse files
Revert "[Xamarin.Android.Build.Tasks] fix .aar files flowing from project references (#8193)"
Context: #8196 This reverts commit 02bd7db. Given the issue found with building .NET MAUI. Let's let the change "cook" a bit before servicing this change.
1 parent 02bd7db commit f055975

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.AvailableItems.targets

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ This item group populates the Build Action drop-down in IDEs.
103103
<AndroidJavaLibrary Include="@(AndroidLibrary)" Condition=" '%(AndroidLibrary.Extension)' == '.jar' and '%(AndroidLibrary.Bind)' != 'true' " />
104104
<EmbeddedJar Include="@(AndroidLibrary)" Condition=" '%(AndroidLibrary.Extension)' == '.jar' and '%(AndroidLibrary.Bind)' == 'true' " />
105105
<!-- .aar files should be copied to $(OutputPath) in .NET 6-->
106-
<None Include="@(AndroidAarLibrary)" TfmSpecificPackageFile="%(AndroidAarLibrary.Pack)" Pack="false" CopyToOutputDirectory="PreserveNewest" Link="%(Filename)%(Extension)" />
107106
<None Include="@(LibraryProjectZip)" TfmSpecificPackageFile="%(LibraryProjectZip.Pack)" Pack="false" CopyToOutputDirectory="PreserveNewest" Link="%(Filename)%(Extension)" />
108107
</ItemGroup>
109108
<!-- Legacy binding projects -->

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,6 @@ public Foo ()
117117
new AndroidItem.AndroidLibrary ("sub\\directory\\bar.aar") {
118118
WebContent = "https://repo1.maven.org/maven2/com/balysv/material-menu/1.1.0/material-menu-1.1.0.aar",
119119
},
120-
new AndroidItem.AndroidLibrary ("sub\\directory\\baz.aar") {
121-
WebContent = "https://repo1.maven.org/maven2/com/soundcloud/android/android-crop/1.0.1/android-crop-1.0.1.aar",
122-
MetadataValues = "Bind=false",
123-
},
124120
new AndroidItem.AndroidJavaSource ("JavaSourceTestExtension.java") {
125121
Encoding = Encoding.ASCII,
126122
TextContent = () => ResourceData.JavaSourceTestExtension,
@@ -139,10 +135,6 @@ public Foo ()
139135
libB.OtherBuildItems.Add (new AndroidItem.AndroidLibrary ("sub\\directory\\arm64-v8a\\libfoo.so") {
140136
BinaryContent = () => Array.Empty<byte> (),
141137
});
142-
libB.OtherBuildItems.Add (new AndroidItem.AndroidLibrary (default (Func<string>)) {
143-
Update = () => "sub\\directory\\baz.aar",
144-
MetadataValues = "Bind=false",
145-
});
146138
libB.OtherBuildItems.Add (new AndroidItem.AndroidNativeLibrary (default (Func<string>)) {
147139
Update = () => "libfoo.so",
148140
MetadataValues = "Link=x86\\libfoo.so",
@@ -164,7 +156,6 @@ public Foo ()
164156
aarPath = Path.Combine (libBOutputPath, $"{libB.ProjectName}.aar");
165157
FileAssert.Exists (aarPath);
166158
FileAssert.Exists (Path.Combine (libBOutputPath, "bar.aar"));
167-
FileAssert.Exists (Path.Combine (libBOutputPath, "baz.aar"));
168159
using (var aar = ZipHelper.OpenZip (aarPath)) {
169160
aar.AssertContainsEntry (aarPath, "assets/foo/foo.txt");
170161
aar.AssertContainsEntry (aarPath, "res/layout/mylayout.xml");
@@ -226,10 +217,6 @@ public Foo ()
226217
Assert.IsTrue (DexUtils.ContainsClass (className, dexFile, AndroidSdkPath), $"`{dexFile}` should include `{className}`!");
227218
className = "Lcom/xamarin/android/test/msbuildtest/JavaSourceTestExtension;";
228219
Assert.IsTrue (DexUtils.ContainsClass (className, dexFile, AndroidSdkPath), $"`{dexFile}` should include `{className}`!");
229-
className = "Lcom/balysv/material/drawable/menu/MaterialMenu;"; // from material-menu-1.1.0.aar
230-
Assert.IsTrue (DexUtils.ContainsClass (className, dexFile, AndroidSdkPath), $"`{dexFile}` should include `{className}`!");
231-
className = "Lcom/soundcloud/android/crop/Crop;"; // from android-crop-1.0.1.aar
232-
Assert.IsTrue (DexUtils.ContainsClass (className, dexFile, AndroidSdkPath), $"`{dexFile}` should include `{className}`!");
233220

234221
// Check environment variable
235222
var environmentFiles = EnvironmentHelper.GatherEnvironmentFiles (intermediate, "x86", required: true);

0 commit comments

Comments
 (0)