From 567370a42cccd69043ee4397b6b70f24afc14cfd Mon Sep 17 00:00:00 2001 From: Jonathan Pryor Date: Wed, 22 Feb 2023 21:46:12 -0500 Subject: [PATCH 1/3] 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 | 6 ----- .../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(+), 78 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..39b34ef30e3 100644 --- a/build-tools/installers/create-installers.targets +++ b/build-tools/installers/create-installers.targets @@ -155,12 +155,6 @@ <_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 @@ - - - From 59439e8c7d1d6feb73931eb8cd05766f78c36d83 Mon Sep 17 00:00:00 2001 From: Jonathan Pryor Date: Mon, 27 Feb 2023 21:18:17 -0500 Subject: [PATCH 2/3] Update error message. --- src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets index 6b9d816a594..1d63c65c6a0 100644 --- a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets +++ b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets @@ -1456,7 +1456,7 @@ because xbuild doesn't support framework reference assemblies. DependsOnTargets="_GetReferenceAssemblyPaths;_SetLatestTargetFrameworkVersion" Inputs="$(_AndroidBuildPropertiesCache);@(ResolvedUserAssemblies)" Outputs="$(_AndroidStampDirectory)_GenerateJniMarshalMethods.stamp"> - + From 7c8a3338d98249b2bdc4dafec2f41b9622d51ed8 Mon Sep 17 00:00:00 2001 From: Jonathan Pryor Date: Mon, 27 Feb 2023 21:19:34 -0500 Subject: [PATCH 3/3] Back to xamarin/java.interop/main! --- .gitmodules | 4 ++-- external/Java.Interop | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index 3a0a3805930..f8838a54d10 100644 --- a/.gitmodules +++ b/.gitmodules @@ -12,8 +12,8 @@ branch = main [submodule "external/Java.Interop"] path = external/Java.Interop - url = https://github.com/jonpryor/java.interop.git - branch = jonp-cecil-expression-compiler + url = https://github.com/xamarin/java.interop.git + branch = main [submodule "external/lz4"] path = external/lz4 url = https://github.com/lz4/lz4.git diff --git a/external/Java.Interop b/external/Java.Interop index 180978cf313..77800dda83c 160000 --- a/external/Java.Interop +++ b/external/Java.Interop @@ -1 +1 @@ -Subproject commit 180978cf313b124479232d7f58beac0636eabc4e +Subproject commit 77800dda83c2db4d90b501c00069abc9880caaeb