-
Notifications
You must be signed in to change notification settings - Fork 54
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 XADebug and XARelease configurations. #41
Conversation
It is for xamarin-android integration to set correct build output paths.
I thought I had a commit about this somewhere, but I can't find it. Regardless, historical background: Java.Interop started as a "pie-in-the-sky what can happen if we change some fundamental starting points," and the API grew organically. Part of this was the lack of Suffice it to say, the "normal" Debug/Release configurations had lots of stuff in it. Then came Cycle 7 and a desire to fix Bug 32126, which had already been solved in Java.Interop. This introduced a desire to use Java.Interop within Xamarin.Android, but Java.Interop was "too big"; there was too much stuff to sanely pull in. Thus the |
Regarding this PR, I don't like the idea of adding As per the comment in the gist, what I'd prefer is for Java.Interop to follow xamarin-android in having a This would allow xamarin-android |
One added point: for a "full" Xamarin.Android SDK, more projects need to be referenced from Java.Interop by Xamarin.Android.sln and build into
This is in part why I'd prefer using a Configuration.props-driven strategy, as these plus dependent projects will also need to be added to Xamarin.Android.sln. |
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]: dotnet#41
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]: dotnet#41
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]: dotnet#41
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]: dotnet#41
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]: dotnet#41
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]: dotnet#41
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
Superseded by PR #45. |
Changes in xamarin-android-tools between 75530565b6aa903b3a0e52b61df4dd94475a19fc and 9e78d6ee586b498d0ea082b3bc00432c23583dd1: 9e78d6e (HEAD, origin/master, origin/HEAD, master) [tests] fix test failures on Windows (dotnet#47) bdf0158 Better support no installed JDKs on macOS (dotnet#48) 6353659 Log what is happening during path selection (dotnet#46) 3ef860b Take BUILD_NUMBER into consideration for Version sorting (dotnet#45) d3de054 Allow an optional locator to be provided to JdkInfo (dotnet#43) 917d3b3 Don't require quotes around `release` values (dotnet#41) 7427692 [tests] Unit tests for finding NDK location based on $PATH (dotnet#40) dbc517b Merge pull request dotnet#38 from jonpryor/jonp-ndk-via-path 511d580 Allow finding NDK location based on $PATH b42c217 [tests] Fix DetectAndSetPreferredJavaSdkPathToLatest() test (dotnet#37) a4aad18 Add AndroidSdkInfo.DetectAndSetPreferredJavaSdkPathToLatest() (dotnet#35) fae7e0a [tests] Remove temporary directories (dotnet#36) 07c4c2b [Xamarin.Android.Tools.AndroidSdk] Revert JDK validation (dotnet#34)
Changes in xamarin-android-tools between 75530565b6aa903b3a0e52b61df4dd94475a19fc and 9e78d6ee586b498d0ea082b3bc00432c23583dd1: 9e78d6e (HEAD, origin/master, origin/HEAD, master) [tests] fix test failures on Windows (#47) bdf0158 Better support no installed JDKs on macOS (#48) 6353659 Log what is happening during path selection (#46) 3ef860b Take BUILD_NUMBER into consideration for Version sorting (#45) d3de054 Allow an optional locator to be provided to JdkInfo (#43) 917d3b3 Don't require quotes around `release` values (#41) 7427692 [tests] Unit tests for finding NDK location based on $PATH (#40) dbc517b Merge pull request #38 from jonpryor/jonp-ndk-via-path 511d580 Allow finding NDK location based on $PATH b42c217 [tests] Fix DetectAndSetPreferredJavaSdkPathToLatest() test (#37) a4aad18 Add AndroidSdkInfo.DetectAndSetPreferredJavaSdkPathToLatest() (#35) fae7e0a [tests] Remove temporary directories (#36) 07c4c2b [Xamarin.Android.Tools.AndroidSdk] Revert JDK validation (#34)
It is for xamarin-android integration to set correct build output
paths.