Skip to content

Commit

Permalink
Merge branch 'main' into dev/grendel/blobs-in-lib
Browse files Browse the repository at this point in the history
* main:
  Localized file check-in by OneLocBuild Task (#8652)
  Bump to xamarin/xamarin-android-tools/main@b175674 (#8644)
  [Xamarin.Android.Build.Tasks] remove checks for `$(UsingAndroidNETSdk)` (#8647)
  • Loading branch information
grendello committed Jan 19, 2024
2 parents e6ed1ed + eda5449 commit 01f03a3
Show file tree
Hide file tree
Showing 22 changed files with 84 additions and 115 deletions.
2 changes: 1 addition & 1 deletion external/xamarin-android-tools
Original file line number Diff line number Diff line change
Expand Up @@ -29,32 +29,15 @@ This item group populates the Build Action drop-down in IDEs.
<AvailableItemName Include="ProjectReference" />
<AvailableItemName Include="AndroidManifestOverlay" />
</ItemGroup>
<!-- Legacy, non-binding projects -->
<ItemGroup Condition=" '$(_AndroidIsBindingProject)' != 'true' and '$(UsingAndroidNETSdk)' != 'true' ">
<AvailableItemName Include="AndroidAarLibrary" />
<AvailableItemName Include="AndroidJavaLibrary" />
</ItemGroup>
<!-- Legacy, non-application projects -->
<ItemGroup Condition=" '$(AndroidApplication)' != 'true' and '$(UsingAndroidNETSdk)' != 'true' ">
<AvailableItemName Include="EmbeddedNativeLibrary" />
</ItemGroup>
<!-- Legacy binding projects or .NET 6 -->
<ItemGroup Condition=" '$(_AndroidIsBindingProject)' == 'true' or '$(UsingAndroidNETSdk)' == 'true' ">

<!-- All project types -->
<ItemGroup>
<AvailableItemName Include="TransformFile" />
<AvailableItemName Include="LibraryProjectProperties" />
<AvailableItemName Include="JavaDocIndex" />
<AvailableItemName Include="JavaDocJar" />
<AvailableItemName Include="JavaSourceJar" />
</ItemGroup>
<!-- Legacy binding projects -->
<ItemGroup Condition=" '$(_AndroidIsBindingProject)' == 'true' and '$(UsingAndroidNETSdk)' != 'true' ">
<AvailableItemName Include="EmbeddedJar" />
<AvailableItemName Include="EmbeddedNativeLibrary" />
<AvailableItemName Include="EmbeddedReferenceJar" />
<AvailableItemName Include="InputJar" />
<AvailableItemName Include="ReferenceJar" />
<AvailableItemName Include="LibraryProjectZip" />
</ItemGroup>

<!-- Default item metadata -->
<ItemDefinitionGroup>
Expand All @@ -64,13 +47,13 @@ This item group populates the Build Action drop-down in IDEs.
</AndroidResource>
<AndroidLibrary>
<Bind>true</Bind>
<Pack Condition=" '$(UsingAndroidNETSdk)' == 'true' ">true</Pack>
<Pack>true</Pack>
</AndroidLibrary>
<LibraryProjectZip>
<Pack Condition=" '$(UsingAndroidNETSdk)' == 'true' ">true</Pack>
<Pack>true</Pack>
</LibraryProjectZip>
<AndroidJavaSource>
<Bind Condition=" '$(UsingAndroidNETSdk)' == 'true' ">true</Bind>
<Bind>true</Bind>
</AndroidJavaSource>
<AndroidAarLibrary>
<!-- NOTE: .aar items should skip %(AndroidSkipResourceProcessing) by default -->
Expand All @@ -80,38 +63,26 @@ This item group populates the Build Action drop-down in IDEs.

<!-- Convert @(AndroidLibrary) to the legacy item group names -->
<Target Name="_CategorizeAndroidLibraries">
<!-- Applications, or legacy class libraries -->
<ItemGroup Condition=" '$(AndroidApplication)' == 'true' or ('$(_AndroidIsBindingProject)' != 'true' and '$(UsingAndroidNETSdk)' != 'true') ">
<!-- Applications -->
<ItemGroup Condition=" '$(AndroidApplication)' == 'true' ">
<AndroidAarLibrary Include="@(AndroidLibrary)" Condition=" '%(AndroidLibrary.Extension)' == '.aar' " />
<AndroidJavaLibrary Include="@(AndroidLibrary)" Condition=" '%(AndroidLibrary.Extension)' == '.jar' " />
<InputJar Include="@(AndroidLibrary)" Condition=" '%(AndroidLibrary.Extension)' == '.jar' and '%(AndroidLibrary.Bind)' == 'true' " />
</ItemGroup>
<!-- Any library that is not an app -->
<!-- Class libraries, not an application -->
<ItemGroup Condition=" '$(AndroidApplication)' != 'true' ">
<EmbeddedNativeLibrary Include="@(AndroidNativeLibrary)" />
</ItemGroup>
<!-- Any .NET 6 project -->
<ItemGroup Condition=" '$(UsingAndroidNETSdk)' == 'true' ">
<LibraryProjectZip Include="@(AndroidLibrary)" Condition=" '%(AndroidLibrary.Extension)' == '.aar' and '%(AndroidLibrary.Bind)' == 'true' " />
</ItemGroup>
<!-- .NET 6 application projects -->
<ItemGroup Condition=" '$(AndroidApplication)' == 'true' and '$(UsingAndroidNETSdk)' == 'true' ">
<InputJar Include="@(AndroidLibrary)" Condition=" '%(AndroidLibrary.Extension)' == '.jar' and '%(AndroidLibrary.Bind)' == 'true' " />
</ItemGroup>
<!-- .NET 6 class libraries-->
<ItemGroup Condition=" '$(AndroidApplication)' != 'true' and '$(UsingAndroidNETSdk)' == 'true' ">
<AndroidAarLibrary Include="@(AndroidLibrary)" Condition=" '%(AndroidLibrary.Extension)' == '.aar' and '%(AndroidLibrary.Bind)' != 'true' " />
<AndroidJavaLibrary Include="@(AndroidLibrary)" Condition=" '%(AndroidLibrary.Extension)' == '.jar' and '%(AndroidLibrary.Bind)' != 'true' " />
<EmbeddedJar Include="@(AndroidLibrary)" Condition=" '%(AndroidLibrary.Extension)' == '.jar' and '%(AndroidLibrary.Bind)' == 'true' " />
<!-- .aar files should be copied to $(OutputPath) in .NET 6-->
<!-- .aar files should be copied to $(OutputPath) in .NET 6+ -->
<None Include="@(AndroidLibrary)" Condition=" '%(AndroidLibrary.Extension)' == '.aar' " TfmSpecificPackageFile="%(AndroidLibrary.Pack)" Pack="false" CopyToOutputDirectory="PreserveNewest" Link="%(Filename)%(Extension)" />
<!-- @(LibraryProjectZip) items that are not in @(AndroidLibrary) -->
<None Include="@(LibraryProjectZip)" Exclude="@(AndroidLibrary)" TfmSpecificPackageFile="%(LibraryProjectZip.Pack)" Pack="false" CopyToOutputDirectory="PreserveNewest" Link="%(Filename)%(Extension)" />
</ItemGroup>
<!-- Legacy binding projects -->
<ItemGroup Condition=" '$(_AndroidIsBindingProject)' == 'true' and '$(UsingAndroidNETSdk)' != 'true' ">
<LibraryProjectZip Include="@(AndroidLibrary)" Condition=" '%(AndroidLibrary.Extension)' == '.aar' and '%(AndroidLibrary.Bind)' == 'true' " />
<EmbeddedJar Include="@(AndroidLibrary)" Condition=" '%(AndroidLibrary.Extension)' == '.jar' and '%(AndroidLibrary.Bind)' == 'true' " />
<EmbeddedReferenceJar Include="@(AndroidLibrary)" Condition=" '%(AndroidLibrary.Extension)' == '.jar' and '%(AndroidLibrary.Bind)' != 'true' " />
<!-- All projects -->
<ItemGroup>
<LibraryProjectZip Include="@(AndroidLibrary)" Condition=" '%(AndroidLibrary.Extension)' == '.aar' and '%(AndroidLibrary.Bind)' == 'true' " />
</ItemGroup>
</Target>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ It is shared between "legacy" binding projects and .NET 5 projects.
<GeneratedOutputPath Condition=" '$(GeneratedOutputPath)' == '' ">$(IntermediateOutputPath)generated\</GeneratedOutputPath>
<AndroidJavadocVerbosity Condition=" '$(AndroidJavadocVerbosity)' == '' ">intellisense</AndroidJavadocVerbosity>
<ApiOutputFile Condition=" '$(ApiOutputFile)' == '' ">$(IntermediateOutputPath)api.xml</ApiOutputFile>
<ClassParseToolExe Condition=" '$(UsingAndroidNETSdk)' == 'true' ">class-parse.dll</ClassParseToolExe>
<ClassParseToolExe Condition=" '$(ClassParseToolExe)' == '' ">class-parse.exe</ClassParseToolExe>
<BindingsGeneratorToolExe Condition=" '$(UsingAndroidNETSdk)' == 'true' ">generator.dll</BindingsGeneratorToolExe>
<BindingsGeneratorToolExe Condition=" '$(BindingsGeneratorToolExe)' == '' ">generator.exe</BindingsGeneratorToolExe>
<ClassParseToolExe Condition=" '$(ClassParseToolExe)' == '' ">class-parse.dll</ClassParseToolExe>
<BindingsGeneratorToolExe Condition=" '$(BindingsGeneratorToolExe)' == '' ">generator.dll</BindingsGeneratorToolExe>
<JavadocToMdocToolExe Condition=" '$(JavadocToMdocToolExe)' == '' ">javadoc-to-mdoc.exe</JavadocToMdocToolExe>
<_GeneratorStampFile>$(_AndroidStampDirectory)generator.stamp</_GeneratorStampFile>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
<MonoAndroidAssetsPrefix Condition=" '$(MonoAndroidAssetsPrefix)' == '' ">Assets</MonoAndroidAssetsPrefix>
<AndroidResgenClass Condition=" '$(AndroidResgenClass)' == '' ">Resource</AndroidResgenClass>
<AndroidEnableSGenConcurrent Condition=" '$(AndroidEnableSGenConcurrent)' == '' ">true</AndroidEnableSGenConcurrent>
<AndroidHttpClientHandlerType Condition=" '$(AndroidHttpClientHandlerType)' == '' and '$(UsingAndroidNETSdk)' == 'true' ">Xamarin.Android.Net.AndroidMessageHandler</AndroidHttpClientHandlerType>
<AndroidHttpClientHandlerType Condition=" '$(AndroidHttpClientHandlerType)' == '' and '$(UsingAndroidNETSdk)' != 'true' ">Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>
<AndroidHttpClientHandlerType Condition=" '$(AndroidHttpClientHandlerType)' == '' ">Xamarin.Android.Net.AndroidMessageHandler</AndroidHttpClientHandlerType>
<AndroidGenerateResourceDesigner Condition=" '$(AndroidGenerateResourceDesigner)' == '' ">true</AndroidGenerateResourceDesigner>
<AndroidUseDesignerAssembly Condition=" '$(AndroidUseDesignerAssembly)' == '' ">true</AndroidUseDesignerAssembly>
<AndroidUseIntermediateDesignerFile Condition=" '$(AndroidUseDesignerAssembly)' == 'True' ">false</AndroidUseIntermediateDesignerFile>
Expand Down
4 changes: 4 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/Resources.cs.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1006,4 +1006,8 @@ Pokud chcete pro sestavení z příkazového řádku použít vlastní cestu JDK
{0} - The deprecated MSBuild property name
{1} - The numeric version of .NET</comment>
</data>
<data name="XA1039" xml:space="preserve">
<value>The Android Support libraries are not supported in .NET 9 and later, please migrate to AndroidX. See https://aka.ms/xamarin/androidx for more details.</value>
<comment>The following are literal names and should not be translated: Android Support, AndroidX, .NET.</comment>
</data>
</root>
4 changes: 4 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/Resources.de.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1006,4 +1006,8 @@ Um einen benutzerdefinierten JDK-Pfad für einen Befehlszeilenbuild zu verwenden
{0} - The deprecated MSBuild property name
{1} - The numeric version of .NET</comment>
</data>
<data name="XA1039" xml:space="preserve">
<value>The Android Support libraries are not supported in .NET 9 and later, please migrate to AndroidX. See https://aka.ms/xamarin/androidx for more details.</value>
<comment>The following are literal names and should not be translated: Android Support, AndroidX, .NET.</comment>
</data>
</root>
4 changes: 4 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/Resources.es.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1006,4 +1006,8 @@ Para usar una ruta de acceso de JDK personalizada para una compilación de líne
{0} - The deprecated MSBuild property name
{1} - The numeric version of .NET</comment>
</data>
<data name="XA1039" xml:space="preserve">
<value>The Android Support libraries are not supported in .NET 9 and later, please migrate to AndroidX. See https://aka.ms/xamarin/androidx for more details.</value>
<comment>The following are literal names and should not be translated: Android Support, AndroidX, .NET.</comment>
</data>
</root>
4 changes: 4 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/Resources.fr.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1006,4 +1006,8 @@ Pour utiliser un chemin JDK personnalisé pour une build de ligne de commande, d
{0} - The deprecated MSBuild property name
{1} - The numeric version of .NET</comment>
</data>
<data name="XA1039" xml:space="preserve">
<value>The Android Support libraries are not supported in .NET 9 and later, please migrate to AndroidX. See https://aka.ms/xamarin/androidx for more details.</value>
<comment>The following are literal names and should not be translated: Android Support, AndroidX, .NET.</comment>
</data>
</root>
4 changes: 4 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/Resources.it.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1006,4 +1006,8 @@ Per usare un percorso JDK personalizzato per una compilazione della riga di coma
{0} - The deprecated MSBuild property name
{1} - The numeric version of .NET</comment>
</data>
<data name="XA1039" xml:space="preserve">
<value>The Android Support libraries are not supported in .NET 9 and later, please migrate to AndroidX. See https://aka.ms/xamarin/androidx for more details.</value>
<comment>The following are literal names and should not be translated: Android Support, AndroidX, .NET.</comment>
</data>
</root>
4 changes: 4 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/Resources.ja.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1007,4 +1007,8 @@ In this message, the term "handheld app" means "app for handheld devices."
{0} - The deprecated MSBuild property name
{1} - The numeric version of .NET</comment>
</data>
<data name="XA1039" xml:space="preserve">
<value>The Android Support libraries are not supported in .NET 9 and later, please migrate to AndroidX. See https://aka.ms/xamarin/androidx for more details.</value>
<comment>The following are literal names and should not be translated: Android Support, AndroidX, .NET.</comment>
</data>
</root>
4 changes: 4 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/Resources.ko.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1006,4 +1006,8 @@ In this message, the term "handheld app" means "app for handheld devices."
{0} - The deprecated MSBuild property name
{1} - The numeric version of .NET</comment>
</data>
<data name="XA1039" xml:space="preserve">
<value>The Android Support libraries are not supported in .NET 9 and later, please migrate to AndroidX. See https://aka.ms/xamarin/androidx for more details.</value>
<comment>The following are literal names and should not be translated: Android Support, AndroidX, .NET.</comment>
</data>
</root>
4 changes: 4 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/Resources.pl.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1006,4 +1006,8 @@ Aby użyć niestandardowej ścieżki zestawu JDK dla kompilacji wiersza poleceni
{0} - The deprecated MSBuild property name
{1} - The numeric version of .NET</comment>
</data>
<data name="XA1039" xml:space="preserve">
<value>The Android Support libraries are not supported in .NET 9 and later, please migrate to AndroidX. See https://aka.ms/xamarin/androidx for more details.</value>
<comment>The following are literal names and should not be translated: Android Support, AndroidX, .NET.</comment>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -1006,4 +1006,8 @@ Para usar um caminho JDK personalizado para um build de linha de comando, defina
{0} - The deprecated MSBuild property name
{1} - The numeric version of .NET</comment>
</data>
<data name="XA1039" xml:space="preserve">
<value>The Android Support libraries are not supported in .NET 9 and later, please migrate to AndroidX. See https://aka.ms/xamarin/androidx for more details.</value>
<comment>The following are literal names and should not be translated: Android Support, AndroidX, .NET.</comment>
</data>
</root>
4 changes: 4 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/Resources.ru.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1006,4 +1006,8 @@ In this message, the term "handheld app" means "app for handheld devices."
{0} - The deprecated MSBuild property name
{1} - The numeric version of .NET</comment>
</data>
<data name="XA1039" xml:space="preserve">
<value>The Android Support libraries are not supported in .NET 9 and later, please migrate to AndroidX. See https://aka.ms/xamarin/androidx for more details.</value>
<comment>The following are literal names and should not be translated: Android Support, AndroidX, .NET.</comment>
</data>
</root>
4 changes: 4 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/Resources.tr.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1006,4 +1006,8 @@ Bir komut satırı derlemesi için özel bir SDK yolu kullanmak için 'JavaSdkDi
{0} - The deprecated MSBuild property name
{1} - The numeric version of .NET</comment>
</data>
<data name="XA1039" xml:space="preserve">
<value>The Android Support libraries are not supported in .NET 9 and later, please migrate to AndroidX. See https://aka.ms/xamarin/androidx for more details.</value>
<comment>The following are literal names and should not be translated: Android Support, AndroidX, .NET.</comment>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -1006,4 +1006,8 @@ In this message, the term "handheld app" means "app for handheld devices."
{0} - The deprecated MSBuild property name
{1} - The numeric version of .NET</comment>
</data>
<data name="XA1039" xml:space="preserve">
<value>The Android Support libraries are not supported in .NET 9 and later, please migrate to AndroidX. See https://aka.ms/xamarin/androidx for more details.</value>
<comment>The following are literal names and should not be translated: Android Support, AndroidX, .NET.</comment>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -1006,4 +1006,8 @@ In this message, the term "handheld app" means "app for handheld devices."
{0} - The deprecated MSBuild property name
{1} - The numeric version of .NET</comment>
</data>
<data name="XA1039" xml:space="preserve">
<value>The Android Support libraries are not supported in .NET 9 and later, please migrate to AndroidX. See https://aka.ms/xamarin/androidx for more details.</value>
<comment>The following are literal names and should not be translated: Android Support, AndroidX, .NET.</comment>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ public class GeneratePackageManagerJava : AndroidTask
public string TlsProvider { get; set; }
public string AndroidSequencePointsMode { get; set; }
public bool EnableSGenConcurrent { get; set; }
public bool UsingAndroidNETSdk { get; set; }

[Output]
public string BuildId { get; set; }
Expand Down Expand Up @@ -177,7 +176,7 @@ void AddEnvironment ()
BrokenExceptionTransitions = false,
UsesAssemblyPreload = EnablePreloadAssembliesDefault,
};
environmentParser.Parse (Environments, sequencePointsMode, UsingAndroidNETSdk, Log);
environmentParser.Parse (Environments, sequencePointsMode, Log);

foreach (string line in environmentParser.EnvironmentVariableLines) {
AddEnvironmentVariableLine (line);
Expand All @@ -201,13 +200,6 @@ void AddEnvironment ()
AddEnvironmentVariable ("XA_HTTP_CLIENT_HANDLER_TYPE", HttpClientHandlerType.Trim ());
}

if (!UsingAndroidNETSdk && !environmentParser.HaveTlsProvider) {
if (TlsProvider == null)
AddEnvironmentVariable (defaultTlsProvider[0], defaultTlsProvider[1]);
else
AddEnvironmentVariable ("XA_TLS_PROVIDER", TlsProvider.Trim ());
}

if (!environmentParser.HaveMonoGCParams) {
if (EnableSGenConcurrent)
AddEnvironmentVariable ("MONO_GC_PARAMS", "major=marksweep-conc");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public bool AreBrokenExceptionTransitionsEnabled (ITaskItem[] environments)
return false;
}

public void Parse (ITaskItem[] environments, SequencePointsMode sequencePointsMode, bool usingAndroidNETSdk, TaskLoggingHelper log)
public void Parse (ITaskItem[] environments, SequencePointsMode sequencePointsMode, TaskLoggingHelper log)
{
foreach (ITaskItem env in environments ?? Array.Empty<ITaskItem> ()) {
foreach (string line in File.ReadLines (env.ItemSpec)) {
Expand All @@ -56,9 +56,6 @@ public void Parse (ITaskItem[] environments, SequencePointsMode sequencePointsMo
if (lineToWrite.StartsWith ("XA_HTTP_CLIENT_HANDLER_TYPE=", StringComparison.Ordinal))
HaveHttpMessageHandler = true;

if (!usingAndroidNETSdk && lineToWrite.StartsWith ("XA_TLS_PROVIDER=", StringComparison.Ordinal))
HaveTlsProvider = true;

if (lineToWrite.StartsWith ("mono.enable_assembly_preload=", StringComparison.Ordinal)) {
int idx = lineToWrite.IndexOf ('=');
uint val;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<!-- Android Sdk Tool versions are sourced from this file. This is maintained in the xamarin-android-tools repo. -->
<Import Project="$(MSBuildThisFileDirectory)\Xamarin.Android.Tools.Versions.props" />
<PropertyGroup>
<XamarinAndroidVersion Condition=" '$(UsingAndroidNETSdk)' != 'true' ">@PACKAGE_VERSION@-@PACKAGE_VERSION_BUILD@</XamarinAndroidVersion>
<_JavaInteropReferences>Java.Interop;System.Runtime</_JavaInteropReferences>
<Debugger Condition=" '$(Debugger)' == '' ">Xamarin</Debugger>
<DependsOnSystemRuntime Condition=" '$(DependsOnSystemRuntime)' == '' ">true</DependsOnSystemRuntime>
Expand Down
Loading

0 comments on commit 01f03a3

Please sign in to comment.