From c9d40c8ae123be797bef667e835148b2b00925ca Mon Sep 17 00:00:00 2001 From: Jonathan Pryor Date: Wed, 22 Feb 2023 21:46:12 -0500 Subject: [PATCH] Try xamarin/java.interop#1046 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Context: https://github.com/xamarin/java.interop/pull/1046 The assumption is that This Cannot Possibly Impact™ Android. So… Does It Build™? …no, it does not build, because xamarin/java.interop#1046 removes the `net472` build of `jnimarshalmethod-gen.exe`, which causes packaging to fail. Noice. Given that `jnimarshalmethod-gen.exe` only "worked" in Classic, and that main is (slowly) dropping support for Classic (618bd4ab), update the repo to stop packaging `jnimarshalmethod-gen.*` and `Java.Runtime.Environment.*`. This should fix the packaging errors. --- .gitmodules | 4 +-- .../installers/create-installers.targets | 5 ---- .../scripts/JavaInteropDllConfigs.targets | 26 ------------------- external/Java.Interop | 2 +- .../Xamarin.Android.Common.targets | 17 +----------- src/monodroid/monodroid.csproj | 10 ------- src/monodroid/monodroid.targets | 3 +-- .../Directory.Build.targets | 9 ------- ...orms.Performance.Integration.Droid.targets | 6 ----- 9 files changed, 5 insertions(+), 77 deletions(-) delete mode 100644 build-tools/scripts/JavaInteropDllConfigs.targets diff --git a/.gitmodules b/.gitmodules index f8838a54d10..3a0a3805930 100644 --- a/.gitmodules +++ b/.gitmodules @@ -12,8 +12,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-cecil-expression-compiler [submodule "external/lz4"] path = external/lz4 url = https://github.com/lz4/lz4.git diff --git a/build-tools/installers/create-installers.targets b/build-tools/installers/create-installers.targets index d8880a6ab2f..bc50f62a61a 100644 --- a/build-tools/installers/create-installers.targets +++ b/build-tools/installers/create-installers.targets @@ -155,12 +155,7 @@ <_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)jcw-gen.pdb" /> <_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)jit-times.exe" /> <_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)jit-times.pdb" /> - <_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)jnimarshalmethod-gen.exe" /> - <_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)jnimarshalmethod-gen.pdb" /> <_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)Java.Interop.dll.config" /> - <_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)Java.Runtime.Environment.dll" /> - <_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)Java.Runtime.Environment.pdb" /> - <_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)Java.Runtime.Environment.dll.config" Condition=" '$(HostOS)' != 'Windows' " /> <_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)logcat-parse.exe" /> <_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)logcat-parse.pdb" /> <_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)Mono.CSharp.dll" /> diff --git a/build-tools/scripts/JavaInteropDllConfigs.targets b/build-tools/scripts/JavaInteropDllConfigs.targets deleted file mode 100644 index b78f6e0fa91..00000000000 --- a/build-tools/scripts/JavaInteropDllConfigs.targets +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - <_DllMaps>@(_JavaInteropDllMapContent->'%(Identity)', '%0a ') - - - - diff --git a/external/Java.Interop b/external/Java.Interop index bbaeda6f698..180978cf313 160000 --- a/external/Java.Interop +++ b/external/Java.Interop @@ -1 +1 @@ -Subproject commit bbaeda6f698369bdd48bfc2dd1a32a41c9d23229 +Subproject commit 180978cf313b124479232d7f58beac0636eabc4e diff --git a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets index 060d670a696..6b9d816a594 100644 --- a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets +++ b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets @@ -1456,22 +1456,7 @@ because xbuild doesn't support framework reference assemblies. DependsOnTargets="_GetReferenceAssemblyPaths;_SetLatestTargetFrameworkVersion" Inputs="$(_AndroidBuildPropertiesCache);@(ResolvedUserAssemblies)" Outputs="$(_AndroidStampDirectory)_GenerateJniMarshalMethods.stamp"> - - <_JniFrameworkAssembly Include="Mono.Android.dll" /> - <_JniFrameworkAssembly Include="OpenTK.dll" /> - <_JniFrameworkAssembly Include="Xamarin.Android.NUnitLite.dll" /> - <_AssembliesToProcess Include="@(ResolvedUserAssemblies)" /> - <_AssembliesToProcess Include="@(ResolvedFrameworkAssemblies)" Condition=" '%(Filename)' == '@(_JniFrameworkAssembly->'%(Filename)')' " /> - - - - - - - - + diff --git a/src/monodroid/monodroid.csproj b/src/monodroid/monodroid.csproj index 7e68ca4f678..c4dbc2d7b5c 100644 --- a/src/monodroid/monodroid.csproj +++ b/src/monodroid/monodroid.csproj @@ -17,15 +17,5 @@ - - diff --git a/src/monodroid/monodroid.targets b/src/monodroid/monodroid.targets index d157bb0a0f8..08a94631e20 100644 --- a/src/monodroid/monodroid.targets +++ b/src/monodroid/monodroid.targets @@ -3,7 +3,6 @@ - @@ -207,7 +206,7 @@ diff --git a/tests/Mono.Android-Tests/Directory.Build.targets b/tests/Mono.Android-Tests/Directory.Build.targets index c10fba5a277..353ac12a59c 100644 --- a/tests/Mono.Android-Tests/Directory.Build.targets +++ b/tests/Mono.Android-Tests/Directory.Build.targets @@ -24,13 +24,4 @@ - - - - - - diff --git a/tests/Xamarin.Forms-Performance-Integration/Droid/Xamarin.Forms.Performance.Integration.Droid.targets b/tests/Xamarin.Forms-Performance-Integration/Droid/Xamarin.Forms.Performance.Integration.Droid.targets index 1b201ecdd72..c5a5e4d97b7 100644 --- a/tests/Xamarin.Forms-Performance-Integration/Droid/Xamarin.Forms.Performance.Integration.Droid.targets +++ b/tests/Xamarin.Forms-Performance-Integration/Droid/Xamarin.Forms.Performance.Integration.Droid.targets @@ -2,10 +2,4 @@ - - -