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

Add Conditional Inputs for _GeneratePackageManagerJava and _GenerateJavaStubs #9319

Merged
merged 20 commits into from
Sep 30, 2024

Conversation

dellis1972
Copy link
Contributor

@dellis1972 dellis1972 commented Sep 24, 2024

This commit updates the inputs for _GenerateJavaStubs and _GeneratePackageManagerJava so that the @(AndroidEnvironment) and @(LibraryEnvironments) items are only included if we are building a release build. Or a build which embeds the assemblies into the apk.

This is so that we can evantually fast deploy these files to the device via https://github.com/xamarin/monodroid/pull/1547.
A new unit test has been added to make sure that the environment values can be used correctly on device.

@dellis1972
Copy link
Contributor Author

dellis1972 commented Sep 24, 2024

@dellis1972 dellis1972 marked this pull request as ready for review September 24, 2024 16:55
@jonpryor
Copy link
Member

jonpryor commented Sep 25, 2024

Draft Commit Message:

[Xamarin.Android.Build.Tasks] Add Inputs for _GenerateJavaStubs (#9319)

Context: https://github.com/xamarin/monodroid/pull/1547

This commit updates the Inputs for the `_GenerateJavaStubs` and
`_GeneratePackageManagerJava` targets so that the
`@(AndroidEnvironment)` and `@(LibraryEnvironments)` items are only
included when we are building a release build, or a build which
embeds the assemblies into the apk.

This is so that we can eventually fast deploy these files to the
device; see also xamarin/monodroid#1547. 

To *not* attempt to (eventually) fast deploy `@(AndroidEnvironment)`
and `@(LibraryEnvironments)`, set the (*internal*!) MSBuild property
`$(_AndroidFastDeployEnvironmentFiles)` to False.

A new unit test has been added to make sure that the environment
values can be used correctly on device.

I'm not certain about the R(_AndroidFastDeployEnvironmentFiles) blurb.

@dellis1972 dellis1972 added the do-not-merge PR should not be merged. label Sep 26, 2024
@dellis1972
Copy link
Contributor Author

I found a bug, don't merge it.

@dellis1972 dellis1972 removed the do-not-merge PR should not be merged. label Sep 26, 2024
@jonpryor
Copy link
Member

@dellis1972: FastDeployEnvironmentFiles(False) is failing:

The Environment variable "Foo" was not set.
Expected: String containing "Foo=Bar"
But was: "--------- beginning of main …

I've restarted the tests just in case it's sporadic…

@dellis1972
Copy link
Contributor Author

@dellis1972: FastDeployEnvironmentFiles(False) is failing:

The Environment variable "Foo" was not set.
Expected: String containing "Foo=Bar"
But was: "--------- beginning of main …

I've restarted the tests just in case it's sporadic…

This test is going to fail untl the monodroid side is merged.

@jonpryor jonpryor merged commit 8bb5aee into main Sep 30, 2024
55 of 58 checks passed
@jonpryor jonpryor deleted the Issue9194 branch September 30, 2024 14:21
jonathanpeppers pushed a commit that referenced this pull request Sep 30, 2024
Context: xamarin/monodroid#1547

This commit updates the Inputs for the `_GenerateJavaStubs` and
`_GeneratePackageManagerJava` targets so that the
`@(AndroidEnvironment)` and `@(LibraryEnvironments)` items are only
included when we are building a release build, or a build which
embeds the assemblies into the apk.

This is so that we can eventually fast deploy these files to the
device; see also xamarin/monodroid#1547. 

To *not* attempt to (eventually) fast deploy `@(AndroidEnvironment)`
and `@(LibraryEnvironments)`, set the (*internal*!) MSBuild property
`$(_AndroidFastDeployEnvironmentFiles)` to False.

A new unit test has been added to make sure that the environment
values can be used correctly on device.
@github-actions github-actions bot locked and limited conversation to collaborators Oct 31, 2024
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.

4 participants