Skip to content

Conversation

@tondat
Copy link
Contributor

@tondat tondat commented Jun 25, 2018

…decisions and informs environment details

JdkProperties get the jdk properties for a given JDK path.
For the moment we are returning values for vendor and java version.

…decisions and informs environment details

JdkProperties get the jdk properties for a given JDK path.
For the moment we are returning values for vendor and java version.
@dellis1972 dellis1972 requested a review from jonpryor June 25, 2018 17:53
@jonpryor
Copy link
Contributor

Conceptually, what we'd prefer to do is "import" this file:

https://github.com/xamarin/java.interop/blob/master/src/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks/JdkInfo.cs

presumably as Xamarin.Android.Tools.AndroidSdk.JdkInfo (or Xamarin.Android.Tools.Jdk.JdkInfo?), with the major change that it is no longer a Task subclass, but instead a normal class:

public class JdkInfo {
    public JdkInfo (string jdkRoot);

    public string JavaHome {get;}
    public string Vendor {get;}
    public Version Version {get;}

    public static IEnumerable<JdkInfo> GetInstalledJdks (params string[] jdkRoots);
}

(This will require a fair bit of refactoring, but it looks plausible/straightforward.)

@tondat tondat closed this Jun 25, 2018
@tondat tondat deleted the jmt/master branch June 25, 2018 19:10
jonpryor added a commit to jonpryor/xamarin-android-tools that referenced this pull request Jul 24, 2018
jonpryor added a commit to jonpryor/xamarin-android-tools that referenced this pull request Jul 24, 2018
jonpryor added a commit to jonpryor/xamarin-android-tools that referenced this pull request Jul 24, 2018
jonpryor added a commit to jonpryor/xamarin-android-tools that referenced this pull request Jul 24, 2018
jonpryor added a commit to jonpryor/xamarin-android-tools that referenced this pull request Jul 24, 2018
jonpryor added a commit to jonpryor/xamarin-android-tools that referenced this pull request Jul 25, 2018
jonpryor added a commit to jonpryor/xamarin-android-tools that referenced this pull request Jul 25, 2018
jonpryor added a commit to jonpryor/xamarin-android-tools that referenced this pull request Jul 25, 2018
jonpryor added a commit to jonpryor/java.interop that referenced this pull request Jul 26, 2018
Context: dotnet/android-tools#29 (comment)

Bumps to xamarin/xamarin-android-tools:master@75530565

The `<JdkInfo/>` task within `Java.Interop.BootstrapTasks.dll` isn't
the *only* thing that needs to determine the path of an installed JDK.
The IDEs could also use such functionality, as could xamarin-android.

Add a submodule reference to xamarin-android-tools, and use
`Xamarin.Android.Tools.JdkInfo` to find the preferred JDK, instead of
having lots of custom probing with the `<JdkInfo/>` task.

Finally, for consistency, move `src/Java.Interop.BootstrapTasks` to
`build-tools/Java.Interop.BootstrapTasks`, as the
`Java.Interop.BootstrapTasks.dll` assembly is only intended for in
building Java.Interop *itself*, and not for "downlevel" distribution.
jonpryor added a commit to jonpryor/java.interop that referenced this pull request Jul 27, 2018
Context: dotnet/android-tools#29 (comment)

Bumps to xamarin/xamarin-android-tools:master@75530565

The `<JdkInfo/>` task within `Java.Interop.BootstrapTasks.dll` isn't
the *only* thing that needs to determine the path of an installed JDK.
The IDEs could also use such functionality, as could xamarin-android.

Add a submodule reference to xamarin-android-tools, and use
`Xamarin.Android.Tools.JdkInfo` to find the preferred JDK, instead of
having lots of custom probing with the `<JdkInfo/>` task.

Finally, for consistency, move `src/Java.Interop.BootstrapTasks` to
`build-tools/Java.Interop.BootstrapTasks`, as the
`Java.Interop.BootstrapTasks.dll` assembly is only intended for in
building Java.Interop *itself*, and not for "downlevel" distribution.
jonpryor added a commit to jonpryor/java.interop that referenced this pull request Jul 27, 2018
Context: dotnet/android-tools#29 (comment)

Bumps to xamarin/xamarin-android-tools:master@75530565

The `<JdkInfo/>` task within `Java.Interop.BootstrapTasks.dll` isn't
the *only* thing that needs to determine the path of an installed JDK.
The IDEs could also use such functionality, as could xamarin-android.

Add a submodule reference to xamarin-android-tools, and use
`Xamarin.Android.Tools.JdkInfo` to find the preferred JDK, instead of
having lots of custom probing with the `<JdkInfo/>` task.

Finally, for consistency, move `src/Java.Interop.BootstrapTasks` to
`build-tools/Java.Interop.BootstrapTasks`, as the
`Java.Interop.BootstrapTasks.dll` assembly is only intended for in
building Java.Interop *itself*, and not for "downlevel" distribution.
jonpryor added a commit to dotnet/java-interop that referenced this pull request Jul 27, 2018
Context: dotnet/android-tools#29 (comment)

Bumps to xamarin/xamarin-android-tools:master@75530565

The `<JdkInfo/>` task within `Java.Interop.BootstrapTasks.dll` isn't
the *only* thing that needs to determine the path of an installed JDK.
The IDEs could also use such functionality, as could xamarin-android.

Add a submodule reference to xamarin-android-tools, and use
`Xamarin.Android.Tools.JdkInfo` to find the preferred JDK, instead of
having lots of custom probing with the `<JdkInfo/>` task.

Finally, for consistency, move `src/Java.Interop.BootstrapTasks` to
`build-tools/Java.Interop.BootstrapTasks`, as the
`Java.Interop.BootstrapTasks.dll` assembly is only intended for in
building Java.Interop *itself*, and not for "downlevel" distribution.
jonpryor added a commit to dotnet/android that referenced this pull request Aug 2, 2018
Context: https://paper.dropbox.com/doc/OpenJDK-and-You--AH1yWKdVXgno~uXYfmcUAZTwAg-NoECAe2XkBQeoxFfGL6ea
Context: dotnet/android-tools#29 (comment)
Context: #2004 (comment)

Fixes: http://work.devdiv.io/646086
Fixes: http://work.devdiv.io/652760
Fixes: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/597752
Fixes: dotnet/android-tools#26
Fixes: dotnet/android-tools#39

Update & export `%JAVA_HOME%`, `%PATH%` on Windows.

We are [observing some unit test failures in this bump][0], which
[appear to be machine-specific][1].  We still don't understand the
cause of the unit test failures, so to assist in the eventual tracking
of this issue there is some additional, conditional, debug spew.

[0]: #2004 (comment)
[1]: #2004 (comment)
jonpryor added a commit to dotnet/android that referenced this pull request Aug 2, 2018
Context: https://paper.dropbox.com/doc/OpenJDK-and-You--AH1yWKdVXgno~uXYfmcUAZTwAg-NoECAe2XkBQeoxFfGL6ea
Context: dotnet/android-tools#29 (comment)
Context: #2004 (comment)
Context: https://github.com/xamarin/xamarin-android-tools/blob/917d3b3ce455eed6a4a0e4271d34661bdf0b261d/src/Xamarin.Android.Tools.AndroidSdk/JdkInfo.cs#L256

Fixes: http://work.devdiv.io/646086
Fixes: http://work.devdiv.io/652760
Fixes: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/597752
Fixes: dotnet/android-tools#26
Fixes: dotnet/android-tools#39

Update & export `%JAVA_HOME%`, `%PATH%` on Windows.

We are [observing some unit test failures in this bump][0], which
[appear to be machine-specific][1].  We still don't understand the
cause of the unit test failures, so to assist in the eventual tracking
of this issue there is some additional, conditional, debug spew.

[0]: #2004 (comment)
[1]: #2004 (comment)
jonpryor added a commit that referenced this pull request Aug 2, 2018
jonpryor added a commit to dotnet/android that referenced this pull request Aug 3, 2018
…c890a35ce3a8751316c1f829566e57

Context: https://paper.dropbox.com/doc/OpenJDK-and-You--AH1yWKdVXgno~uXYfmcUAZTwAg-NoECAe2XkBQeoxFfGL6ea
Context: dotnet/android-tools#29 (comment)
Context: #2004 (comment)
Context: https://github.com/xamarin/xamarin-android-tools/blob/917d3b3ce455eed6a4a0e4271d34661bdf0b261d/src/Xamarin.Android.Tools.AndroidSdk/JdkInfo.cs#L256

Fixes: http://work.devdiv.io/646086
Fixes: http://work.devdiv.io/652760
Fixes: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/597752
Fixes: dotnet/android-tools#26
Fixes: dotnet/android-tools#39

Update & export `%JAVA_HOME%`, `%PATH%` on Windows.

We are [observing some unit test failures in this bump][0], which
[appear to be machine-specific][1].  We still don't understand the
cause of the unit test failures, so to assist in the eventual tracking
of this issue there is some additional, conditional, debug spew.

[0]: #2004 (comment)
[1]: #2004 (comment)

Also, MOAR INFO IN JDK ERROR MESSAGES.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants