xamarin-android/tests
Jonathan Peppers ee7c73e10b
[Xamarin.Android.Build.Tasks] $DOTNET_MODIFIABLE_ASSEMBLIES & FastDev (#9451)
Context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=10431207&view=ms.vss-test-web.build-test-results-tab&runId=114098346&resultId=100000&paneView=debug

The `FastDeployEnvironmentFiles(false)` test fails on PRs from forks,
because the "Fast Deployment" feature is not included in OSS builds:

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

The problem appears to be related to target ordering:

  * `_GetGenerateJavaStubsInputs` : uses `@(AndroidEnvironment)` to
    set `@(_EnvironmentFiles)`

  * `_GetGenerateJavaStubs` : must have same `Inputs` as
    `_GeneratePackageManagerJava`

  * `_GeneratePackageManagerJava`: actually uses `@(_EnvironmentFiles)`

  * `_GenerateEnvironmentFiles` : creates a new
    `@(AndroidEnvironment)` file that won't be used!

But when using either a `Release` build or `Debug` build with
`FastDev` enabled, everything works fine.

To fix this, rework the target ordering:

  * `_GetGenerateJavaStubsInputs` depends on
    `_GenerateEnvironmentFiles`

    Unfortunately, this is now a circular dependency that causes an
    MSBuild error.

  * Break the cycle by updating `_GenerateEnvironmentFiles` to no
    longer depend upon `_ReadAndroidManifest`.

    It does not appear that `_ReadAndroidManifest` is needed by
    `_GenerateEnvironmentFiles`, as no properties created there are
    used.
2024-10-25 13:04:14 -04:00
..
BCL-Tests It's ".NET for Android", not ".NET Android" (#8933) 2024-05-13 12:01:00 -04:00
CodeBehind [LayoutBindings] Fix '[Preserve]' is obsolete warnings (#8529) 2024-03-27 14:23:06 -04:00
CodeGen-Binding [tests] re-enable `JavaAbstractMethodTest` (#9097) 2024-07-15 11:09:12 -05:00
CodeGen-MkBundle/Xamarin.Android.MakeBundle-Tests [ci] Improve build and test result packaging (#6411) 2021-10-28 16:25:25 -04:00
EmbeddedDSOs/EmbeddedDSO [build-tools] Bump Test emulator to use API-31 (#5257) 2022-02-25 12:54:12 -05:00
MSBuildDeviceIntegration [Xamarin.Android.Build.Tasks] $DOTNET_MODIFIABLE_ASSEMBLIES & FastDev (#9451) 2024-10-25 13:04:14 -04:00
Mono.Android-Tests [trimmer] pass `--disable-opt unusedtypechecks` (#9435) 2024-10-22 09:39:38 -04:00
ResolveImports [Xamarin.Android.Build.Tasks] Fast Deployment v2.0 (#4690) 2020-10-12 19:37:59 -04:00
TestRunner.Core [tests] fix 1,170 build warnings (#9137) 2024-07-25 08:27:51 -05:00
TestRunner.NUnit [tests] fix 1,170 build warnings (#9137) 2024-07-25 08:27:51 -05:00
TestRunner.xUnit [xaprepare] Use global NuGet package cache instead of in-tree one (#5491) 2021-01-26 14:49:01 -05:00
Xamarin.Android.Tools.Aidl-Tests [build] Stop producing Xamarin.Android.Cecil.dll (#8489) 2023-11-20 13:36:51 -05:00
Xamarin.Forms-Performance-Integration [build] Update docs and remove `xabuild` mentions (#8406) 2023-10-10 18:18:37 -04:00
api-compatibility Bump external/Java.Interop from `d30d554` to `51b784a` (#9241) 2024-08-22 08:36:01 -10:00
apk-sizes-reference Bump to Android NDK r25 (#6764) 2022-07-26 17:07:59 -04:00
locales [Xamarin.Android.Build.Tasks] Fast Deployment v2.0 (#4690) 2020-10-12 19:37:59 -04:00
msbuild-times-reference [tests] Add a Performance Test for FastDeploy Task (#9258) 2024-09-10 11:13:20 -04:00