Skip to content

Commit

Permalink
Bump to xamarin/xamarin-android-tools/main@9c641b3e (#7073)
Browse files Browse the repository at this point in the history
Context: https://dl-ssl.google.com/android/repository/repository2-3.xml
Context: 22bc14b

Changes: dotnet/android-tools@ec346d0...9c641b3

  * dotnet/android-tools@9c641b3 [Xamarin.Android.Tools.AndroidSdk] Update SDK component for API-32 (#169)

Commit dotnet/android-tools@9c641b3 bumps
`$(AndroidSdkBuildToolsVersion)` to 32.0.0.  (We looked at bumping
to 33.0.0, but that broke various unit tests; we will investigate
supporting build-tools 33.0.0 later.)

The "problem" is that [build-tools 31.0.0 *removed* `dx`][0], and
thus Classic Xamarin.Android has stuck with build-tools 30.0.0 as the
default version for years.

Commit 22bc14b introduced warning XA1023 (an *error* in .NET 5+),
as we saw no reason to support `dx` in .NET 5 when it was already
deprecated.

Warning XA1023 has been emitted in Classic Xamarin.Android since
Visual Studio 16.9 (released 2021-Mar); we feel there has been ample
time to migrate away from `dx` and to the replacement of `d8`.

Turn XA1023 into an *error* for Classic Xamarin.Android builds,
ensuring things are consistent between Classic Xamarin.Android and
.NET 6+.

Commit dotnet/android-tools@9c641b3 *also* bumps
`$(AndroidCommandLineToolsVersion)` to 7.0.  Update
`$(CommandLineToolsVersion)` in `Configuration.props` accordingly.

The `cmdline-tools` package v7.0 contains contains [`lint` 7.2][1],
which introduces a new `lint` check called `RedundantLabel`:

> Redundant label on activity in manifest

meaning that the `//actviity/@android:label` value is identical to
the `//application/@android:label` value, and thus isn't needed.

This causes a warning from `BuildTest.CheckLintErrorsAndWarnings()`:

	obj/Debug/android/AndroidManifest.xml(12,44): warning XA0102:
	Redundant label can be removed [RedundantLabel]

For now, update `BuildTest.CheckLintErrorsAndWarnings()` to ignore
`RedundantLabel` warnings.

TODO:

Remove support for `dx` and ProGuard.

[0]: https://android-developers.googleblog.com/2020/02/the-path-to-dx-deprecation.html
[1]: http://googlesamples.github.io/android-custom-lint-rules/usage/changes.md.html
  • Loading branch information
jonpryor authored Jun 16, 2022
1 parent c59b591 commit 0181212
Show file tree
Hide file tree
Showing 26 changed files with 42 additions and 115 deletions.
4 changes: 2 additions & 2 deletions Configuration.props
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@
<AndroidToolPath Condition=" '$(AndroidToolPath)' == '' ">$(AndroidSdkFullPath)\tools</AndroidToolPath>
<AndroidToolsBinPath Condition=" '$(AndroidToolsBinPath)' == '' ">$(AndroidToolPath)\bin</AndroidToolsBinPath>
<AndroidToolExe Condition=" '$(AndroidToolExe)' == '' ">android</AndroidToolExe>
<CommandLineToolsFolder Condition=" '$(CommandLineToolsFolder)' == '' ">5.0</CommandLineToolsFolder>
<CommandLineToolsVersion Condition=" '$(CommandLineToolsVersion)' == '' ">7583922_latest</CommandLineToolsVersion>
<CommandLineToolsFolder Condition=" '$(CommandLineToolsFolder)' == '' ">7.0</CommandLineToolsFolder>
<CommandLineToolsVersion Condition=" '$(CommandLineToolsVersion)' == '' ">8512546_latest</CommandLineToolsVersion>
<CommandLineToolsBinPath Condition=" '$(CommandLineToolsBinPath)' == '' ">$(AndroidSdkFullPath)\cmdline-tools\$(CommandLineToolsFolder)\bin</CommandLineToolsBinPath>
<!-- Version numbers and PkgVersion are found in https://dl-ssl.google.com/android/repository/repository2-1.xml -->
<EmulatorVersion Condition=" '$(EmulatorVersion)' == '' ">8129060</EmulatorVersion>
Expand Down
7 changes: 6 additions & 1 deletion Documentation/guides/messages/xa1023.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ ms.date: 05/18/2020

## Example messages

```
error XA1023: Using the DX DEX Compiler is not supported. Please set the DEX compiler to 'd8' in the Visual Studio project property pages or edit the project file in a text editor and set the 'AndroidDexTool' MSBuild property to 'd8'.
```

```
warning XA1023: Using the DX DEX Compiler is deprecated. Please set the DEX compiler to 'd8' in the Visual Studio project property pages or edit the project file in a text editor and set the 'AndroidDexTool' MSBuild property to 'd8'.
```
Expand All @@ -21,7 +25,8 @@ Google has deprecated the DX DEX Compiler in favor of the [D8 DEX
Compiler][d8]. On [February 1, 2021][dx], DX will no longer be a part
of Android SDK or Android Studio.

The DX DEX Compiler will not supported in .NET 6 or higher.
The DX DEX Compiler will not supported in .NET 6 or higher, nor in
Xamarin.Android 12.4 and higher.

[d8]: https://developer.android.com/studio/command-line/d8
[dx]: https://android-developers.googleblog.com/2020/02/the-path-to-dx-deprecation.html
Expand Down
2 changes: 1 addition & 1 deletion external/xamarin-android-tools
6 changes: 1 addition & 5 deletions src/Xamarin.Android.Build.Tasks/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -434,13 +434,9 @@ In this message, the term "binding" means a piece of generated code that makes i
{0} - The file name of the library</comment>
</data>
<data name="XA1023" xml:space="preserve">
<value>Using the DX DEX Compiler is deprecated. Please set the DEX compiler to 'd8' in the Visual Studio project property pages or edit the project file in a text editor and set the 'AndroidDexTool' MSBuild property to 'd8'.</value>
<value>Using the DX DEX Compiler is not supported. Please set the DEX compiler to 'd8' in the Visual Studio project property pages or edit the project file in a text editor and set the 'AndroidDexTool' MSBuild property to 'd8'.</value>
<comment>The following are literal names and should not be translated: DX, DEX, d8, AndroidDexTool.</comment>
</data>
<data name="XA1023_dotnet" xml:space="preserve">
<value>Using the DX DEX Compiler is not supported in Xamarin.Android projects that target .NET 6 or higher. Please set the DEX compiler to 'd8' in the Visual Studio project property pages or edit the project file in a text editor and set the 'AndroidDexTool' MSBuild property to 'd8'.</value>
<comment>The following are literal names and should not be translated: DX, DEX, Xamarin.Android, .NET 6, d8, AndroidDexTool.</comment>
</data>
<data name="XA1024" xml:space="preserve">
<value>Ignoring configuration file '{0}'. .NET configuration files are not supported in Xamarin.Android projects that target .NET 6 or higher.</value>
<comment>The following are literal names and should not be translated: .NET, Xamarin.Android.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,15 +475,10 @@ In this message, the term "binding" means a piece of generated code that makes i
{0} - The file name of the library</note>
</trans-unit>
<trans-unit id="XA1023">
<source>Using the DX DEX Compiler is deprecated. Please set the DEX compiler to 'd8' in the Visual Studio project property pages or edit the project file in a text editor and set the 'AndroidDexTool' MSBuild property to 'd8'.</source>
<target state="translated">Používání kompilátoru DX DEX je zastaralé. Nastavte prosím na stránkách vlastností projektu sady Visual Studio kompilátor DEX na d8, nebo upravte soubor projektu v textovém editoru a nastavte vlastnost MSBuildu AndroidDexTool na d8.</target>
<source>Using the DX DEX Compiler is not supported. Please set the DEX compiler to 'd8' in the Visual Studio project property pages or edit the project file in a text editor and set the 'AndroidDexTool' MSBuild property to 'd8'.</source>
<target state="needs-review-translation">Používání kompilátoru DX DEX je zastaralé. Nastavte prosím na stránkách vlastností projektu sady Visual Studio kompilátor DEX na d8, nebo upravte soubor projektu v textovém editoru a nastavte vlastnost MSBuildu AndroidDexTool na d8.</target>
<note>The following are literal names and should not be translated: DX, DEX, d8, AndroidDexTool.</note>
</trans-unit>
<trans-unit id="XA1023_dotnet">
<source>Using the DX DEX Compiler is not supported in Xamarin.Android projects that target .NET 6 or higher. Please set the DEX compiler to 'd8' in the Visual Studio project property pages or edit the project file in a text editor and set the 'AndroidDexTool' MSBuild property to 'd8'.</source>
<target state="needs-review-translation">Používání kompilátoru DX DEX se v projektech Xamarin.Androidu, které cílí na .NET 5 nebo vyšší, nepodporuje. Nastavte prosím na stránkách vlastností projektu sady Visual Studio kompilátor DEX na d8, nebo upravte soubor projektu v textovém editoru a nastavte vlastnost MSBuildu AndroidDexTool na d8.</target>
<note>The following are literal names and should not be translated: DX, DEX, Xamarin.Android, .NET 6, d8, AndroidDexTool.</note>
</trans-unit>
<trans-unit id="XA1024">
<source>Ignoring configuration file '{0}'. .NET configuration files are not supported in Xamarin.Android projects that target .NET 6 or higher.</source>
<target state="needs-review-translation">Ignoruje se konfigurační soubor {0}. Konfigurační soubory .NET se v projektech Xamarin.Androidu, které cílí na .NET 5 nebo vyšší, nepodporují.</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,15 +475,10 @@ In this message, the term "binding" means a piece of generated code that makes i
{0} - The file name of the library</note>
</trans-unit>
<trans-unit id="XA1023">
<source>Using the DX DEX Compiler is deprecated. Please set the DEX compiler to 'd8' in the Visual Studio project property pages or edit the project file in a text editor and set the 'AndroidDexTool' MSBuild property to 'd8'.</source>
<target state="translated">Die Verwendung des DX DEX-Compiler ist veraltet. Legen Sie den DEX-Compiler in den Visual Studio-Projekteigenschaftenseiten auf "d8" fest, oder bearbeiten Sie die Projektdatei in einem Text-Editor, und legen Sie die MSBuild-Eigenschaft "AndroidDexTool" auf "d8" fest.</target>
<source>Using the DX DEX Compiler is not supported. Please set the DEX compiler to 'd8' in the Visual Studio project property pages or edit the project file in a text editor and set the 'AndroidDexTool' MSBuild property to 'd8'.</source>
<target state="needs-review-translation">Die Verwendung des DX DEX-Compiler ist veraltet. Legen Sie den DEX-Compiler in den Visual Studio-Projekteigenschaftenseiten auf "d8" fest, oder bearbeiten Sie die Projektdatei in einem Text-Editor, und legen Sie die MSBuild-Eigenschaft "AndroidDexTool" auf "d8" fest.</target>
<note>The following are literal names and should not be translated: DX, DEX, d8, AndroidDexTool.</note>
</trans-unit>
<trans-unit id="XA1023_dotnet">
<source>Using the DX DEX Compiler is not supported in Xamarin.Android projects that target .NET 6 or higher. Please set the DEX compiler to 'd8' in the Visual Studio project property pages or edit the project file in a text editor and set the 'AndroidDexTool' MSBuild property to 'd8'.</source>
<target state="needs-review-translation">Die Verwendung des DX DEX-Compilers wird in Xamarin.Android-Projekten für .NET 5 oder höher nicht unterstützt. Legen Sie den DEX-Compiler in den Visual Studio-Projekteigenschaftenseiten auf "d8" fest, oder bearbeiten Sie die Projektdatei in einem Text-Editor, und legen Sie die MSBuild-Eigenschaft "AndroidDexTool" auf "d8" fest.</target>
<note>The following are literal names and should not be translated: DX, DEX, Xamarin.Android, .NET 6, d8, AndroidDexTool.</note>
</trans-unit>
<trans-unit id="XA1024">
<source>Ignoring configuration file '{0}'. .NET configuration files are not supported in Xamarin.Android projects that target .NET 6 or higher.</source>
<target state="needs-review-translation">Die Konfigurationsdatei "{0}" wird ignoriert. .NET-Konfigurationsdateien werden in Xamarin.Android-Projekten für .NET 5 oder höher nicht unterstützt.</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,15 +475,10 @@ In this message, the term "binding" means a piece of generated code that makes i
{0} - The file name of the library</note>
</trans-unit>
<trans-unit id="XA1023">
<source>Using the DX DEX Compiler is deprecated. Please set the DEX compiler to 'd8' in the Visual Studio project property pages or edit the project file in a text editor and set the 'AndroidDexTool' MSBuild property to 'd8'.</source>
<target state="translated">Ya no se admite el uso de ProGuard con el compilador DX DEX. Establezca el compilador DEX en "d8" en las páginas de propiedades del proyecto de Visual Studio o edite el archivo de proyecto en un editor de texto y establezca la propiedad "AndroidLinkTool" de MSBuild en "d8".</target>
<source>Using the DX DEX Compiler is not supported. Please set the DEX compiler to 'd8' in the Visual Studio project property pages or edit the project file in a text editor and set the 'AndroidDexTool' MSBuild property to 'd8'.</source>
<target state="needs-review-translation">Ya no se admite el uso de ProGuard con el compilador DX DEX. Establezca el compilador DEX en "d8" en las páginas de propiedades del proyecto de Visual Studio o edite el archivo de proyecto en un editor de texto y establezca la propiedad "AndroidLinkTool" de MSBuild en "d8".</target>
<note>The following are literal names and should not be translated: DX, DEX, d8, AndroidDexTool.</note>
</trans-unit>
<trans-unit id="XA1023_dotnet">
<source>Using the DX DEX Compiler is not supported in Xamarin.Android projects that target .NET 6 or higher. Please set the DEX compiler to 'd8' in the Visual Studio project property pages or edit the project file in a text editor and set the 'AndroidDexTool' MSBuild property to 'd8'.</source>
<target state="needs-review-translation">No se admite el uso del compilador DX DEX en los proyectos de Xamarin.Android destinados a .NET 5 o versiones posteriores. Establezca el compilador DEX en "d8" en las páginas de propiedades del proyecto de Visual Studio o edite el archivo de proyecto en un editor de texto y establezca la propiedad "AndroidDexTool" de MSBuild en "d8".</target>
<note>The following are literal names and should not be translated: DX, DEX, Xamarin.Android, .NET 6, d8, AndroidDexTool.</note>
</trans-unit>
<trans-unit id="XA1024">
<source>Ignoring configuration file '{0}'. .NET configuration files are not supported in Xamarin.Android projects that target .NET 6 or higher.</source>
<target state="needs-review-translation">Omitiendo el archivo de configuración "{0}". Los archivos de configuración .NET no se admiten en proyectos Xamarin. Android destinados a .NET 5 o versiones posteriores.</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,15 +475,10 @@ In this message, the term "binding" means a piece of generated code that makes i
{0} - The file name of the library</note>
</trans-unit>
<trans-unit id="XA1023">
<source>Using the DX DEX Compiler is deprecated. Please set the DEX compiler to 'd8' in the Visual Studio project property pages or edit the project file in a text editor and set the 'AndroidDexTool' MSBuild property to 'd8'.</source>
<target state="translated">L'utilisation du compilateur DEX DX est dépréciée. Affectez au compilateur DEX la valeur 'd8' dans les pages de propriétés de projet Visual Studio, ou modifiez le fichier projet dans un éditeur de texte, puis affectez la valeur 'd8' à la propriété MSBuild 'AndroidDexTool'.</target>
<source>Using the DX DEX Compiler is not supported. Please set the DEX compiler to 'd8' in the Visual Studio project property pages or edit the project file in a text editor and set the 'AndroidDexTool' MSBuild property to 'd8'.</source>
<target state="needs-review-translation">L'utilisation du compilateur DEX DX est dépréciée. Affectez au compilateur DEX la valeur 'd8' dans les pages de propriétés de projet Visual Studio, ou modifiez le fichier projet dans un éditeur de texte, puis affectez la valeur 'd8' à la propriété MSBuild 'AndroidDexTool'.</target>
<note>The following are literal names and should not be translated: DX, DEX, d8, AndroidDexTool.</note>
</trans-unit>
<trans-unit id="XA1023_dotnet">
<source>Using the DX DEX Compiler is not supported in Xamarin.Android projects that target .NET 6 or higher. Please set the DEX compiler to 'd8' in the Visual Studio project property pages or edit the project file in a text editor and set the 'AndroidDexTool' MSBuild property to 'd8'.</source>
<target state="needs-review-translation">L'utilisation du compilateur DEX DX n'est pas prise en charge dans les projets Xamarin.Android qui ciblent .NET 5 ou une version ultérieure. Affectez au compilateur DEX la valeur 'd8' dans les pages de propriétés de projet Visual Studio, ou modifiez le fichier projet dans un éditeur de texte, puis affectez la valeur 'd8' à la propriété MSBuild 'AndroidDexTool'.</target>
<note>The following are literal names and should not be translated: DX, DEX, Xamarin.Android, .NET 6, d8, AndroidDexTool.</note>
</trans-unit>
<trans-unit id="XA1024">
<source>Ignoring configuration file '{0}'. .NET configuration files are not supported in Xamarin.Android projects that target .NET 6 or higher.</source>
<target state="needs-review-translation">Fichier config '{0}' ignoré. Les fichiers config .NET ne sont pas pris en charge dans les projets Xamarin.Android qui ciblent .NET 5 ou une version ultérieure.</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,15 +475,10 @@ In this message, the term "binding" means a piece of generated code that makes i
{0} - The file name of the library</note>
</trans-unit>
<trans-unit id="XA1023">
<source>Using the DX DEX Compiler is deprecated. Please set the DEX compiler to 'd8' in the Visual Studio project property pages or edit the project file in a text editor and set the 'AndroidDexTool' MSBuild property to 'd8'.</source>
<target state="translated">L'uso del compilatore DEX DX è deprecato. Impostare il compilatore DEX su 'd8' nelle pagine delle proprietà del progetto di Visual Studio o modificare il file di progetto in un editor di testo e impostare la proprietà 'AndroidDexTool' di MSBuild su 'd8'.</target>
<source>Using the DX DEX Compiler is not supported. Please set the DEX compiler to 'd8' in the Visual Studio project property pages or edit the project file in a text editor and set the 'AndroidDexTool' MSBuild property to 'd8'.</source>
<target state="needs-review-translation">L'uso del compilatore DEX DX è deprecato. Impostare il compilatore DEX su 'd8' nelle pagine delle proprietà del progetto di Visual Studio o modificare il file di progetto in un editor di testo e impostare la proprietà 'AndroidDexTool' di MSBuild su 'd8'.</target>
<note>The following are literal names and should not be translated: DX, DEX, d8, AndroidDexTool.</note>
</trans-unit>
<trans-unit id="XA1023_dotnet">
<source>Using the DX DEX Compiler is not supported in Xamarin.Android projects that target .NET 6 or higher. Please set the DEX compiler to 'd8' in the Visual Studio project property pages or edit the project file in a text editor and set the 'AndroidDexTool' MSBuild property to 'd8'.</source>
<target state="needs-review-translation">L'uso del compilatore DEX DX non è supportato in progetti Xamarin.Android destinati a .NET 5 o versione successiva. Impostare il compilatore DEX su 'd8' nelle pagine delle proprietà del progetto di Visual Studio o modificare il file di progetto in un editor di testo e impostare la proprietà 'AndroidDexTool' di MSBuild su 'd8'.</target>
<note>The following are literal names and should not be translated: DX, DEX, Xamarin.Android, .NET 6, d8, AndroidDexTool.</note>
</trans-unit>
<trans-unit id="XA1024">
<source>Ignoring configuration file '{0}'. .NET configuration files are not supported in Xamarin.Android projects that target .NET 6 or higher.</source>
<target state="needs-review-translation">Il file di configurazione '{0}' verrà ignorato. I file di configurazione .NET non sono supportati in progetti Xamarin.Android destinati a .NET 5 o versione successiva.</target>
Expand Down
Loading

0 comments on commit 0181212

Please sign in to comment.