Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[jcw-gen] Skip interface types (#825)
Context: ebd7d76 ebd7d76 introduced support for including interfaces within typemaps, but it failed to update the `jcw-gen` utility to ignore interfaces when generating Java Callable Wrappers. This, in turn, caused Xamarin.Android builds to fail: bin/Release/lib/xamarin.android/xbuild/Xamarin/Android/jcw-gen.exe" -v10 -o "src/Mono.Android/obj/Release/netcoreapp3.1/android-30/jcw/src" \ -L "bin/Release/lib/xamarin.android/xbuild-frameworks/Microsoft.Android/netcoreapp3.1/" \ -L "~/.nuget/packages/microsoft.netcore.app.ref/3.1.0/ref/netcoreapp3.1/" \ "bin/Release/lib/xamarin.android/xbuild-frameworks/Microsoft.Android/netcoreapp3.1/Mono.Android.dll" jcw-gen: Java.Interop.Tools.Diagnostics.XamarinAndroidException: error XA4200: Cannot generate Java wrapper for type 'Org.XmlPull.V1.IXmlPullParser'. Only 'class' types are supported. at Java.Interop.Tools.Diagnostics.Diagnostic.Error (System.Int32 code, Mono.Cecil.Cil.SequencePoint location, System.String message, System.Object[] args) [0x00000] in external/Java.Interop/src/Java.Interop.Tools.Diagnostics/Java.Interop.Tools.Diagnostics/Diagnostic.cs:153 at Java.Interop.Tools.JavaCallableWrappers.JavaCallableWrapperGenerator..ctor (Mono.Cecil.TypeDefinition type, System.String outerType, System.Action`2[T1,T2] log, Java.Interop.Tools.Cecil.TypeDefinitionCache cache) [0x0007f] in external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/JavaCallableWrapperGenerator.cs:113 at Java.Interop.Tools.JavaCallableWrappers.JavaCallableWrapperGenerator..ctor (Mono.Cecil.TypeDefinition type, System.Action`2[T1,T2] log, Java.Interop.Tools.Cecil.TypeDefinitionCache cache) [0x00000] in external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/JavaCallableWrapperGenerator.cs:65 at Java.Interop.Tools.App.GenerateJavaCallableWrapper (Mono.Cecil.TypeDefinition type, System.String outputPath, Java.Interop.Tools.Cecil.TypeDefinitionCache cache) [0x00000] in external/Java.Interop/tools/jcw-gen/App.cs:86 at Java.Interop.Tools.App.Main (System.String[] args) [0x00215] in Java.Interop/tools/jcw-gen/App.cs:71 Fix the issue by ignoring interfaces within `jcw-gen`.
- Loading branch information