Skip to content
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

[build] remove Xamarin.Android.CSharp.targets #9609

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

jonathanpeppers
Copy link
Member

@jonathanpeppers jonathanpeppers commented Dec 10, 2024

Remove Xamarin.Android.CSharp.targets as this file is only used in Xamarin.Android projects! SDK-style projects rely on "magical" imports when you have $(TargetPlatformIdentifier)=android, and so projects do not ever import this file directly.

Removing this file led me to find other files we can delete:

  • build-tools\scripts\MonoAndroidFramework.props imported by some Xamarin.Android projects in the repo.

  • samples\VSAndroidApp unused Xamarin.Android sample

  • tests\Mono.Android-Tests\Runtime-AppBundle unused Xamarin.Android test project

  • tests\Mono.Android-Tests\Runtime-MultiDex unused Xamarin.Android test project

I also removed any Xamarin.Android .csproj file, where I found a ".NET" equivalent. We could likely remove even more in the future, but we'd want to check if the code or tests could be useful.

Remove `Xamarin.Android.CSharp.targets` as this file is only used in
Xamarin.Android projects! SDK-style project rely on "magical" imports
when you have `$(TargetPlatformIdentifier)=android`, and so projects
do not ever import this file directly.

Removing this file led me to find other files we can delete:

* `build-tools\scripts\MonoAndroidFramework.props` imported by some
  Xamarin.Android projects in the repo.

* `samples\VSAndroidApp` unused Xamarin.Android sample

* `tests\Mono.Android-Tests\Runtime-AppBundle` unused Xamarin.Android
  test project

* `tests\Mono.Android-Tests\Runtime-MultiDex` unused Xamarin.Android
  test project

I also removed any Xamarin.Android `.csproj` file, where I found a
".NET" equivalent. We could likely remove even more in the future, but
we'd want to check if the code or tests could be useful.
@jonathanpeppers jonathanpeppers marked this pull request as ready for review December 10, 2024 17:12

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 34 out of 54 changed files in this pull request and generated no suggestions.

Files not reviewed (20)
  • build-tools/scripts/MonoAndroidFramework.props: Language not supported
  • build-tools/scripts/MonoAndroidFramework.targets: Language not supported
  • samples/HelloWorld/HelloLibrary/HelloLibrary.csproj: Language not supported
  • samples/HelloWorld/HelloWorld/HelloWorld.csproj: Language not supported
  • samples/VSAndroidApp/Assets/AboutAssets.txt: Language not supported
  • samples/VSAndroidApp/Properties/AndroidManifest.xml: Language not supported
  • samples/VSAndroidApp/Resources/AboutResources.txt: Language not supported
  • samples/VSAndroidApp/Resources/layout/activity_main.xml: Language not supported
  • samples/VSAndroidApp/Resources/layout/content_main.xml: Language not supported
  • samples/VSAndroidApp/Resources/menu/menu_main.xml: Language not supported
  • samples/VSAndroidApp/Resources/mipmap-anydpi-v26/ic_launcher.xml: Language not supported
  • samples/VSAndroidApp/Resources/mipmap-anydpi-v26/ic_launcher_round.xml: Language not supported
  • samples/VSAndroidApp/Resources/values/colors.xml: Language not supported
  • samples/VSAndroidApp/Resources/values/dimens.xml: Language not supported
  • samples/VSAndroidApp/Resources/values/ic_launcher_background.xml: Language not supported
  • samples/VSAndroidApp/Resources/values/strings.xml: Language not supported
  • samples/VSAndroidApp/Resources/values/styles.xml: Language not supported
  • samples/VSAndroidApp/VSAndroidApp.csproj: Language not supported
  • samples/VSAndroidApp/MainActivity.cs: Evaluated as low risk
  • samples/VSAndroidApp/Properties/AssemblyInfo.cs: Evaluated as low risk
@jonathanpeppers
Copy link
Member Author

We can ignore the one APK test failure:

Mono.Android.NET_Tests, Xamarin.Android.NetTests.AndroidClientHandlerTests.AndroidHandlerTestBase.Redirect_POST_With_Content_Works / Debug
System.Net.Http.HttpRequestException : Response status code does not indicate success: 502 (Bad Gateway).

@jonathanpeppers jonathanpeppers merged commit 68da9e9 into main Dec 10, 2024
56 of 58 checks passed
@jonathanpeppers jonathanpeppers deleted the dev/peppers/remove/stuff branch December 10, 2024 18:59
grendello added a commit that referenced this pull request Jan 7, 2025
* main: (25 commits)
  [CI] Break "Linux Tests" into 2 parallel jobs. (#9642)
  Fix `WorkloadDependencies.proj` build. (#9648)
  [CI] Set "WearOS Tests" parallelization to 2 agents. (#9639)
  [CI] Break "Package Tests" into 2 parallel jobs. (#9638)
  Bump to DevDiv/android-platform-support@3b4e16f1 (#9632)
  [NativeAOT] improve build logic, part 2 (#9631)
  Bump to dotnet/java-interop@2c06b3c2 (#9633)
  [NativeAOT] improve build logic, part 1 (#9614)
  [build] Generate `WorkloadDependencies.json` (#9613)
  [monodroid] remove `monodroid_get_log_categories()` (#9625)
  [monodroid] remove `_monodroid_get_identity_hash_code` (#9622)
  Bump to dotnet/java-interop@f800ea52 (#9607)
  [XABT] Break BuildApk into individual tasks for each content type. (#9612)
  [Mono.Android] Bind Android API-Baklava DP1 (#9594)
  [Xamarin.Android.Build.Tasks] Extract `BuildArchive` from `BuildApk` (#9556)
  [NativeAOT] MSBuild-related logic to get projects to build (#9583)
  [build] remove remnants of `OpenTK-1.0.dll` (#9610)
  [build] remove `Xamarin.Android.CSharp.targets` (#9609)
  [build] runtime "flavors" part 2 (#9598)
  Bump com.android.tools.build:manifest-merger to 31.7.3 (#9600)
  ...
grendello added a commit that referenced this pull request Jan 7, 2025
* dev/grendel/use-libc++: (25 commits)
  [CI] Break "Linux Tests" into 2 parallel jobs. (#9642)
  Fix `WorkloadDependencies.proj` build. (#9648)
  [CI] Set "WearOS Tests" parallelization to 2 agents. (#9639)
  [CI] Break "Package Tests" into 2 parallel jobs. (#9638)
  Bump to DevDiv/android-platform-support@3b4e16f1 (#9632)
  [NativeAOT] improve build logic, part 2 (#9631)
  Bump to dotnet/java-interop@2c06b3c2 (#9633)
  [NativeAOT] improve build logic, part 1 (#9614)
  [build] Generate `WorkloadDependencies.json` (#9613)
  [monodroid] remove `monodroid_get_log_categories()` (#9625)
  [monodroid] remove `_monodroid_get_identity_hash_code` (#9622)
  Bump to dotnet/java-interop@f800ea52 (#9607)
  [XABT] Break BuildApk into individual tasks for each content type. (#9612)
  [Mono.Android] Bind Android API-Baklava DP1 (#9594)
  [Xamarin.Android.Build.Tasks] Extract `BuildArchive` from `BuildApk` (#9556)
  [NativeAOT] MSBuild-related logic to get projects to build (#9583)
  [build] remove remnants of `OpenTK-1.0.dll` (#9610)
  [build] remove `Xamarin.Android.CSharp.targets` (#9609)
  [build] runtime "flavors" part 2 (#9598)
  Bump com.android.tools.build:manifest-merger to 31.7.3 (#9600)
  ...
@github-actions github-actions bot locked and limited conversation to collaborators Jan 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants