-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
`dotnet build Java.Interop.sln` didn't work unless `-m:1` was used: % make prepare-core JI_MAX_JDK=8 % dotnet build -target:Prepare -p:MaxJdkVersion=8 Java.Interop.sln % dotnet build Java.Interop.sln … …/tests/Java.Interop.Export-Tests/Java.Interop.Export-Tests.csproj(35,5): error MSB3073: The command ""/Users/jon/android-toolchain/jdk-1.8/bin/javac" -classpath …" exited with code 1. …/tests/Java.Interop.Export-Tests/Java.Interop.Export-Tests.csproj(35,5): error MSB3073: The command ""/Users/jon/android-toolchain/jdk-1.8/bin/javac" -classpath …" exited with code 1. …/tests/Java.Interop-Tests/Java.Interop-Tests.csproj(60,5): error MSB3073: The command ""/Users/jon/android-toolchain/jdk-1.8/bin/javac" -source 1.8 -target 1.8 -bootclasspath …" exited with code 1. …/tests/Java.Interop-Tests/Java.Interop-Tests.csproj(60,5): error MSB3073: The command ""/Users/jon/android-toolchain/jdk-1.8/bin/javac" -source 1.8 -target 1.8 -bootclasspath …" exited with code 1. Using `dotnet build -m:1` avoids the above MSB3073 errors; see also commit 1de5501, which added `-m:1` to CI builds. Fix these parallel build issues so that `-m:1` isn't needed. This is principally done by removing `Java.Interop.BootstrapTasks.csproj` from `Java.Interop.sln`, and adding it to a new `Java.Interop.BootstrapTasks.sln` solution. The `Prepare` target is updated to explicitly Restore and Build the new `Java.Interop.BootstrapTasks.dll` solution. Note that the Restore and Build target invocations must be separate; using [`Targets="Restore;Build"` will not work][0]. Update `Java.Interop.BootstrapTasks.csproj` to *no longer* `<Import/>` `VersionInfo.targets`, as this causes a circular dependency (`VersionInfo.targets` uses tasks from `Java.Interop.BootstrapTasks.dll`). This is fine, as `Java.Interop.BootstrapTasks.dll` doesn't need to be versioned. Review our custom `.targets` files, and replace `BeforeTargets="BeforeBuild"` with `BeforeTargets="Build"` or `BeforeTargets="BeforeCompile"` (as appropriate). Building before the `BeforeBuild` target is problematic, as the `BeforeBuild` target runs before `@(ProjectReference)`d projects are built, meaning dependencies may not exist. (Oops.) TODO: Instead of having two `.sln` files, try to instead use `<UsingTask/>` with `AssemblyFile` and `TasFactory` set, as done in [rainersigwald/build-task-in-solution-demo][1] and the [`InvokeCustomTaskDemo` target][2]. This *may* avoid the need for a separate `.sln` (and `Prepare` target invocation?). [0]: dotnet/msbuild#2811 (comment) [1]: https://github.com/rainersigwald/build-task-in-solution-demo [2]: https://github.com/rainersigwald/build-task-in-solution-demo/blob/17508937bb9edb0b817820146f85adf0da331515/Task/DemoFunctionality.targets#L4-L10
- Loading branch information
Showing
8 changed files
with
41 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks.sln
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.1.32104.313 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Java.Interop.BootstrapTasks", "Java.Interop.BootstrapTasks.csproj", "{47C54705-71BA-455D-9F72-780487DE861C}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Xamarin.Android.Tools.AndroidSdk", "..\..\external\xamarin-android-tools\src\Xamarin.Android.Tools.AndroidSdk\Xamarin.Android.Tools.AndroidSdk.csproj", "{2F8744CF-C265-440A-B976-DEC021324A3E}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{47C54705-71BA-455D-9F72-780487DE861C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{47C54705-71BA-455D-9F72-780487DE861C}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{47C54705-71BA-455D-9F72-780487DE861C}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{47C54705-71BA-455D-9F72-780487DE861C}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{2F8744CF-C265-440A-B976-DEC021324A3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{2F8744CF-C265-440A-B976-DEC021324A3E}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{2F8744CF-C265-440A-B976-DEC021324A3E}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{2F8744CF-C265-440A-B976-DEC021324A3E}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {8C64DB4C-E064-43CA-B1AB-100760FEF870} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters