You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[build] Add support for Configuration.Override.props
For proper use, the [xamarin-android][xa] build needs to place various
Java.Interop utilities such as class-parse.exe and generator.exe into
`$prefix/lib/mandroid`, so that Xamarin.Android.Build.Tasks.dll will
properly verify the installation environment.
There are three ways this could be accomplished:
1. The `xamarin-android` Makefile could explicitly build these
utilities and override `$(OutputPath)`:
xbuild external/Java.Interop/tools/class-parse /p:OutputPath=`pwd`/bin/$(CONFIGURATION)/lib/mandroid
The problem with this is that we want to have the xamarin-android
build system rely on MSBuild as much as possible, and this
approach, while workable, runs counter to those desires.
2. We could add additional project configurations to control where the
output directory should be. This was suggested by
[@atsushieno][pr41].
My concern with this approach is that it's not easily extensible:
it's not just a few projects that need to place files into
`$prefix/lib/mandroid`, but all of their dependencies as well.
Such an approach would thus require adding lots of new
configurations to lots of projects.
3. Java.Interop could adopt a `xamarin-android`-style
`Configuration.props` system. This would allow xamarin-android to
*generate* a `Configuration.Override.props` file to specify the
correct output path for those utilities.
(3) is the chosen solution. It allows adding e.g.
`external/Java.Interop/tools/generator/generator.csproj` to
`Xamarin.Android.sln`, allowing it to be built "normally" from the
`xamarin-android` build system, while causing the built files to be
placed into e.g. `xamarin-android/bin/Debug/lib/mandroid` instead of
the less useful `xamarin-android/external/Java.Interop/bin/Debug`.
[xa]: https://github.com/xamarin/xamarin-android/
[pr41]: #41
0 commit comments