Commit 41723a5
committed
[r8] fixes to building with gradle
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.1 parent 02c07ed commit 41723a5
File tree
2 files changed
+4
-28
lines changed- src/r8
- tests/CodeGen-Binding/Xamarin.Android.LibraryProjectZip-LibBinding
2 files changed
+4
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | | - | |
| 7 | + | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | | - | |
24 | 22 | | |
25 | 23 | | |
26 | 24 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | 25 | | |
35 | 26 | | |
36 | | - | |
| 27 | + | |
37 | 28 | | |
38 | 29 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | 30 | | |
44 | 31 | | |
45 | 32 | | |
| |||
51 | 38 | | |
52 | 39 | | |
53 | 40 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | 41 | | |
58 | 42 | | |
59 | 43 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | 44 | | |
65 | 45 | | |
66 | | - | |
| 46 | + | |
67 | 47 | | |
68 | 48 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | 49 | | |
74 | 50 | | |
75 | 51 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
0 commit comments