xamarin / AndroidX

AndroidX bindings for .NET for Android
MIT License
173 stars 42 forks source link

Clean up unused legacy parts of the AndroidX project template. #889

Closed jpobst closed 1 month ago

jpobst commented 1 month ago

With Classic gone, we can clean up our template a little bit by removing settings that only affected Classic. Additionally, we can remove some things that aren't getting used due to incorrect Condition statements.

This PR should not change our packages in any way. This is verified by ensuring there are no changes to the api-diff or nuget-diff files.


The <AndroidJavaSource> include was already a no-op because Exists does not expand wildcards, so the Condition was always false:

Condition="Exists('..\..\source\@(Model.MavenGroupId)\@(Model.Name)\java\*.java')"

Removing just the Condition caused javac errors because it was now including .java files that were not being included previously.


Most everything else was also a no-op because the Exists and the Include pointed to different locations. (..\..\external vs ..\..\..\external)

<JavaSourceJar
  Include="..\..\externals\@(art.MavenGroupId)\@(art.MavenArtifactId)-sources.jar"
  Condition="Exists('..\..\..\externals\@(art.MavenGroupId)\@(art.MavenArtifactId)-sources.jar')" />