-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[build] Add support for JDK 17 (#1141)
Update `<JdkInfo/>` task to emit new `$(Java*MajorVersion)` and `$(JavaApi*DefineConstants)` MSBuild properties. These are used by `src/Java.Base` so that it knows which JDK version it's binding. Update `src/Java.Base` to support binding the `java.base.jmod` from JDK 17. Note: This "JDK-17 Java.Base binding" was a "time limited" effort. To build against JDK-17: 1. Install JDK-17. 2. Prepare and override `$(JdksRoot)`: dotnet build -t:Prepare Java.Interop.sln -p:JdksRoot=/Library/Java/JavaVirtualMachines/microsoft-17.jdk/Contents/Home will use the Microsoft OpenJDK 17 installation on macOS. 3. Build: dotnet build Java.Interop.sln
- Loading branch information
Showing
10 changed files
with
139 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System; | ||
using Java.Interop; | ||
|
||
#if JAVA_API_17 | ||
using Java.Lang.Invoke; | ||
using Java.Lang.Constants; | ||
|
||
namespace Java.Lang { | ||
public partial class Class { | ||
|
||
} | ||
} | ||
|
||
#endif // JAVA_API_17 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using Java.Interop; | ||
|
||
#if JAVA_API_17 | ||
using Java.Lang.Invoke; | ||
using Java.Lang.Constants; | ||
|
||
namespace Java.Lang { | ||
public partial class Double { | ||
|
||
Java.Lang.Object? IConstantDesc.ResolveConstantDesc (MethodHandles.Lookup? lookup) => | ||
ResolveConstantDesc (lookup); | ||
} | ||
} | ||
|
||
#endif // JAVA_API_17 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using Java.Interop; | ||
|
||
#if JAVA_API_17 | ||
using Java.Lang.Invoke; | ||
using Java.Lang.Constants; | ||
|
||
namespace Java.Lang { | ||
public partial class Float { | ||
|
||
Java.Lang.Object? IConstantDesc.ResolveConstantDesc (MethodHandles.Lookup? lookup) => | ||
ResolveConstantDesc (lookup); | ||
} | ||
} | ||
|
||
#endif // JAVA_API_17 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using Java.Interop; | ||
|
||
#if JAVA_API_17 | ||
using Java.Lang.Invoke; | ||
using Java.Lang.Constants; | ||
|
||
namespace Java.Lang { | ||
public partial class Integer { | ||
|
||
Java.Lang.Object? IConstantDesc.ResolveConstantDesc (MethodHandles.Lookup? lookup) => | ||
ResolveConstantDesc (lookup); | ||
} | ||
} | ||
|
||
#endif // JAVA_API_17 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using Java.Interop; | ||
|
||
#if JAVA_API_17 | ||
using Java.Lang.Invoke; | ||
using Java.Lang.Constants; | ||
|
||
namespace Java.Lang { | ||
public partial class Long { | ||
|
||
Java.Lang.Object? IConstantDesc.ResolveConstantDesc (MethodHandles.Lookup? lookup) => | ||
ResolveConstantDesc (lookup); | ||
} | ||
} | ||
|
||
#endif // JAVA_API_17 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters