[apksigner] Serialize gradlew: depend on java-source-utils #7134
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context: 944f88a
Commit 944f88a enabled parallel builds by removing
dotnet build -m:1usage, which allows for faster incremental builds.
One of the problems encountered was around
gradlewusage:gradlewdoesn't support multiple concurrent executions, and will block
waiting for other
gradlewbuilds to complete, which can result intimeouts and failed builds.
Commit 944f88a fixed this by "serializing" all projects which
involve
gradlew:r8.csprojis the "entrypoint"r8.csprojreferencesmanifestmerger.csprojmanifestmerger.csprojreferencesapksigner.csprojThis arrangement would cause
dotnet buildto sequentially buildr8.csproj,manifestmerger.csproj, andapksigner.csproj, ensuringthat only one
gradlewcommand was run at a time.Unfortunately, we overlooked
external/Java.Interop/tools/java-source-utils/java-source-utils.csproj.Thus, we occasionally see the Windows build fail:
Update
apksigner.csprojto referencejava-source-utils.csproj,extending the "sequential order" of
gradlew-using projects.This should make the Windows build more reliable.
Additionally, move the
<Target/>s out ofapksigner.csprojandinto
apksigner.targets. This is more consistent with otherprojects, and reduces the likelihood of VSMac rewriting (and removing
the formatting of)
apksigner.csproj.