diff --git a/Documentation/guides/messages/xa4233.md b/Documentation/guides/messages/xa4233.md new file mode 100644 index 00000000000..c55cf776415 --- /dev/null +++ b/Documentation/guides/messages/xa4233.md @@ -0,0 +1,35 @@ +--- +title: Xamarin.Android error XA4233 +description: XA4232 error code +ms.date: 01/25/2022 +--- +# Xamarin.Android error XA4233 + +## Example messages + +``` +error XA4233: The for 'com.xamarin.androidx' does not specify a 'Replacement' attribute. +``` + +## Issue + +`` items must include `Replacement` attribute + +## Solution + +To resolve this error, ensure that the specified `` contains +a 'Replacement' aatribute: + +```xml + + + +``` + +Note it is valid for the `Replacement` attribute value to be empty, however the attribute must still be provided: + +```xml + + + +``` \ No newline at end of file diff --git a/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Bindings.Core.targets b/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Bindings.Core.targets index 6372d0dbbdf..9b9bbccf102 100644 --- a/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Bindings.Core.targets +++ b/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Bindings.Core.targets @@ -81,6 +81,7 @@ It is shared between "legacy" binding projects and .NET 5 projects. EnableBindingInterfaceConstants="$(AndroidBoundInterfacesContainConstants)" Nullable="$(Nullable)" UseJavaLegacyResolver="$(_AndroidUseJavaLegacyResolver)" + NamespaceTransforms="@(AndroidNamespaceReplacement)" /> diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx index 731fac69737..332cd62f833 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx @@ -864,4 +864,9 @@ In this message, the term "handheld app" means "app for handheld devices." {0} - The path of the template file. + + The <AndroidNamespaceReplacement> for '{0}' does not specify a 'Replacement' attribute. + The following are literal names and should not be translated: <AndroidNamespaceReplacement> +{0} - The AndroidNamespaceReplacement MSBuild value. + \ No newline at end of file diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.cs.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.cs.xlf index 8195a6b87a9..68c42521ec3 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.cs.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.cs.xlf @@ -69,6 +69,12 @@ The capitalized word "Portable" that appears earlier in the message is plain tex The 'AndroidEnableProguard' MSBuild property is set to 'true' and the 'AndroidLinkTool' MSBuild property is empty, so 'AndroidLinkTool' will default to 'proguard'. The following are literal names and should not be translated: 'AndroidEnableProguard', 'true', 'AndroidLinkTool', 'proguard' + + The <AndroidNamespaceReplacement> for '{0}' does not specify a 'Replacement' attribute. + The <AndroidNamespaceReplacement> for '{0}' does not specify a 'Replacement' attribute. + The following are literal names and should not be translated: <AndroidNamespaceReplacement> +{0} - The AndroidNamespaceReplacement MSBuild value. + Native library '{0}' will not be bundled because it has an unsupported ABI. Move this file to a directory with a valid Android ABI name such as 'libs/armeabi-v7a/'. Native library '{0}' will not be bundled because it has an unsupported ABI. Move this file to a directory with a valid Android ABI name such as 'libs/armeabi-v7a/'. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.de.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.de.xlf index 9d6658e44bc..f6316480aa0 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.de.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.de.xlf @@ -69,6 +69,12 @@ The capitalized word "Portable" that appears earlier in the message is plain tex The 'AndroidEnableProguard' MSBuild property is set to 'true' and the 'AndroidLinkTool' MSBuild property is empty, so 'AndroidLinkTool' will default to 'proguard'. The following are literal names and should not be translated: 'AndroidEnableProguard', 'true', 'AndroidLinkTool', 'proguard' + + The <AndroidNamespaceReplacement> for '{0}' does not specify a 'Replacement' attribute. + The <AndroidNamespaceReplacement> for '{0}' does not specify a 'Replacement' attribute. + The following are literal names and should not be translated: <AndroidNamespaceReplacement> +{0} - The AndroidNamespaceReplacement MSBuild value. + Native library '{0}' will not be bundled because it has an unsupported ABI. Move this file to a directory with a valid Android ABI name such as 'libs/armeabi-v7a/'. Native library '{0}' will not be bundled because it has an unsupported ABI. Move this file to a directory with a valid Android ABI name such as 'libs/armeabi-v7a/'. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.es.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.es.xlf index 961fff8fa1f..1a7cfb8e3f3 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.es.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.es.xlf @@ -69,6 +69,12 @@ The capitalized word "Portable" that appears earlier in the message is plain tex The 'AndroidEnableProguard' MSBuild property is set to 'true' and the 'AndroidLinkTool' MSBuild property is empty, so 'AndroidLinkTool' will default to 'proguard'. The following are literal names and should not be translated: 'AndroidEnableProguard', 'true', 'AndroidLinkTool', 'proguard' + + The <AndroidNamespaceReplacement> for '{0}' does not specify a 'Replacement' attribute. + The <AndroidNamespaceReplacement> for '{0}' does not specify a 'Replacement' attribute. + The following are literal names and should not be translated: <AndroidNamespaceReplacement> +{0} - The AndroidNamespaceReplacement MSBuild value. + Native library '{0}' will not be bundled because it has an unsupported ABI. Move this file to a directory with a valid Android ABI name such as 'libs/armeabi-v7a/'. Native library '{0}' will not be bundled because it has an unsupported ABI. Move this file to a directory with a valid Android ABI name such as 'libs/armeabi-v7a/'. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.fr.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.fr.xlf index 99da76db74d..9d0c4191e79 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.fr.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.fr.xlf @@ -69,6 +69,12 @@ The capitalized word "Portable" that appears earlier in the message is plain tex The 'AndroidEnableProguard' MSBuild property is set to 'true' and the 'AndroidLinkTool' MSBuild property is empty, so 'AndroidLinkTool' will default to 'proguard'. The following are literal names and should not be translated: 'AndroidEnableProguard', 'true', 'AndroidLinkTool', 'proguard' + + The <AndroidNamespaceReplacement> for '{0}' does not specify a 'Replacement' attribute. + The <AndroidNamespaceReplacement> for '{0}' does not specify a 'Replacement' attribute. + The following are literal names and should not be translated: <AndroidNamespaceReplacement> +{0} - The AndroidNamespaceReplacement MSBuild value. + Native library '{0}' will not be bundled because it has an unsupported ABI. Move this file to a directory with a valid Android ABI name such as 'libs/armeabi-v7a/'. Native library '{0}' will not be bundled because it has an unsupported ABI. Move this file to a directory with a valid Android ABI name such as 'libs/armeabi-v7a/'. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.it.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.it.xlf index 1f0a66f4d56..60d21d22d9d 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.it.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.it.xlf @@ -69,6 +69,12 @@ The capitalized word "Portable" that appears earlier in the message is plain tex The 'AndroidEnableProguard' MSBuild property is set to 'true' and the 'AndroidLinkTool' MSBuild property is empty, so 'AndroidLinkTool' will default to 'proguard'. The following are literal names and should not be translated: 'AndroidEnableProguard', 'true', 'AndroidLinkTool', 'proguard' + + The <AndroidNamespaceReplacement> for '{0}' does not specify a 'Replacement' attribute. + The <AndroidNamespaceReplacement> for '{0}' does not specify a 'Replacement' attribute. + The following are literal names and should not be translated: <AndroidNamespaceReplacement> +{0} - The AndroidNamespaceReplacement MSBuild value. + Native library '{0}' will not be bundled because it has an unsupported ABI. Move this file to a directory with a valid Android ABI name such as 'libs/armeabi-v7a/'. Native library '{0}' will not be bundled because it has an unsupported ABI. Move this file to a directory with a valid Android ABI name such as 'libs/armeabi-v7a/'. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ja.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ja.xlf index a8d7716afc7..f5994706d9e 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ja.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ja.xlf @@ -69,6 +69,12 @@ The capitalized word "Portable" that appears earlier in the message is plain tex The 'AndroidEnableProguard' MSBuild property is set to 'true' and the 'AndroidLinkTool' MSBuild property is empty, so 'AndroidLinkTool' will default to 'proguard'. The following are literal names and should not be translated: 'AndroidEnableProguard', 'true', 'AndroidLinkTool', 'proguard' + + The <AndroidNamespaceReplacement> for '{0}' does not specify a 'Replacement' attribute. + The <AndroidNamespaceReplacement> for '{0}' does not specify a 'Replacement' attribute. + The following are literal names and should not be translated: <AndroidNamespaceReplacement> +{0} - The AndroidNamespaceReplacement MSBuild value. + Native library '{0}' will not be bundled because it has an unsupported ABI. Move this file to a directory with a valid Android ABI name such as 'libs/armeabi-v7a/'. Native library '{0}' will not be bundled because it has an unsupported ABI. Move this file to a directory with a valid Android ABI name such as 'libs/armeabi-v7a/'. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ko.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ko.xlf index 0a2f109bb60..d67caee5559 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ko.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ko.xlf @@ -69,6 +69,12 @@ The capitalized word "Portable" that appears earlier in the message is plain tex The 'AndroidEnableProguard' MSBuild property is set to 'true' and the 'AndroidLinkTool' MSBuild property is empty, so 'AndroidLinkTool' will default to 'proguard'. The following are literal names and should not be translated: 'AndroidEnableProguard', 'true', 'AndroidLinkTool', 'proguard' + + The <AndroidNamespaceReplacement> for '{0}' does not specify a 'Replacement' attribute. + The <AndroidNamespaceReplacement> for '{0}' does not specify a 'Replacement' attribute. + The following are literal names and should not be translated: <AndroidNamespaceReplacement> +{0} - The AndroidNamespaceReplacement MSBuild value. + Native library '{0}' will not be bundled because it has an unsupported ABI. Move this file to a directory with a valid Android ABI name such as 'libs/armeabi-v7a/'. Native library '{0}' will not be bundled because it has an unsupported ABI. Move this file to a directory with a valid Android ABI name such as 'libs/armeabi-v7a/'. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pl.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pl.xlf index 6bc85dd0e62..816c68ab99a 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pl.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pl.xlf @@ -69,6 +69,12 @@ The capitalized word "Portable" that appears earlier in the message is plain tex The 'AndroidEnableProguard' MSBuild property is set to 'true' and the 'AndroidLinkTool' MSBuild property is empty, so 'AndroidLinkTool' will default to 'proguard'. The following are literal names and should not be translated: 'AndroidEnableProguard', 'true', 'AndroidLinkTool', 'proguard' + + The <AndroidNamespaceReplacement> for '{0}' does not specify a 'Replacement' attribute. + The <AndroidNamespaceReplacement> for '{0}' does not specify a 'Replacement' attribute. + The following are literal names and should not be translated: <AndroidNamespaceReplacement> +{0} - The AndroidNamespaceReplacement MSBuild value. + Native library '{0}' will not be bundled because it has an unsupported ABI. Move this file to a directory with a valid Android ABI name such as 'libs/armeabi-v7a/'. Native library '{0}' will not be bundled because it has an unsupported ABI. Move this file to a directory with a valid Android ABI name such as 'libs/armeabi-v7a/'. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pt-BR.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pt-BR.xlf index cc5c568b4c0..0bb037f5261 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pt-BR.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pt-BR.xlf @@ -69,6 +69,12 @@ The capitalized word "Portable" that appears earlier in the message is plain tex The 'AndroidEnableProguard' MSBuild property is set to 'true' and the 'AndroidLinkTool' MSBuild property is empty, so 'AndroidLinkTool' will default to 'proguard'. The following are literal names and should not be translated: 'AndroidEnableProguard', 'true', 'AndroidLinkTool', 'proguard' + + The <AndroidNamespaceReplacement> for '{0}' does not specify a 'Replacement' attribute. + The <AndroidNamespaceReplacement> for '{0}' does not specify a 'Replacement' attribute. + The following are literal names and should not be translated: <AndroidNamespaceReplacement> +{0} - The AndroidNamespaceReplacement MSBuild value. + Native library '{0}' will not be bundled because it has an unsupported ABI. Move this file to a directory with a valid Android ABI name such as 'libs/armeabi-v7a/'. Native library '{0}' will not be bundled because it has an unsupported ABI. Move this file to a directory with a valid Android ABI name such as 'libs/armeabi-v7a/'. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ru.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ru.xlf index 35b84796d08..139951aef39 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ru.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ru.xlf @@ -69,6 +69,12 @@ The capitalized word "Portable" that appears earlier in the message is plain tex The 'AndroidEnableProguard' MSBuild property is set to 'true' and the 'AndroidLinkTool' MSBuild property is empty, so 'AndroidLinkTool' will default to 'proguard'. The following are literal names and should not be translated: 'AndroidEnableProguard', 'true', 'AndroidLinkTool', 'proguard' + + The <AndroidNamespaceReplacement> for '{0}' does not specify a 'Replacement' attribute. + The <AndroidNamespaceReplacement> for '{0}' does not specify a 'Replacement' attribute. + The following are literal names and should not be translated: <AndroidNamespaceReplacement> +{0} - The AndroidNamespaceReplacement MSBuild value. + Native library '{0}' will not be bundled because it has an unsupported ABI. Move this file to a directory with a valid Android ABI name such as 'libs/armeabi-v7a/'. Native library '{0}' will not be bundled because it has an unsupported ABI. Move this file to a directory with a valid Android ABI name such as 'libs/armeabi-v7a/'. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.tr.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.tr.xlf index ca63fdcf9e1..9527052be39 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.tr.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.tr.xlf @@ -69,6 +69,12 @@ The capitalized word "Portable" that appears earlier in the message is plain tex The 'AndroidEnableProguard' MSBuild property is set to 'true' and the 'AndroidLinkTool' MSBuild property is empty, so 'AndroidLinkTool' will default to 'proguard'. The following are literal names and should not be translated: 'AndroidEnableProguard', 'true', 'AndroidLinkTool', 'proguard' + + The <AndroidNamespaceReplacement> for '{0}' does not specify a 'Replacement' attribute. + The <AndroidNamespaceReplacement> for '{0}' does not specify a 'Replacement' attribute. + The following are literal names and should not be translated: <AndroidNamespaceReplacement> +{0} - The AndroidNamespaceReplacement MSBuild value. + Native library '{0}' will not be bundled because it has an unsupported ABI. Move this file to a directory with a valid Android ABI name such as 'libs/armeabi-v7a/'. Native library '{0}' will not be bundled because it has an unsupported ABI. Move this file to a directory with a valid Android ABI name such as 'libs/armeabi-v7a/'. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hans.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hans.xlf index 5fbbe854023..4a89e6b4237 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hans.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hans.xlf @@ -69,6 +69,12 @@ The capitalized word "Portable" that appears earlier in the message is plain tex The 'AndroidEnableProguard' MSBuild property is set to 'true' and the 'AndroidLinkTool' MSBuild property is empty, so 'AndroidLinkTool' will default to 'proguard'. The following are literal names and should not be translated: 'AndroidEnableProguard', 'true', 'AndroidLinkTool', 'proguard' + + The <AndroidNamespaceReplacement> for '{0}' does not specify a 'Replacement' attribute. + The <AndroidNamespaceReplacement> for '{0}' does not specify a 'Replacement' attribute. + The following are literal names and should not be translated: <AndroidNamespaceReplacement> +{0} - The AndroidNamespaceReplacement MSBuild value. + Native library '{0}' will not be bundled because it has an unsupported ABI. Move this file to a directory with a valid Android ABI name such as 'libs/armeabi-v7a/'. Native library '{0}' will not be bundled because it has an unsupported ABI. Move this file to a directory with a valid Android ABI name such as 'libs/armeabi-v7a/'. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hant.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hant.xlf index b2a565d6c09..8483c7df4d5 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hant.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hant.xlf @@ -69,6 +69,12 @@ The capitalized word "Portable" that appears earlier in the message is plain tex The 'AndroidEnableProguard' MSBuild property is set to 'true' and the 'AndroidLinkTool' MSBuild property is empty, so 'AndroidLinkTool' will default to 'proguard'. The following are literal names and should not be translated: 'AndroidEnableProguard', 'true', 'AndroidLinkTool', 'proguard' + + The <AndroidNamespaceReplacement> for '{0}' does not specify a 'Replacement' attribute. + The <AndroidNamespaceReplacement> for '{0}' does not specify a 'Replacement' attribute. + The following are literal names and should not be translated: <AndroidNamespaceReplacement> +{0} - The AndroidNamespaceReplacement MSBuild value. + Native library '{0}' will not be bundled because it has an unsupported ABI. Move this file to a directory with a valid Android ABI name such as 'libs/armeabi-v7a/'. Native library '{0}' will not be bundled because it has an unsupported ABI. Move this file to a directory with a valid Android ABI name such as 'libs/armeabi-v7a/'. diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/Generator.cs b/src/Xamarin.Android.Build.Tasks/Tasks/Generator.cs index 2f5c06f42b8..e4ab768c852 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/Generator.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/Generator.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; +using System.Xml; using System.Xml.Linq; using Microsoft.Build.Framework; using Microsoft.Android.Build.Tasks; @@ -55,6 +56,7 @@ public class BindingsGenerator : AndroidDotnetToolTask public ITaskItem[] TransformFiles { get; set; } public ITaskItem[] ReferencedManagedLibraries { get; set; } public ITaskItem[] AnnotationsZipFiles { get; set; } + public ITaskItem[] NamespaceTransforms { get; set; } public ITaskItem[] JavadocXml { get; set; } public string JavadocVerbosity { get; set; } @@ -113,6 +115,20 @@ public override bool RunTask () } } + + if (NamespaceTransforms?.Any () == true) + foreach (var nt in NamespaceTransforms) { + if (!nt.MetadataNames.OfType ().Contains ("Replacement", StringComparer.OrdinalIgnoreCase)) + Log.LogCodedError ( + code: "XA4233", + message: Properties.Resources.XA4233, + messageArgs: new [] { nt.ItemSpec } + ); + } + + if (Log.HasLoggedErrors) + return false; + return base.RunTask (); } @@ -126,6 +142,21 @@ protected override string GenerateCommandLineCommands () { var cmd = GetCommandLineBuilder (); + if (NamespaceTransforms?.Any () == true) { + // ex: obj/Debug/generated/msbuild-metadata.xml + var transform_file = Path.Combine (OutputDirectory, "..", "msbuild-metadata.xml"); + + var root = new XElement ("metadata"); + + foreach (var nt in NamespaceTransforms) + root.Add (new XElement ("ns-replace", new XAttribute ("source", nt.ItemSpec), new XAttribute ("replacement", nt.GetMetadata ("replacement")))); + + using (var xml_writer = XmlWriter.Create (transform_file, new XmlWriterSettings { Indent = true })) + root.WriteTo (xml_writer); + + transform_files.Add (new Tuple (transform_file, "fixup")); + } + string responseFile = Path.Combine (OutputDirectory, "generator.rsp"); Log.LogDebugMessage ("[Generator] response file: {0}", responseFile); using (var sw = new StreamWriter (responseFile, append: false, encoding: Files.UTF8withoutBOM)) { diff --git a/tests/CodeGen-Binding/Xamarin.Android.JcwGen-Tests/BindingTests.cs b/tests/CodeGen-Binding/Xamarin.Android.JcwGen-Tests/BindingTests.cs index f4c6a07d8ce..797191a9429 100644 --- a/tests/CodeGen-Binding/Xamarin.Android.JcwGen-Tests/BindingTests.cs +++ b/tests/CodeGen-Binding/Xamarin.Android.JcwGen-Tests/BindingTests.cs @@ -38,6 +38,15 @@ public void TestNativeLibDllImportInEmbeddedArchive () Assert.AreEqual (TestNativeLib.Binding.SampleFunction2 (), 0xf200); } + [Test] + public void NamespaceTransforms () + { + // Really the only test here is that the type exists in the binding. + // If the transforms were not working it would be 'Com.Xamarin.Example.NamespaceTransform'. + var t = new Transformed.Namespace.NamespaceTransform (); + Assert.IsNotNull (t); + } + [Test] public void TestBxc4288 () { diff --git a/tests/CodeGen-Binding/Xamarin.Android.McwGen-Tests/Xamarin.Android.McwGen-Tests.csproj b/tests/CodeGen-Binding/Xamarin.Android.McwGen-Tests/Xamarin.Android.McwGen-Tests.csproj index 834e89ec284..46108a3953e 100644 --- a/tests/CodeGen-Binding/Xamarin.Android.McwGen-Tests/Xamarin.Android.McwGen-Tests.csproj +++ b/tests/CodeGen-Binding/Xamarin.Android.McwGen-Tests/Xamarin.Android.McwGen-Tests.csproj @@ -134,6 +134,9 @@ Jars/xamarin-test.jar + + Jars/xamarin-test.jar + @@ -144,6 +147,10 @@ + + + + diff --git a/tests/CodeGen-Binding/Xamarin.Android.McwGen-Tests/java/com/xamarin/example/NamespaceTransform.java b/tests/CodeGen-Binding/Xamarin.Android.McwGen-Tests/java/com/xamarin/example/NamespaceTransform.java new file mode 100644 index 00000000000..88019d69d93 --- /dev/null +++ b/tests/CodeGen-Binding/Xamarin.Android.McwGen-Tests/java/com/xamarin/example/NamespaceTransform.java @@ -0,0 +1,4 @@ +package com.xamarin.example; + +public class NamespaceTransform { +}