You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[build] fix env vars causing gradle build error (#705)
Context: dotnet/android#5044 (comment)
Context: https://docs.microsoft.com/visualstudio/msbuild/exec-task
An env var can break the build such as running the following powershell:
> $env:FOO="`nFoo.cs(123,1) error: oh dear!"
A new line in the string is required to hit an issue. (```n`` is
PowerShell-ese for a `\n` newline.)
This results in a confusing build error:
(_BuildJava target) ->
EXEC : Foo.cs(123,1) error : oh dear!
`gradlew -d` prints every environment variable, and if there is a line
that looks like an MSBuild error then `msbuild` will emit the error.
We can set `IgnoreStandardErrorWarningFormat="true"` to disable this.
This could commonly happen on CI systems, if a commit message contains
an error message.
In the case of Azure DevOps, `%BUILD_SOURCEVERSIONMESSAGE%` will
contain the full commit message.
I also fixed the `_CleanJava` target that was not running at all.
`java-source-utils.csproj` now properly cleans now.
0 commit comments