[r8] fixes to building with gradle#2364
Closed
jonathanpeppers wants to merge 5 commits intodotnet:masterfrom
Closed
[r8] fixes to building with gradle#2364jonathanpeppers wants to merge 5 commits intodotnet:masterfrom
jonathanpeppers wants to merge 5 commits intodotnet:masterfrom
Conversation
Context: dotnet#2019 Since 4bb4b2e, our builds have been failing on VSTS on macOS and Windows. Jenkins is green, however. ~~ macOS ~~ Currently getting a failure building `r8` such as: 2018-10-30T20:19:05.2225960Z * What went wrong: 2018-10-30T20:19:05.2227400Z Could not determine java version from '11.0.1'. So I believe the problem here is that Java 11 is in `$PATH`, and this is only a scenario on the VSTS macOS build agents. It turns out I was able to clean up quite a bit in `r8.targets`: - We don't need to call `SetEnvironmentVariable`, I was able to set `EnvironmentVariables="...;PATH=$(ChromeToolsDirectory)"` and things still worked fine. - We should pass `--stacktrace` to gradle so that we get detailed error messages on a failure. ~~ Windows ~~ Currently getting a failure in `Xamarin.Android.LibraryProjectZip-LibBinding.csproj` such as: 2018-10-31T14:02:28.8336608Z .\gradlew assembleDebug --stacktrace --no-daemon 2018-10-31T14:02:40.7122197Z NDK is missing a "platforms" directory. 2018-10-31T14:02:40.7122937Z If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to C:\Users\dlab14\android-toolchain\sdk\ndk-bundle. 2018-10-31T14:02:40.7124870Z If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning. It doesn't really make sense to me why this started happening with d8/r8 support... The `~\android-toolchain\sdk\ndk-bundle` path seems completely wrong. However, it looks like we should be setting `ANDROID_NDK_HOME=$(AndroidNdkDirectory)`. This is the only other place we are calling `gradle`, so it is somehow *related* to the d8/r8 changes.
Cleanup use of `$PATH` in `android-toolchain`
`.\gclient` call needs `JAVA_HOME`
Member
Author
|
Will rework this to fix Windows first--as I have figured out what is happening there. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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: #2019
Since 4bb4b2e, our builds have been failing on VSTS on macOS and
Windows. Jenkins is green, however.
macOS
Currently getting a failure building
r8such as:So I believe the problem here is that Java 11 is in
$PATH, and thisis only a scenario on the VSTS macOS build agents.
It turns out I was able to clean up quite a bit in
r8.targets:SetEnvironmentVariable, I was able to setEnvironmentVariables="...;PATH=$(ChromeToolsDirectory)"and thingsstill worked fine.
--stacktraceto gradle so that we get detailederror messages on a failure.
Windows
Currently getting a failure in
Xamarin.Android.LibraryProjectZip-LibBinding.csprojsuch as:It doesn't really make sense to me why this started happening with
d8/r8 support... The
~\android-toolchain\sdk\ndk-bundlepath seemscompletely wrong.
However, it looks like we should be setting
ANDROID_NDK_HOME=$(AndroidNdkDirectory). This is the only otherplace we are calling
gradle, so it is somehow related to the d8/r8changes.