Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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.
- Loading branch information