Commit 0e6e1b9
committed
fix: javac detection does not work as required by Gradle
The current `javac` detection tries to get the `javac` path from JAVA_HOME and to verify it is correct. In case it fails somewhere, it fallbacks to check the `javac` from PATH. So, from users' perspective it seems javac is setup correctly.
However, Gradle works in slightly different manner - it checks if you have JAVA_HOME and if so - verifies `java` from it. In case there's no `java` in the `$JAVA_HOME/bin/java`, an error is thrown.
Make our check for `javac` in the same way - in case you have set JAVA_HOME, we'll verify `javac` from there. This is exactly the same as the one we had prior 1.9.0 version, so this is just a regression fix.
Add unit tests to cover this scenario.1 parent 1d934b8 commit 0e6e1b9
2 files changed
+26
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
244 | 269 | | |
245 | 270 | | |
246 | 271 | | |
| |||
0 commit comments