Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Xamarin.Android.Build.Tasks] Remove MAM targets from CoreResolve (#7868
) Context: f6f11a5 We're working with the InTune team to make use of our member remapping support (f6f11a5), and they hit a bit of a snag: > I'm having some issues integrating it into the Xamarin build. > We need our process to run after `_CompileJava` so we can analyze > the inheritance of the app's classes. Now, we also need our process > to run before `_CollectAndroidRemapMembers` so that the XML > generated in that process can be consumed properly. Unfortunately, > this generates a circular dependency: > > error MSB4006: There is a circular dependency in the target dependency graph > involving target "_CollectAndroidRemapMembers". > Since "_ResolveLibraryProjectImports" has "DependsOn" dependence on > "_CollectAndroidRemapMembers", the circular is > "_CollectAndroidRemapMembers<-_ResolveLibraryProjectImports<-_ExtractLibraryProjectImports<-_GetLibraryImports<-_CompileJava<-…<-_CollectAndroidRemapMembers". Commit f6f11a5 updated `$(CoreResolveReferencesDependsOn)` to add the `_ConvertAndroidMamMappingFileToXml` and `_CollectAndroidRemapMembers` targets, but @jonpryor does not remember *why* these targets needed to be added to `$(CoreResolveReferencesDependsOn)` in the first place. Update `$(CoreResolveReferencesDependsOn)` to remove the `_ConvertAndroidMamMappingFileToXml` and `_CollectAndroidRemapMembers` targets, and move those targets to the new `$(_GenerateAndroidRemapNativeCodeDependsOn)` MSBuild property, which is the `DependsOnTargets` list for the target `_GenerateAndroidRemapNativeCode`. This delays execution of the `_ConvertAndroidMamMappingFileToXml` and `_CollectAndroidRemapMembers` targets as late as possible, which should resolve the circular deps.
- Loading branch information