diff --git a/.gitmodules b/.gitmodules
index ab79ccab656..2bdccfa5e08 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -8,8 +8,8 @@
branch = main
[submodule "external/Java.Interop"]
path = external/Java.Interop
- url = https://github.com/xamarin/java.interop.git
- branch = main
+ url = https://github.com/jonpryor/java.interop.git
+ branch = jonp-allow-jdk-17
[submodule "external/lz4"]
path = external/lz4
url = https://github.com/lz4/lz4.git
diff --git a/build-tools/gradle/gradle/wrapper/gradle-wrapper.properties b/build-tools/gradle/gradle/wrapper/gradle-wrapper.properties
index 6b3851a8ad2..fae08049a6f 100644
--- a/build-tools/gradle/gradle/wrapper/gradle-wrapper.properties
+++ b/build-tools/gradle/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/build-tools/scripts/DotNet.targets b/build-tools/scripts/DotNet.targets
index e11b2042001..37d4391b740 100644
--- a/build-tools/scripts/DotNet.targets
+++ b/build-tools/scripts/DotNet.targets
@@ -10,8 +10,14 @@
/>
+
+ <_JIPrepArg Include=""-p:Jdks8Root=$(Java8SdkDirectory)"" />
+ <_JIPrepArg Include=""-p:Jdks11Root=$(JavaSdkDirectory)"" />
+ <_JIPrepArg Include=""-p:DotnetToolPath=$(DotNetPreviewTool)"" />
+ <_JIPrepArg Include=""-bl:$(_BinlogPathPrefix)-prepare-java-interop.binlog"" />
+
diff --git a/build-tools/xaprepare/xaprepare/Application/GeneratedMonodroidCmakeFiles.cs b/build-tools/xaprepare/xaprepare/Application/GeneratedMonodroidCmakeFiles.cs
index 746f3f50d89..b58a065490b 100644
--- a/build-tools/xaprepare/xaprepare/Application/GeneratedMonodroidCmakeFiles.cs
+++ b/build-tools/xaprepare/xaprepare/Application/GeneratedMonodroidCmakeFiles.cs
@@ -84,12 +84,12 @@ void GenerateShellConfig (Context context, StreamWriter sw)
AddReplacements (commonReplacements, hostRuntimeReplacements);
string monodroidObjDir = Path.Combine (Configurables.Paths.MonodroidSourceDir, "obj", context.Configuration);
- string jdkInfoPropsPath = Path.Combine (Configurables.Paths.ExternalJavaInteropDir, "bin", $"Build{context.Configuration}", "JdkInfo.props");
+ string jdkInfoPropsPath = Path.Combine (Configurables.Paths.ExternalJavaInteropDir, "bin", $"Build{context.Configuration}", "JdkInfo-11.props");
sw.WriteLine ("# This is a bash(1) script");
sw.WriteLine ();
sw.WriteLine ($"CMAKE=\"{context.Properties.GetRequiredValue(KnownProperties.CMakePath)}\"");
- sw.WriteLine ($"JDK_INCLUDE_PATH=\"$(grep JdkIncludePath {jdkInfoPropsPath} | cut -d '\"' -f 2 | tr '\\n' ' ')\"");
+ sw.WriteLine ($"JDK_INCLUDE_PATH=\"$(grep Jdk11IncludePath {jdkInfoPropsPath} | cut -d '\"' -f 2 | tr '\\n' ' ')\"");
sw.WriteLine ($"MONO_SOURCE_PATH=\"{Configurables.Paths.MonoSourceFullPath}\"");
sw.WriteLine ($"MONODROID_OBJ_DIR=\"{monodroidObjDir}\"");
sw.WriteLine ($"MONODROID_SOURCE_DIR=\"{Configurables.Paths.MonodroidSourceDir}\"");
@@ -341,7 +341,7 @@ void GenerateMonodroidTargets (Context context, StreamWriter sw)
var hostRuntimeReplacements = new Dictionary (StringComparer.Ordinal) {
{ "@CmakeHostFlags@", "%(_HostRuntime.CmakeFlags)" },
- { "@JdkIncludePath@", "@(JdkIncludePath->'%(Identity)', ' ')" },
+ { "@JdkIncludePath@", "@(Jdk11IncludePath->'%(Identity)', ' ')" },
{ "@OUTPUT_DIRECTORY@", "" },
};
diff --git a/build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.cs b/build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.cs
index 48146658c7a..6a5b47e7bc0 100644
--- a/build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.cs
+++ b/build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.cs
@@ -57,7 +57,7 @@ public static partial class Defaults
public static readonly string BinutilsVersion = Configurables.BinutilsVersion;
public static readonly char[] PropertyListSeparator = new [] { ':' };
- public static readonly string JdkFolder = "jdk-11";
+ public static readonly string JdkFolder = "jdk-17";
public static readonly Version MicrosoftOpenJDK11Version = new Version (Configurables.MicrosoftOpenJDK11Version);
public static readonly Version MicrosoftOpenJDK11Release = new Version (Configurables.MicrosoftOpenJDK11Release);
@@ -307,7 +307,7 @@ public static partial class Paths
public static string OpenJDK8InstallDir => GetCachedPath (ref openJDK8InstallDir, () => Path.Combine (ctx.Properties.GetRequiredValue (KnownProperties.AndroidToolchainDirectory), "jdk-1.8"));
public static string OpenJDK8CacheDir => GetCachedPath (ref openJDK8CacheDir, () => ctx.Properties.GetRequiredValue (KnownProperties.AndroidToolchainCacheDirectory));
- public static string OpenJDK11InstallDir => GetCachedPath (ref openJDK11InstallDir, () => Path.Combine (ctx.Properties.GetRequiredValue (KnownProperties.AndroidToolchainDirectory), "jdk-11"));
+ public static string OpenJDK11InstallDir => GetCachedPath (ref openJDK11InstallDir, () => Path.Combine (ctx.Properties.GetRequiredValue (KnownProperties.AndroidToolchainDirectory), Defaults.JdkFolder));
public static string OpenJDK11CacheDir => GetCachedPath (ref openJDK11CacheDir, () => ctx.Properties.GetRequiredValue (KnownProperties.AndroidToolchainCacheDirectory));
// bundle
public static string BCLTestsArchiveName = "bcl-tests.zip";
diff --git a/external/Java.Interop b/external/Java.Interop
index 6aedf1ca0ba..d07d9f20f7b 160000
--- a/external/Java.Interop
+++ b/external/Java.Interop
@@ -1 +1 @@
-Subproject commit 6aedf1ca0baaeece6d2ef75deb19a077e8fc78f0
+Subproject commit d07d9f20f7bf643c971c99051dcf161a82f58309
diff --git a/external/Java.Interop.override.props b/external/Java.Interop.override.props
index 8cbac6945cf..2abaaf493cd 100644
--- a/external/Java.Interop.override.props
+++ b/external/Java.Interop.override.props
@@ -2,6 +2,7 @@
$(MSBuildThisFileDirectory)xamarin-android-tools
+ 17.99.0
diff --git a/src/manifestmerger/build.gradle b/src/manifestmerger/build.gradle
index 1cc1f13b018..63849a3d59f 100644
--- a/src/manifestmerger/build.gradle
+++ b/src/manifestmerger/build.gradle
@@ -19,7 +19,7 @@ repositories {
dependencies {
// https://mvnrepository.com/artifact/com.android.tools.build/manifest-merger
- compile group: 'com.android.tools.build', name: 'manifest-merger', version: '30.3.1'
+ implementation 'com.android.tools.build:manifest-merger:30.3.1'
}
sourceSets {
@@ -36,10 +36,10 @@ jar {
attributes 'Main-Class': 'com.xamarin.manifestmerger.Main'
}
from {
- configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
+ configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
} {
// Exclude native jnidispatch content to simplify installer signing and notarization
exclude 'META-INF/*.RSA', 'META-INF/*.SF', 'META-INF/*.DSA', 'com/sun/jna/**/*jnidispatch*'
}
- archiveName 'manifestmerger.jar'
-}
\ No newline at end of file
+ archiveFileName.set('manifestmerger.jar')
+}
diff --git a/src/monodroid/monodroid.targets b/src/monodroid/monodroid.targets
index 08a94631e20..acddbbdf098 100644
--- a/src/monodroid/monodroid.targets
+++ b/src/monodroid/monodroid.targets
@@ -1,6 +1,9 @@
-
+
diff --git a/src/r8/build.gradle b/src/r8/build.gradle
index 89ac931666a..988379d9be0 100644
--- a/src/r8/build.gradle
+++ b/src/r8/build.gradle
@@ -15,7 +15,7 @@ repositories {
}
dependencies {
- compile group: 'com.android.tools', name: 'r8', version: '8.0.40'
+ implementation 'com.android.tools:r8:8.0.40'
}
jar {
@@ -24,7 +24,7 @@ jar {
attributes 'Main-Class': 'com.android.tools.r8.R8'
}
from {
- configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
+ configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
- archiveName 'r8.jar'
-}
\ No newline at end of file
+ archiveFileName.set('r8.jar')
+}