Skip to content

Commit 4598967

Browse files
committed
[Xamarin.Android.sln] Fix issues preventing parallel builds.
1 parent 9987069 commit 4598967

File tree

8 files changed

+18
-14
lines changed

8 files changed

+18
-14
lines changed

Directory.Build.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
<ProduceReferenceAssemblyInOutDir>true</ProduceReferenceAssemblyInOutDir>
2323
<!-- Ensure command-line apps can use a newer .NET -->
2424
<RollForward>Major</RollForward>
25+
<!-- We don't need to be warned that we are using a preview .NET -->
26+
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
2527
</PropertyGroup>
2628

2729
<PropertyGroup>

build-tools/automation/azure-pipelines.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ stages:
208208
parameters:
209209
project: Xamarin.Android.sln
210210
arguments: >-
211-
-t:PackDotNet -c $(XA.Build.Configuration) -m:1 -v:n
211+
-t:PackDotNet -c $(XA.Build.Configuration) -v:n
212212
-bl:$(System.DefaultWorkingDirectory)\bin\Build$(XA.Build.Configuration)\dotnet-build.binlog
213213
displayName: Build Solution
214214
continueOnError: false

build-tools/create-android-api/create-android-api.csproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<ProjectReference Include="..\..\external\Java.Interop\tools\class-parse\class-parse.csproj" ReferenceOutputAssembly="False" />
1313
<ProjectReference Include="..\api-xml-adjuster\api-xml-adjuster.csproj" ReferenceOutputAssembly="False" />
1414
<ProjectReference Include="..\api-merge\api-merge.csproj" ReferenceOutputAssembly="False" />
15+
<ProjectReference Include="..\jnienv-gen\jnienv-gen.csproj" ReferenceOutputAssembly="False" SkipGetTargetFrameworkProperties="True" AdditionalProperties="TargetFramework=net472" />
1516
</ItemGroup>
1617

1718
<PropertyGroup>
@@ -117,6 +118,17 @@
117118
Command="$(ManagedRuntime) $(ManagedRuntimeArgs) $(ApiMerge) -config=$(_ConfigurationFile) -config-input-dir=$(_ConfigurationInputBaseDirectory) -config-output-dir=$(_ConfigurationOutputBaseDirectory)" />
118119

119120
</Target>
121+
122+
<!-- Generates 'JNIEnv.g.cs' file. We do this here because it should only run once, not per-TF. -->
123+
<Target Name="_BuildJNIEnv"
124+
BeforeTargets="Build"
125+
Inputs="..\..\bin\Build$(Configuration)\jnienv-gen.exe"
126+
Outputs="../../src/Mono.Android/Android.Runtime/JNIEnv.g.cs">
127+
<Exec
128+
Command="$(ManagedRuntime) $(ManagedRuntimeArgs) &quot;../../bin/Build$(Configuration)/jnienv-gen.exe&quot; -o ../../src/Mono.Android/Android.Runtime/JNIEnv.g.cs --use-java-interop"
129+
/>
130+
<Touch Files="../../src/Mono.Android/Android.Runtime/JNIEnv.g.cs" />
131+
</Target>
120132

121133
<!-- Clean up generated API files -->
122134
<Target Name="_CleanApiXml"

build-tools/scripts/BuildEverything.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ endif
2727
leeroy: leeroy-all framework-assemblies
2828

2929
leeroy-all:
30-
$(call DOTNET_BINLOG,leeroy-all) $(SOLUTION) -m:1 $(_MSBUILD_ARGS)
30+
$(call DOTNET_BINLOG,leeroy-all) $(SOLUTION) $(_MSBUILD_ARGS)
3131
$(call MSBUILD_BINLOG,leeroy-all,$(_SLN_BUILD)) /restore tools/xabuild/xabuild.csproj /p:Configuration=$(CONFIGURATION) $(_MSBUILD_ARGS)

src/Microsoft.Android.Sdk.ILLink/Microsoft.Android.Sdk.ILLink.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<PackageReference Include="Microsoft.NET.ILLink" Version="$(MicrosoftNETILLinkTasksPackageVersion)" />
1313
<PackageReference Include="XliffTasks" Version="$(XliffTasksVersion)" PrivateAssets="all" />
1414
<ProjectReference Include="..\..\external\Java.Interop\src\Java.Interop.Export\Java.Interop.Export.csproj" />
15+
<ProjectReference Include="..\Xamarin.Android.Build.Tasks\Xamarin.Android.Build.Tasks.csproj" ReferenceOutputAssembly="False" />
1516

1617
<Compile Include="..\Xamarin.Android.Build.Tasks\obj\$(Configuration)\Profile.g.cs" Link="Profile.g.cs" />
1718

src/Mono.Android/Mono.Android.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,6 @@
375375
<ItemGroup>
376376
<ProjectReference Include="..\..\build-tools\create-android-api\create-android-api.csproj" ReferenceOutputAssembly="false" />
377377
<!-- Explicitly pass the target framework of the project so we don't have conflicts with the multiple targets in this file. -->
378-
<ProjectReference Include="..\..\build-tools\jnienv-gen\jnienv-gen.csproj" ReferenceOutputAssembly="false" SkipGetTargetFrameworkProperties="true" AdditionalProperties="TargetFramework=net472" />
379378
<ProjectReference Include="..\..\external\Java.Interop\tools\generator\generator.csproj" ReferenceOutputAssembly="false" SkipGetTargetFrameworkProperties="true" AdditionalProperties="TargetFramework=net472"/>
380379
<ProjectReference Include="..\..\external\Java.Interop\tools\java-source-utils\java-source-utils.csproj" ReferenceOutputAssembly="false" SkipGetTargetFrameworkProperties="true" AdditionalProperties="TargetFramework=net472" />
381380
<ProjectReference Include="..\..\external\Java.Interop\tools\jcw-gen\jcw-gen.csproj" ReferenceOutputAssembly="false" SkipGetTargetFrameworkProperties="true" AdditionalProperties="TargetFramework=net472" />

src/Mono.Android/Mono.Android.targets

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,6 @@
120120
<Touch Files="$(_AndroidJavadocXml)" />
121121
</Target>
122122

123-
<!-- Generates 'JNIEnv.g.cs' file -->
124-
<Target Name="_BuildJNIEnv"
125-
BeforeTargets="CoreCompile"
126-
Inputs="..\..\bin\Build$(Configuration)\jnienv-gen.exe"
127-
Outputs="Android.Runtime\JNIEnv.g.cs">
128-
<Exec
129-
Command="$(ManagedRuntime) $(ManagedRuntimeArgs) &quot;../../bin/Build$(Configuration)/jnienv-gen.exe&quot; -o Android.Runtime/JNIEnv.g.cs --use-java-interop"
130-
/>
131-
<Touch Files="Android.Runtime\JNIEnv.g.cs" />
132-
</Target>
133-
134123
<!-- Copies common 'api-X.xml' to the 'obj' directory.
135124
This is needed because 'generator' writes intermediate files like 'api-X.xml.fixed' next to the source
136125
'api-X.xml' and multiple profiles are using the source, so these files will clobber each other. -->

tools/javadoc2mdoc/javadoc2mdoc.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<OutputType>Exe</OutputType>
66
<RootNamespace>Xamarin.Android.Tools.JavadocToMDoc</RootNamespace>
77
<AssemblyName>javadoc-to-mdoc</AssemblyName>
8+
<IntermediateOutputPath>$(BaseIntermediateOutputPath)$(Configuration)\$(TargetFramework)\</IntermediateOutputPath>
89
</PropertyGroup>
910
<Import Project="..\..\Configuration.props" />
1011
<PropertyGroup Condition="'$(TargetFramework)' == 'net472'">

0 commit comments

Comments
 (0)