Skip to content

Commit 03eb03e

Browse files
authored
Build all tasks, regardless of target (#55346)
In a dirty tree, different architectures require different tasks. For example, ``` ./build.sh --os iossimulator -c Release ./build.sh --os android -c Release ``` the second step will complain that the AndroidAppBuilder task does not exist, because the build-semaphore.txt was created during the first build which built the AppleAppBuilder, but not the AndroidAppBuilder. The solution is to build all the tasks, regardless of target Simplifies building for different targets from the same dirty tree. All the tasks are always built once and then remain unchanged as long as their sources don't change.
1 parent e4ca022 commit 03eb03e

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

src/tasks/AppleAppBuilder/AppleAppBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public override bool Execute()
161161
throw new ArgumentException($"MainLibraryFileName='{MainLibraryFileName}' was not found in AppDir='{AppDir}'");
162162
}
163163

164-
if (ProjectName.Contains(" "))
164+
if (ProjectName.Contains(' '))
165165
{
166166
throw new ArgumentException($"ProjectName='{ProjectName}' should not contain spaces");
167167
}

src/tasks/tasks.proj

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
<Project Sdk="Microsoft.Build.Traversal">
22
<ItemGroup>
33
<ProjectReference Include="$(MSBuildThisFileDirectory)**\*.csproj" />
4-
<ProjectReference Remove="$(MSBuildThisFileDirectory)AndroidAppBuilder\AndroidAppBuilder.csproj"
5-
Condition="'$(TargetOS)' != 'Android'" />
6-
<ProjectReference Remove="$(MSBuildThisFileDirectory)AppleAppBuilder\AppleAppBuilder.csproj"
7-
Condition="'$(TargetOS)' != 'MacCatalyst' and '$(TargetOS)' != 'iOS' and '$(TargetOS)' != 'iOSSimulator' and '$(TargetOS)' != 'tvOS' and '$(TargetOS)' != 'tvOSSimulator'" />
8-
<ProjectReference Remove="$(MSBuildThisFileDirectory)WasmAppBuilder\WasmAppBuilder.csproj"
9-
Condition="'$(TargetOS)' != 'Browser'" />
10-
<ProjectReference Remove="$(MSBuildThisFileDirectory)WasmBuildTasks\WasmBuildTasks.csproj"
11-
Condition="'$(TargetOS)' != 'Browser'" />
12-
<ProjectReference Remove="$(MSBuildThisFileDirectory)AotCompilerTask\MonoAOTCompiler.csproj"
13-
Condition="'$(TargetsMobile)' != 'true'" />
14-
<ProjectReference Remove="$(MSBuildThisFileDirectory)RuntimeConfigParser\RuntimeConfigParser.csproj"
15-
Condition="'$(TargetsMobile)' != 'true'" />
164
</ItemGroup>
175

186
<!--

0 commit comments

Comments
 (0)