Skip to content

[Xamarin.Android.Build.Tasks] unify $(AndroidCodegenTarget) #9806

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

Merged
merged 1 commit into from
Feb 19, 2025

Conversation

jonathanpeppers
Copy link
Member

dbb0b92 introduced $(_AndroidCodeGenerationTarget), but I didn't notice that $(AndroidCodegenTarget) already exists!

Unify on $(AndroidCodegenTarget), making the defaults:

  • $(AndroidCodegenTarget)=XAJavaInterop1 if blank, when not using NativeAOT

  • $(AndroidCodegenTarget)=JavaInterop1 if blank, when using NativeAOT

dbb0b92 introduced `$(_AndroidCodeGenerationTarget)`, but I didn't
notice that `$(AndroidCodegenTarget)` already exists!

Unify on `$(AndroidCodegenTarget)`, making the defaults:

* `$(AndroidCodegenTarget)=XAJavaInterop1` if blank, when not using NativeAOT

* `$(AndroidCodegenTarget)=JavaInterop1` if blank, when using NativeAOT
@@ -47,7 +47,6 @@ Copyright (C) 2012 Xamarin Inc. All rights reserved.
<TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == '' And '$(AndroidUseLatestPlatformSdk)' == 'False'">v5.0</TargetFrameworkVersion>
<LangVersion Condition=" '$(LangVersion)' == '' ">8.0</LangVersion>
<AndroidClassParser Condition=" '$(AndroidClassParser)' == '' ">jar2xml</AndroidClassParser>
<AndroidCodegenTarget Condition=" '$(AndroidCodegenTarget)' == '' ">XAJavaInterop1</AndroidCodegenTarget>
Copy link
Member Author

Choose a reason for hiding this comment

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

This should already be set in Microsoft.Android.Sdk.DefaultProperties.targets.

@jonathanpeppers jonathanpeppers marked this pull request as ready for review February 18, 2025 20:38
@jonpryor jonpryor merged commit d70db5b into main Feb 19, 2025
58 checks passed
@jonpryor jonpryor deleted the dev/peppers/AndroidCodegenTarget branch February 19, 2025 13:07
grendello added a commit that referenced this pull request Feb 20, 2025
* main:
  Bump com.android.tools.build:manifest-merger from 31.8.0 to 31.8.1 (#9800)
  [Xamarin.Android.Build.Tasks] unify `$(AndroidCodegenTarget)` (#9806)
  Bump to dotnet/java-interop@f30e420a (#9793)
@github-actions github-actions bot locked and limited conversation to collaborators Mar 22, 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.

3 participants