Commit 55c56f7
[build] option to filter by JI_MAX_JDK on make prepare (#226)
Context: https://stackoverflow.com/questions/47627499/does-android-studio-3-support-java-9-for-android-development
At the current time, we will not be able to use JDK 9 for Android.
Some of our build agents (VSTS), now have JDK 9 installed, so we need
to make a few changes to make sure JDK 8 is picked up instead.
Changes:
- Create a `$(JI_MAX_JDK)` option, as a way for `xamarin-android`
to exclude JDK 9
- Create new `$(JI_JAVAC_PATH)` and `$(JI_JAR_PATH)` make
variables, which will be the full path to `javac` and `jar`
- Use `awk` to filter on <= `$(JI_MAX_JDK)`
- Use `sed` to find the JDK version number, see options of folder
names below
- `sort -n` should be used to sort numerically
- Set `$(JI_JAVAC_PATH)` and `$(JI_JAR_PATH)` to their full paths
- Support both `Darwin` and `Linux`. Windows support is currently
handled separately in `xamarin-android` currently
~~Known JDK folder names~~
macOS:
1.6.0.jdk
jdk1.7.0_79.jdk
jdk1.8.0_101.jdk
jdk1.8.0_152.jdk
jdk-9.0.1.jdk
Ubuntu:
java-8-openjdk-amd64
java-9-openjdk-amd641 parent 429dc2a commit 55c56f7
1 file changed
+25
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
| |||
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
24 | 40 | | |
25 | 41 | | |
26 | 42 | | |
| |||
58 | 74 | | |
59 | 75 | | |
60 | 76 | | |
61 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
62 | 80 | | |
63 | 81 | | |
64 | 82 | | |
| |||
108 | 126 | | |
109 | 127 | | |
110 | 128 | | |
111 | | - | |
| 129 | + | |
112 | 130 | | |
113 | 131 | | |
114 | 132 | | |
| |||
125 | 143 | | |
126 | 144 | | |
127 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
128 | 149 | | |
129 | 150 | | |
130 | 151 | | |
| |||
148 | 169 | | |
149 | 170 | | |
150 | 171 | | |
151 | | - | |
152 | | - | |
| 172 | + | |
| 173 | + | |
153 | 174 | | |
154 | 175 | | |
0 commit comments