Skip to content

Commit

Permalink
Revert "[Xamarin.Android.Build.Tasks] fix .aar files flowing from p…
Browse files Browse the repository at this point in the history
…roject 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.
  • Loading branch information
jonathanpeppers committed Jul 18, 2023
1 parent 02bd7db commit f055975
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ This item group populates the Build Action drop-down in IDEs.
<AndroidJavaLibrary Include="@(AndroidLibrary)" Condition=" '%(AndroidLibrary.Extension)' == '.jar' and '%(AndroidLibrary.Bind)' != 'true' " />
<EmbeddedJar Include="@(AndroidLibrary)" Condition=" '%(AndroidLibrary.Extension)' == '.jar' and '%(AndroidLibrary.Bind)' == 'true' " />
<!-- .aar files should be copied to $(OutputPath) in .NET 6-->
<None Include="@(AndroidAarLibrary)" TfmSpecificPackageFile="%(AndroidAarLibrary.Pack)" Pack="false" CopyToOutputDirectory="PreserveNewest" Link="%(Filename)%(Extension)" />
<None Include="@(LibraryProjectZip)" TfmSpecificPackageFile="%(LibraryProjectZip.Pack)" Pack="false" CopyToOutputDirectory="PreserveNewest" Link="%(Filename)%(Extension)" />
</ItemGroup>
<!-- Legacy binding projects -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,6 @@ public Foo ()
new AndroidItem.AndroidLibrary ("sub\\directory\\bar.aar") {
WebContent = "https://repo1.maven.org/maven2/com/balysv/material-menu/1.1.0/material-menu-1.1.0.aar",
},
new AndroidItem.AndroidLibrary ("sub\\directory\\baz.aar") {
WebContent = "https://repo1.maven.org/maven2/com/soundcloud/android/android-crop/1.0.1/android-crop-1.0.1.aar",
MetadataValues = "Bind=false",
},
new AndroidItem.AndroidJavaSource ("JavaSourceTestExtension.java") {
Encoding = Encoding.ASCII,
TextContent = () => ResourceData.JavaSourceTestExtension,
Expand All @@ -139,10 +135,6 @@ public Foo ()
libB.OtherBuildItems.Add (new AndroidItem.AndroidLibrary ("sub\\directory\\arm64-v8a\\libfoo.so") {
BinaryContent = () => Array.Empty<byte> (),
});
libB.OtherBuildItems.Add (new AndroidItem.AndroidLibrary (default (Func<string>)) {
Update = () => "sub\\directory\\baz.aar",
MetadataValues = "Bind=false",
});
libB.OtherBuildItems.Add (new AndroidItem.AndroidNativeLibrary (default (Func<string>)) {
Update = () => "libfoo.so",
MetadataValues = "Link=x86\\libfoo.so",
Expand All @@ -164,7 +156,6 @@ public Foo ()
aarPath = Path.Combine (libBOutputPath, $"{libB.ProjectName}.aar");
FileAssert.Exists (aarPath);
FileAssert.Exists (Path.Combine (libBOutputPath, "bar.aar"));
FileAssert.Exists (Path.Combine (libBOutputPath, "baz.aar"));
using (var aar = ZipHelper.OpenZip (aarPath)) {
aar.AssertContainsEntry (aarPath, "assets/foo/foo.txt");
aar.AssertContainsEntry (aarPath, "res/layout/mylayout.xml");
Expand Down Expand Up @@ -226,10 +217,6 @@ public Foo ()
Assert.IsTrue (DexUtils.ContainsClass (className, dexFile, AndroidSdkPath), $"`{dexFile}` should include `{className}`!");
className = "Lcom/xamarin/android/test/msbuildtest/JavaSourceTestExtension;";
Assert.IsTrue (DexUtils.ContainsClass (className, dexFile, AndroidSdkPath), $"`{dexFile}` should include `{className}`!");
className = "Lcom/balysv/material/drawable/menu/MaterialMenu;"; // from material-menu-1.1.0.aar
Assert.IsTrue (DexUtils.ContainsClass (className, dexFile, AndroidSdkPath), $"`{dexFile}` should include `{className}`!");
className = "Lcom/soundcloud/android/crop/Crop;"; // from android-crop-1.0.1.aar
Assert.IsTrue (DexUtils.ContainsClass (className, dexFile, AndroidSdkPath), $"`{dexFile}` should include `{className}`!");

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

0 comments on commit f055975

Please sign in to comment.