Commit Graph

5 Commits

Author SHA1 Message Date
Andrew Kolos
96afa500db
[tools] allow explicitly specifying the JDK to use via a new config setting (#128264)
Closes https://github.com/flutter/flutter/issues/106416.

This PR adds a new `flutter config` setting named `jdk-dir`. When set, the tool will use the JDK found at this location for all Java-dependent tool operations such as building Android apps via gradle and running Android SDK tools.
2023-06-07 04:52:17 +00:00
Andrew Kolos
06e2b18173
[tools] use Java class for all java-searching behavior (#127354)
Fixes #124252, finishing work on the umbrella tracking issue, #126126.

Essentially, after this PR, no (non-test) code should be be referencing/invoking the java home or binary paths.
2023-06-01 04:19:19 +00:00
Andrew Kolos
80a4f9b159
Reland "[tool] Move Java functions to their own file" (#126577)
Relands #126086, which was reverted by #126569.
2023-05-20 06:29:21 +00:00
Andrew Kolos
5b2f658ff5
Revert "[tool] Move Java functions to their own file" (#126569)
Reverts flutter/flutter#126086.

This PR changed the interfaces of some classes, namely `AndroidSdk`, and deleted a global.

These classes had custom overrides in g3 that were not updated with a g3fix, so this PR has broken tests. See https://b.corp.google.com/issues/281945232 (non-public link)
2023-05-11 17:06:57 +00:00
Andrew Kolos
0a63cd70f1
[tool] Move Java functions to their own file (#126086)
This is the first step in unifying Java-finding logic across the tool. If curious, see #126029 for an example of what all the changes will probably entail.

Moves java-related functionality like `AndroidSdk.findJavaHome` to a new class, `Java`.

See tracking issue https://github.com/flutter/flutter/issues/126126 for more.
2023-05-11 04:32:25 +00:00