Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,18 @@ To use a custom JDK path for a command line build, set the 'JavaSdkDirectory' MS
{1} - The name of the .NET runtime (e.g. CoreCLR, NativeAOT).
</comment>
</data>
<data name="XA1045" xml:space="preserve">
<value>Input file `{0}` does not start with `&lt;replacements/&gt;`.</value>
<comment>{0} - file path</comment>
</data>
<data name="XA1046" xml:space="preserve">
<value>Attribute '{0}' in element '{1}' has value '{2}' that cannot be parsed as boolean; {3} line {4}.</value>
<comment>{0} - attribute name; {1} - element name; {2} - attribute value; {3} - file path; {4} - line number</comment>
</data>
<data name="XA1047" xml:space="preserve">
<value>Required attribute '{0}' missing from element '{1}'; {2} line {3}.</value>
<comment>{0} - attribute name; {1} - element name; {2} - file path; {3} - line number</comment>
</data>
<data name="XA4241" xml:space="preserve">
<value>Java dependency '{0}' is not satisfied.</value>
<comment>The following are literal names and should not be translated: Java.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void Generate (string remappingXmlFilePath)

using (var reader = XmlReader.Create (File.OpenRead (remappingXmlFilePath), readerSettings)) {
if (reader.MoveToContent () != XmlNodeType.Element || reader.LocalName != "replacements") {
Log.LogError ($"Input file `{remappingXmlFilePath}` does not start with `<replacements/>`");
Log.LogCodedError ("XA1045", Properties.Resources.XA1045, remappingXmlFilePath);
} else {
ReadXml (reader, typeReplacements, methodReplacements, remappingXmlFilePath);
}
Expand Down Expand Up @@ -131,7 +131,7 @@ void ReadXml (XmlReader reader, List<JniRemappingTypeReplacement> typeReplacemen
}

if (!Boolean.TryParse (targetIsStatic, out bool isStatic)) {
Log.LogError ($"Attribute 'target-method-instance-to-static' in element '{reader.LocalName}' value '{targetIsStatic}' cannot be parsed as boolean; {remappingXmlFilePath} line {GetCurrentLineNumber ()}");
Log.LogCodedError ("XA1046", Properties.Resources.XA1046, "target-method-instance-to-static", reader.LocalName, targetIsStatic, remappingXmlFilePath, GetCurrentLineNumber ());
continue;
}

Expand All @@ -152,7 +152,7 @@ bool GetRequiredAttribute (string attributeName, out string attributeValue)
return true;
}

Log.LogError ($"Attribute '{attributeName}' missing from element '{reader.LocalName}'; {remappingXmlFilePath} line {GetCurrentLineNumber ()}");
Log.LogCodedError ("XA1047", Properties.Resources.XA1047, attributeName, reader.LocalName, remappingXmlFilePath, GetCurrentLineNumber ());
return false;
}

Expand Down