From 3de55fade404c7c6571c23b623645f3beb0bd04e Mon Sep 17 00:00:00 2001 From: VS MobileTools Engineering Service 2 Date: Sun, 26 Feb 2023 12:24:22 -0500 Subject: [PATCH 01/22] Localized file check-in by OneLocBuild (#7827) Context: https://aka.ms/onelocbuild Context: https://aka.ms/AllAboutLoc Build definition ID 17928: Build ID 7384592 --- src/Xamarin.Android.Build.Tasks/Properties/Resources.cs.resx | 2 +- src/Xamarin.Android.Build.Tasks/Properties/Resources.de.resx | 2 +- src/Xamarin.Android.Build.Tasks/Properties/Resources.es.resx | 2 +- src/Xamarin.Android.Build.Tasks/Properties/Resources.fr.resx | 2 +- src/Xamarin.Android.Build.Tasks/Properties/Resources.it.resx | 2 +- src/Xamarin.Android.Build.Tasks/Properties/Resources.ja.resx | 2 +- src/Xamarin.Android.Build.Tasks/Properties/Resources.ko.resx | 2 +- src/Xamarin.Android.Build.Tasks/Properties/Resources.pl.resx | 2 +- src/Xamarin.Android.Build.Tasks/Properties/Resources.pt-BR.resx | 2 +- src/Xamarin.Android.Build.Tasks/Properties/Resources.ru.resx | 2 +- src/Xamarin.Android.Build.Tasks/Properties/Resources.tr.resx | 2 +- .../Properties/Resources.zh-Hans.resx | 2 +- .../Properties/Resources.zh-Hant.resx | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.cs.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.cs.resx index 085003f4259..8d44a930d84 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.cs.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.cs.resx @@ -531,7 +531,7 @@ Změňte hodnotu na název typu kvalifikovaného sestavení, který dědí z: {1 {0} - The assembly name - This is probably caused by the project exceeding the Windows maximum path length limitation. See https://learn.microsoft.com/xamarin/android/errors-and-warnings/apt2264 for details. + To je pravděpodobně způsobeno tím, že projekt překračuje omezení maximální délky cesty systému Windows. Podrobnosti najdete v https://learn.microsoft.com/xamarin/android/errors-and-warnings/apt2264. The following are literal names and should not be translated: diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.de.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.de.resx index 05b7ea6710e..e6fba0d9357 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.de.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.de.resx @@ -531,7 +531,7 @@ Bitte ändern Sie den Wert in einen Assembly-basierten Typnamen, der von „{1} {0} - The assembly name - This is probably caused by the project exceeding the Windows maximum path length limitation. See https://learn.microsoft.com/xamarin/android/errors-and-warnings/apt2264 for details. + Dies ist wahrscheinlich darauf zurückzuführen, dass das Projekt die Beschränkung der maximalen Pfadlänge von Windows überschreitet. Weitere Informationen finden Sie unter https://learn.microsoft.com/xamarin/android/errors-and-warnings/apt2264. The following are literal names and should not be translated: diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.es.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.es.resx index 96419cf7e89..d8bf1e7ac06 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.es.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.es.resx @@ -531,7 +531,7 @@ Cambie el valor a un nombre de tipo de ensamblado que herede de "{1}" o quite la {0} - The assembly name - This is probably caused by the project exceeding the Windows maximum path length limitation. See https://learn.microsoft.com/xamarin/android/errors-and-warnings/apt2264 for details. + Esto probablemente se debe a que el proyecto supera la limitación de longitud máxima de la ruta de acceso de Windows. Consulte https://learn.microsoft.com/xamarin/android/errors-and-warnings/apt2264 para obtener más información. The following are literal names and should not be translated: diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.fr.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.fr.resx index 0323d83226c..29f009959e9 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.fr.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.fr.resx @@ -531,7 +531,7 @@ Veuillez remplacer la valeur par un nom de type qualifié par l’assembly qui h {0} - The assembly name - This is probably caused by the project exceeding the Windows maximum path length limitation. See https://learn.microsoft.com/xamarin/android/errors-and-warnings/apt2264 for details. + Cela est probablement dû au fait que le projet dépasse la limite de longueur maximale du chemin d’accès Windows. Pour plus d’informations, consultez https://learn.microsoft.com/xamarin/android/errors-and-warnings/apt2264. The following are literal names and should not be translated: diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.it.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.it.resx index 71bc6b5dbd2..ea308e8cacf 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.it.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.it.resx @@ -531,7 +531,7 @@ Modificare il valore in un nome di tipo con qualifica assembly che eredita da '{ {0} - The assembly name - This is probably caused by the project exceeding the Windows maximum path length limitation. See https://learn.microsoft.com/xamarin/android/errors-and-warnings/apt2264 for details. + È possibile che il progetto abbia superato la limitazione della lunghezza massima del percorso di Windows. Per i dettagli, vedere https://learn.microsoft.com/xamarin/android/errors-and-warnings/apt2264. The following are literal names and should not be translated: diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.ja.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.ja.resx index 21b83706972..193acff865b 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.ja.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.ja.resx @@ -531,7 +531,7 @@ In this message, the term "binding" means a piece of generated code that makes i {0} - The assembly name - This is probably caused by the project exceeding the Windows maximum path length limitation. See https://learn.microsoft.com/xamarin/android/errors-and-warnings/apt2264 for details. + これは、プロジェクトが Windows のパスの最大の長さの制限を超えたことが原因の可能性があります。詳細については、https://learn.microsoft.com/xamarin/android/errors-and-warnings/apt2264 を参照してください。 The following are literal names and should not be translated: diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.ko.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.ko.resx index b9d9d43e6dc..281f217c284 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.ko.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.ko.resx @@ -531,7 +531,7 @@ In this message, the term "binding" means a piece of generated code that makes i {0} - The assembly name - This is probably caused by the project exceeding the Windows maximum path length limitation. See https://learn.microsoft.com/xamarin/android/errors-and-warnings/apt2264 for details. + 프로젝트가 Windows 최대 경로 길이 제한을 초과하여 이러한 상황이 발생했을 수 있습니다. 자세한 내용은 https://learn.microsoft.com/xamarin/android/errors-and-warnings/apt2264를 참조하세요. The following are literal names and should not be translated: diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.pl.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.pl.resx index f72c0bea82f..a2952077e45 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.pl.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.pl.resx @@ -531,7 +531,7 @@ Zmień wartość na nazwę typu kwalifikowalnego zestawu, która dziedziczy po {0} - The assembly name - This is probably caused by the project exceeding the Windows maximum path length limitation. See https://learn.microsoft.com/xamarin/android/errors-and-warnings/apt2264 for details. + Jest to prawdopodobnie spowodowane przez projekt przekraczający ograniczenie maksymalnej długości ścieżki systemu Windows. Aby uzyskać szczegółowe informacje, zobacz https://learn.microsoft.com/xamarin/android/errors-and-warnings/apt2264. The following are literal names and should not be translated: diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.pt-BR.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.pt-BR.resx index 0ca7ffd3f59..b08ac3ff3bf 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.pt-BR.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.pt-BR.resx @@ -531,7 +531,7 @@ Altere o valor para um nome de tipo qualificado por assembly que herda de "{1}" {0} - The assembly name - This is probably caused by the project exceeding the Windows maximum path length limitation. See https://learn.microsoft.com/xamarin/android/errors-and-warnings/apt2264 for details. + Isso provavelmente ocorreu porque o projeto excedeu a limitação de comprimento máximo do caminho do Windows. Consulte https://learn.microsoft.com/xamarin/android/errors-and-warnings/apt2264 para obter detalhes. The following are literal names and should not be translated: diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.ru.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.ru.resx index 5a50ce541bf..520db7fa520 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.ru.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.ru.resx @@ -531,7 +531,7 @@ In this message, the term "binding" means a piece of generated code that makes i {0} - The assembly name - This is probably caused by the project exceeding the Windows maximum path length limitation. See https://learn.microsoft.com/xamarin/android/errors-and-warnings/apt2264 for details. + Возможно, для этого проекта превышена максимальная длина пути в Windows. См. https://learn.microsoft.com/xamarin/android/errors-and-warnings/apt2264. The following are literal names and should not be translated: diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.tr.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.tr.resx index 62aa60a13bf..420735cefdc 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.tr.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.tr.resx @@ -531,7 +531,7 @@ Lütfen değeri '{1}' türünden devralan derlemeye uygun bir tür adına dönü {0} - The assembly name - This is probably caused by the project exceeding the Windows maximum path length limitation. See https://learn.microsoft.com/xamarin/android/errors-and-warnings/apt2264 for details. + Bunun nedeni, projenin Windows yol uzunluğu üst sınırını aşması olabilir. Ayrıntılar için bkz. https://learn.microsoft.com/xamarin/android/errors-and-warnings/apt2264. The following are literal names and should not be translated: diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.zh-Hans.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.zh-Hans.resx index 962e3e76d71..4d30aab35a2 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.zh-Hans.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.zh-Hans.resx @@ -531,7 +531,7 @@ In this message, the term "binding" means a piece of generated code that makes i {0} - The assembly name - This is probably caused by the project exceeding the Windows maximum path length limitation. See https://learn.microsoft.com/xamarin/android/errors-and-warnings/apt2264 for details. + 这可能是由超出 Windows 最大路径长度限制的项目引起的。有关详细信息,请参阅 https://learn.microsoft.com/xamarin/android/errors-and-warnings/apt2264。 The following are literal names and should not be translated: diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.zh-Hant.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.zh-Hant.resx index 19eb63a25ab..44d27e2135c 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.zh-Hant.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.zh-Hant.resx @@ -531,7 +531,7 @@ In this message, the term "binding" means a piece of generated code that makes i {0} - The assembly name - This is probably caused by the project exceeding the Windows maximum path length limitation. See https://learn.microsoft.com/xamarin/android/errors-and-warnings/apt2264 for details. + 這可能是因為專案超過 Windows 最大路徑長度限制所造成。如需詳細資料,請參閱https://learn.microsoft.com/xamarin/android/errors-and-warnings/apt2264。 The following are literal names and should not be translated: From 977de6f9713ec98ba3f560d2abd091d1ed69aef2 Mon Sep 17 00:00:00 2001 From: Marek Habersack Date: Mon, 27 Feb 2023 19:16:48 +0100 Subject: [PATCH 02/22] [monodroid] Update p/invoke symbol names from net8 alpha1 (#7829) Bring our P/Invoke dispatch tables up to date with .NET 8. --- src/monodroid/jni/generate-pinvoke-tables.cc | 42 ++++++++--- src/monodroid/jni/pinvoke-tables.include | 74 +++++++++++++++----- 2 files changed, 87 insertions(+), 29 deletions(-) diff --git a/src/monodroid/jni/generate-pinvoke-tables.cc b/src/monodroid/jni/generate-pinvoke-tables.cc index ff9049105c0..85ab21c1d8f 100644 --- a/src/monodroid/jni/generate-pinvoke-tables.cc +++ b/src/monodroid/jni/generate-pinvoke-tables.cc @@ -10,6 +10,10 @@ // // If a new library is added, please remember to generate a hash of its name and update pinvoke-override-api.cc // +// To get the list of exported native symbols for a library, you can run the following command on Unix: +// +// for s in $(llvm-nm -DUj [LIBRARY] | sort); do echo "\"$s\","; done +// #include #include #include @@ -308,6 +312,7 @@ const std::vector dotnet_pinvoke_names = { "CompressionNative_InflateReset", // libSystem.Native.so + "SystemNative_Abort", "SystemNative_Accept", "SystemNative_Access", "SystemNative_AlignedAlloc", @@ -315,11 +320,11 @@ const std::vector dotnet_pinvoke_names = { "SystemNative_AlignedRealloc", "SystemNative_Bind", "SystemNative_Calloc", + "SystemNative_CanGetHiddenFlag", "SystemNative_ChDir", "SystemNative_ChMod", "SystemNative_Close", "SystemNative_CloseDir", - "SystemNative_CloseNetworkChangeListenerSocket", "SystemNative_CloseSocketEventPort", "SystemNative_ConfigureTerminalForChildProcess", "SystemNative_Connect", @@ -330,6 +335,7 @@ const std::vector dotnet_pinvoke_names = { "SystemNative_CreateNetworkChangeListenerSocket", "SystemNative_CreateSocketEventBuffer", "SystemNative_CreateSocketEventPort", + "SystemNative_CreateThread", "SystemNative_DisablePosixSignalHandling", "SystemNative_Disconnect", "SystemNative_DrainAutoreleasePool", @@ -337,6 +343,9 @@ const std::vector dotnet_pinvoke_names = { "SystemNative_EnablePosixSignalHandling", "SystemNative_EnumerateGatewayAddressesForInterface", "SystemNative_EnumerateInterfaceAddresses", + "SystemNative_Exit", + "SystemNative_FAllocate", + "SystemNative_FChflags", "SystemNative_FChMod", "SystemNative_FcntlCanGetSetPipeSz", "SystemNative_FcntlGetFD", @@ -348,34 +357,42 @@ const std::vector dotnet_pinvoke_names = { "SystemNative_FLock", "SystemNative_ForkAndExecProcess", "SystemNative_Free", + "SystemNative_FreeEnviron", "SystemNative_FreeHostEntry", + "SystemNative_FreeLibrary", "SystemNative_FreeSocketEventBuffer", "SystemNative_FStat", "SystemNative_FSync", "SystemNative_FTruncate", + "SystemNative_FUTimens", "SystemNative_GetActiveTcpConnectionInfos", "SystemNative_GetActiveUdpListeners", "SystemNative_GetAddressFamily", "SystemNative_GetAllMountPoints", "SystemNative_GetAtOutOfBandMark", + "SystemNative_GetBootTimeTicks", "SystemNative_GetBytesAvailable", "SystemNative_GetControlCharacters", "SystemNative_GetControlMessageBufferSize", "SystemNative_GetCpuUtilization", "SystemNative_GetCryptographicallySecureRandomBytes", "SystemNative_GetCwd", + "SystemNative_GetDefaultSearchOrderPseudoHandle", "SystemNative_GetDefaultTimeZone", + "SystemNative_GetDeviceIdentifiers", "SystemNative_GetDomainName", "SystemNative_GetDomainSocketSizes", "SystemNative_GetEGid", - "SystemNative_GetEUid", "SystemNative_GetEnv", + "SystemNative_GetEnviron", "SystemNative_GetErrNo", "SystemNative_GetEstimatedTcpConnectionCount", "SystemNative_GetEstimatedUdpListenerCount", + "SystemNative_GetEUid", "SystemNative_GetFileSystemType", "SystemNative_GetFormatInfoForMountPoint", "SystemNative_GetGroupList", + "SystemNative_GetGroupName", "SystemNative_GetGroups", "SystemNative_GetHostEntryForName", "SystemNative_GetHostName", @@ -388,11 +405,11 @@ const std::vector dotnet_pinvoke_names = { "SystemNative_GetIPv6Address", "SystemNative_GetIPv6MulticastOption", "SystemNative_GetLingerOption", + "SystemNative_GetLoadLibraryError", "SystemNative_GetMaximumAddressSize", "SystemNative_GetNameInfo", "SystemNative_GetNativeIPInterfaceStatistics", "SystemNative_GetNetworkInterfaces", - "SystemNative_GetNodeName", "SystemNative_GetNonCryptographicallySecureRandomBytes", "SystemNative_GetNumRoutes", "SystemNative_GetOSArchitecture", @@ -403,7 +420,7 @@ const std::vector dotnet_pinvoke_names = { "SystemNative_GetPlatformSignalNumber", "SystemNative_GetPort", "SystemNative_GetPriority", - "SystemNative_GetProcessArchitecture", + "SystemNative_GetProcAddress", "SystemNative_GetProcessPath", "SystemNative_GetPwNamR", "SystemNative_GetPwUidR", @@ -421,11 +438,8 @@ const std::vector dotnet_pinvoke_names = { "SystemNative_GetTcpGlobalStatistics", "SystemNative_GetTimestamp", "SystemNative_GetUdpGlobalStatistics", - "SystemNative_GetUid", - "SystemNative_GetUnixName", "SystemNative_GetUnixRelease", "SystemNative_GetUnixVersion", - "SystemNative_GetUsableSize", "SystemNative_GetWindowSize", "SystemNative_HandleNonCanceledPosixSignal", "SystemNative_InitializeConsoleBeforeRead", @@ -441,8 +455,10 @@ const std::vector dotnet_pinvoke_names = { "SystemNative_LChflagsCanSetHiddenFlag", "SystemNative_Link", "SystemNative_Listen", + "SystemNative_LoadLibrary", "SystemNative_LockFileRegion", "SystemNative_Log", + "SystemNative_LogError", "SystemNative_LowLevelMonitor_Acquire", "SystemNative_LowLevelMonitor_Create", "SystemNative_LowLevelMonitor_Destroy", @@ -455,8 +471,10 @@ const std::vector dotnet_pinvoke_names = { "SystemNative_MAdvise", "SystemNative_Malloc", "SystemNative_MapTcpState", - "SystemNative_MemSet", "SystemNative_MkDir", + "SystemNative_MkdTemp", + "SystemNative_MkFifo", + "SystemNative_MkNod", "SystemNative_MksTemps", "SystemNative_MMap", "SystemNative_MSync", @@ -468,7 +486,6 @@ const std::vector dotnet_pinvoke_names = { "SystemNative_PlatformSupportsDualModeIPv4PacketInfo", "SystemNative_Poll", "SystemNative_PosixFAdvise", - "SystemNative_PosixFAllocate", "SystemNative_PRead", "SystemNative_PReadV", "SystemNative_PWrite", @@ -487,8 +504,10 @@ const std::vector dotnet_pinvoke_names = { "SystemNative_Rename", "SystemNative_RmDir", "SystemNative_SchedGetAffinity", + "SystemNative_SchedGetCpu", "SystemNative_SchedSetAffinity", "SystemNative_SearchPath", + "SystemNative_SearchPath_TempDirectory", "SystemNative_Send", "SystemNative_SendFile", "SystemNative_SendMessage", @@ -512,6 +531,7 @@ const std::vector dotnet_pinvoke_names = { "SystemNative_SetSignalForBreak", "SystemNative_SetSockOpt", "SystemNative_SetTerminalInvalidationHandler", + "SystemNative_SetWindowSize", "SystemNative_ShmOpen", "SystemNative_ShmUnlink", "SystemNative_Shutdown", @@ -536,6 +556,7 @@ const std::vector dotnet_pinvoke_names = { "SystemNative_Write", // libSystem.Security.Cryptography.Native.Android.so + "AndroidCryptoNative_AeadCipherFinalEx", "AndroidCryptoNative_Aes128Cbc", "AndroidCryptoNative_Aes128Ccm", "AndroidCryptoNative_Aes128Cfb128", @@ -601,6 +622,7 @@ const std::vector dotnet_pinvoke_names = { "AndroidCryptoNative_GetECKeyParameters", "AndroidCryptoNative_GetRsaParameters", "AndroidCryptoNative_NewGlobalReference", + "AndroidCryptoNative_RegisterRemoteCertificateValidationCallback", "AndroidCryptoNative_RsaCreate", "AndroidCryptoNative_RsaDestroy", "AndroidCryptoNative_RsaGenerateKeyEx", @@ -621,6 +643,7 @@ const std::vector dotnet_pinvoke_names = { "AndroidCryptoNative_SSLStreamGetProtocol", "AndroidCryptoNative_SSLStreamHandshake", "AndroidCryptoNative_SSLStreamInitialize", + "AndroidCryptoNative_SSLStreamIsLocalCertificateUsed", "AndroidCryptoNative_SSLStreamRead", "AndroidCryptoNative_SSLStreamRelease", "AndroidCryptoNative_SSLStreamRequestClientAuthentication", @@ -639,7 +662,6 @@ const std::vector dotnet_pinvoke_names = { "AndroidCryptoNative_X509ChainGetErrorCount", "AndroidCryptoNative_X509ChainGetErrors", "AndroidCryptoNative_X509ChainSetCustomTrustStore", - "AndroidCryptoNative_X509ChainSupportsRevocationOptions", "AndroidCryptoNative_X509ChainValidate", "AndroidCryptoNative_X509Decode", "AndroidCryptoNative_X509DecodeCollection", diff --git a/src/monodroid/jni/pinvoke-tables.include b/src/monodroid/jni/pinvoke-tables.include index 8e5372c7529..37c91a53f3f 100644 --- a/src/monodroid/jni/pinvoke-tables.include +++ b/src/monodroid/jni/pinvoke-tables.include @@ -250,11 +250,12 @@ static PinvokeEntry internal_pinvokes[] = { }; //64-bit DotNet p/invoke table static PinvokeEntry dotnet_pinvokes[] = { + {0xa9f93429c5e2b5, "AndroidCryptoNative_SSLStreamIsLocalCertificateUsed", nullptr}, {0xba29497af60305, "BrotliDecoderDecompressStream", nullptr}, - {0x2ed58245e72af41, "AndroidCryptoNative_X509ChainSupportsRevocationOptions", nullptr}, {0x336cd3c7fb41c6a, "SystemNative_GetSocketType", nullptr}, {0x37ea669c69089ff, "SystemNative_InitializeConsoleBeforeRead", nullptr}, {0x3a940bbaefedf03, "AndroidCryptoNative_CipherUpdate", nullptr}, + {0x4311d1d324b2057, "SystemNative_GetProcAddress", nullptr}, {0x79ca1869d224820, "CryptoNative_EvpDigestCurrent", nullptr}, {0x82500327210516d, "CryptoNative_EvpMdCtxDestroy", nullptr}, {0x837e8cd30e29700, "SystemNative_GetSockOpt", nullptr}, @@ -289,6 +290,7 @@ static PinvokeEntry dotnet_pinvokes[] = { {0x1b70abf2b91d38a6, "SystemNative_FcntlGetFD", nullptr}, {0x1bd174c8daa88fd4, "SystemNative_ConvertErrorPlatformToPal", nullptr}, {0x1db7c79f266b60ff, "CryptoNative_EvpMdSize", nullptr}, + {0x1dd5f36ff8719418, "SystemNative_FAllocate", nullptr}, {0x1e3389dcfd925f47, "AndroidCryptoNative_Aes128Ecb", nullptr}, {0x1ee1f9e3aa35b6fe, "SystemNative_GetPwUidR", nullptr}, {0x1ef41ad6d9f0b254, "CryptoNative_HmacOneShot", nullptr}, @@ -305,12 +307,14 @@ static PinvokeEntry dotnet_pinvokes[] = { {0x23a16c2067c951a4, "AndroidCryptoNative_BigNumToBinary", nullptr}, {0x242ecded1219ff32, "SystemNative_GetOSArchitecture", nullptr}, {0x242fce87df6dcd96, "AndroidCryptoNative_Aes128Ccm", nullptr}, + {0x2472cfc68a2aa833, "SystemNative_GetEnviron", nullptr}, {0x24d49c833ac8f243, "CryptoNative_EvpSha384", nullptr}, {0x25021f1c66d9ba06, "AndroidCryptoNative_ChaCha20Poly1305", nullptr}, {0x258f314ff5085c28, "AndroidCryptoNative_SSLStreamSetTargetHost", nullptr}, {0x26522342ecf78912, "AndroidCryptoNative_X509ChainGetErrors", nullptr}, {0x2674b72588b740f8, "AndroidCryptoNative_DsaKeyCreateByExplicitParameters", nullptr}, {0x27e9a8d1500d1877, "SystemNative_GetProcessPath", nullptr}, + {0x2a141d3db263b7e8, "SystemNative_MkdTemp", nullptr}, {0x2a36bfbc49143c9f, "SystemNative_Calloc", nullptr}, {0x2b6d983eb884545f, "SystemNative_GetControlCharacters", nullptr}, {0x2f1e9ce68e99a367, "SystemNative_GetAtOutOfBandMark", nullptr}, @@ -321,6 +325,7 @@ static PinvokeEntry dotnet_pinvokes[] = { {0x30f009a9cc61fecd, "AndroidCryptoNative_X509ExportPkcs7", nullptr}, {0x317764b222cff251, "CryptoNative_HmacDestroy", nullptr}, {0x3230c819526d7ffb, "AndroidCryptoNative_NewGlobalReference", nullptr}, + {0x346fa00d618dad31, "AndroidCryptoNative_RegisterRemoteCertificateValidationCallback", nullptr}, {0x34bb308ca52d130c, "SystemNative_SetTerminalInvalidationHandler", nullptr}, {0x35bd95dce64cdafa, "SystemNative_CreateAutoreleasePool", nullptr}, {0x35cc10818712e3d9, "AndroidCryptoNative_X509ChainDestroyContext", nullptr}, @@ -330,6 +335,7 @@ static PinvokeEntry dotnet_pinvokes[] = { {0x3768a2c7a4a8472c, "SystemNative_GetGroupList", nullptr}, {0x386677516cf71915, "AndroidCryptoNative_CipherSetKeyAndIV", nullptr}, {0x38a8dd751094700a, "SystemNative_ReadProcessStatusInfo", nullptr}, + {0x3903d6df930e5cba, "SystemNative_SchedGetCpu", nullptr}, {0x39cbc53a5e7a2296, "SystemNative_SetSendTimeout", nullptr}, {0x3a9f009544a121c4, "AndroidCryptoNative_GetBigNumBytes", nullptr}, {0x3b0b4455b3fea9e2, "SystemNative_SetRLimit", nullptr}, @@ -351,6 +357,7 @@ static PinvokeEntry dotnet_pinvokes[] = { {0x4867eae89a5c605a, "SystemNative_MksTemps", nullptr}, {0x488380dda2b559e6, "SystemNative_SetSignalForBreak", nullptr}, {0x48be037e38782252, "CryptoNative_EnsureOpenSslInitialized", nullptr}, + {0x4bc828cf09a41783, "SystemNative_FreeEnviron", nullptr}, {0x4c4ddfc64007b3d8, "SystemNative_GetHostName", nullptr}, {0x4c865a5faaa699d9, "SystemNative_Open", nullptr}, {0x4cb0abad20b660da, "AndroidCryptoNative_DsaSizeSignature", nullptr}, @@ -365,6 +372,7 @@ static PinvokeEntry dotnet_pinvokes[] = { {0x5054abbd2a816def, "SystemNative_FSync", nullptr}, {0x50b366b9079ed438, "SystemNative_OpenDir", nullptr}, {0x518a82c4baeba9f3, "SystemNative_GetPeerName", nullptr}, + {0x52efc90a9cdf8e01, "SystemNative_MkFifo", nullptr}, {0x53405b468622bb06, "SystemNative_MAdvise", nullptr}, {0x534a064c11a1da14, "SystemNative_Sync", nullptr}, {0x536599a0b4941c95, "SystemNative_InterfaceNameToIndex", nullptr}, @@ -395,20 +403,23 @@ static PinvokeEntry dotnet_pinvokes[] = { {0x6111615e66a35dfb, "SystemNative_EnumerateInterfaceAddresses", nullptr}, {0x6197b24597638a4d, "SystemNative_SchedSetAffinity", nullptr}, {0x623531712908fe66, "SystemNative_INotifyRemoveWatch", nullptr}, - {0x624bfe137e6b5d39, "SystemNative_GetUid", nullptr}, {0x635933f4cff8a8a9, "AndroidCryptoNative_Aes192Cbc", nullptr}, {0x63c8ebedf5349f0e, "AndroidCryptoNative_DesCfb8", nullptr}, {0x641f5aa5faefc192, "CryptoNative_EvpDigestOneShot", nullptr}, {0x64c72180e4345ad8, "AndroidCryptoNative_CipherSetNonceLength", nullptr}, {0x6515d6c9d0d546d6, "SystemNative_HandleNonCanceledPosixSignal", nullptr}, {0x65a79b2aefb681e1, "SystemNative_CreateSocketEventBuffer", nullptr}, + {0x6632872520cf1856, "SystemNative_LoadLibrary", nullptr}, {0x67ddf0b252c19629, "BrotliDecoderVersion", nullptr}, + {0x6ac693dcf9d7c4c2, "SystemNative_GetLoadLibraryError", nullptr}, {0x6b10f070ae0146d4, "AndroidCryptoNative_CipherCreate", nullptr}, {0x6b233bbc205939bf, "AndroidCryptoNative_SSLStreamHandshake", nullptr}, {0x6bdc893ef8be99e7, "SystemNative_GetIPSocketAddressSizes", nullptr}, {0x6c75d5288ddd4b4a, "AndroidCryptoNative_DesEcb", nullptr}, {0x6c9f2e6d12a317a2, "AndroidCryptoNative_Aes256Ccm", nullptr}, {0x6ccc11e6813e7f89, "SystemNative_Close", nullptr}, + {0x6ce645aa9c1da3f1, "SystemNative_SetWindowSize", nullptr}, + {0x6ce88a9602bd3bf2, "SystemNative_GetBootTimeTicks", nullptr}, {0x6d1e60bdbeb87aa9, "SystemNative_SetIPv4Address", nullptr}, {0x6d5016f1bf6782cb, "AndroidCryptoNative_RsaVerificationPrimitive", nullptr}, {0x6d9db217f987fc7e, "SystemNative_Socket", nullptr}, @@ -451,7 +462,6 @@ static PinvokeEntry dotnet_pinvokes[] = { {0x82521dc7a3e0a884, "AndroidCryptoNative_Aes256Cfb8", nullptr}, {0x839c5b2482c5e130, "CryptoNative_ErrPeekLastError", nullptr}, {0x86178ff6f2ff90f4, "SystemNative_PlatformSupportsDualModeIPv4PacketInfo", nullptr}, - {0x866adbddc378eff0, "SystemNative_GetNodeName", nullptr}, {0x866d289872995b56, "AndroidCryptoNative_X509StoreEnumerateCertificates", nullptr}, {0x86b09bf921350f8c, "SystemNative_Log", nullptr}, {0x87c7d4815a4fd057, "CryptoNative_EvpSha1", nullptr}, @@ -480,15 +490,14 @@ static PinvokeEntry dotnet_pinvokes[] = { {0x91f6249923fc7ca4, "BrotliDecoderErrorString", nullptr}, {0x923761c06621fc21, "AndroidCryptoNative_SSLStreamCreate", nullptr}, {0x92a62b67d38387f0, "BrotliGetDictionary", nullptr}, - {0x92e082bf3648fbb0, "SystemNative_GetUnixName", nullptr}, {0x93b73b2af8e2f32b, "CryptoNative_HmacCreate", nullptr}, {0x93bd1d78b75cda99, "SystemNative_GetTcpGlobalStatistics", nullptr}, - {0x9421d81b17d2fe3e, "SystemNative_CloseNetworkChangeListenerSocket", nullptr}, {0x94663f3d60f11d38, "SystemNative_ReadEvents", nullptr}, {0x94e89a01440d3e20, "SystemNative_Sysctl", nullptr}, {0x95940b764538e429, "CryptoNative_EvpMd5", nullptr}, {0x96e077416ca46a87, "SystemNative_SetIPv4MulticastOption", nullptr}, {0x96f19c02d0adebc0, "CompressionNative_DeflateReset", nullptr}, + {0x972ca1612e79b321, "SystemNative_GetDefaultSearchOrderPseudoHandle", nullptr}, {0x97405b82e3c52c1a, "SystemNative_GetSignalForBreak", nullptr}, {0x97d308df1fc75bdd, "SystemNative_GetHostEntryForName", nullptr}, {0x99427666e7af4fb2, "SystemNative_WaitIdAnyExitedNoHangNoWait", nullptr}, @@ -505,8 +514,8 @@ static PinvokeEntry dotnet_pinvokes[] = { {0x9dca3a00eb020c26, "SystemNative_Kill", nullptr}, {0x9e86fd86c120034b, "BrotliEncoderSetParameter", nullptr}, {0x9f2c58763a4a0204, "AndroidCryptoNative_CipherDestroy", nullptr}, + {0x9f49fe6c41cc0f4b, "AndroidCryptoNative_AeadCipherFinalEx", nullptr}, {0x9fef6788420c40ee, "SystemNative_ConfigureTerminalForChildProcess", nullptr}, - {0xa01aafb6e5b405db, "SystemNative_MemSet", nullptr}, {0xa0a607a66d45fb2a, "AndroidCryptoNative_SSLStreamVerifyHostname", nullptr}, {0xa123cb29f5f736e7, "SystemNative_ReceiveMessage", nullptr}, {0xa22a5b5aa58c39d1, "SystemNative_GetNumRoutes", nullptr}, @@ -524,18 +533,21 @@ static PinvokeEntry dotnet_pinvokes[] = { {0xaa07629dc820e22a, "SystemNative_EnablePosixSignalHandling", nullptr}, {0xabc01085229fb24a, "AndroidCryptoNative_SSLGetSupportedProtocols", nullptr}, {0xac60de4d530c2c96, "AndroidCryptoNative_DsaSign", nullptr}, + {0xad0dfe04eb0152bd, "SystemNative_CreateThread", nullptr}, {0xad747aacfdb6b0c0, "AndroidCryptoNative_RsaUpRef", nullptr}, {0xadb79f95f46c8971, "SystemNative_PReadV", nullptr}, {0xae39a18202281ac3, "AndroidCryptoNative_EcKeyGetCurveName", nullptr}, {0xaec79fea71aa6d7a, "SystemNative_FLock", nullptr}, {0xaed9a241cf99cd55, "BrotliDecoderIsFinished", nullptr}, {0xaef741e4859af385, "SystemNative_GetSpaceInfoForMountPoint", nullptr}, + {0xaf21e7be03c2fb61, "SystemNative_Exit", nullptr}, {0xaf42ab86d7ae7234, "CryptoNative_EvpDigestUpdate", nullptr}, {0xafa04d18f40b1bab, "SystemNative_GetActiveUdpListeners", nullptr}, {0xb02f9b90348112d6, "SystemNative_SysConf", nullptr}, {0xb06f79e2fa5fec2d, "SystemNative_GetIPv6Address", nullptr}, {0xb0b0531f400704f1, "SystemNative_GetAddressFamily", nullptr}, {0xb0ef04e06fbb3240, "SystemNative_Dup", nullptr}, + {0xb138b853c7a4a4a8, "SystemNative_CanGetHiddenFlag", nullptr}, {0xb17e57a6eb07b615, "AndroidCryptoNative_EcKeyCreateByKeyParameters", nullptr}, {0xb19a7e97cdc0b913, "AndroidCryptoNative_Aes256Ecb", nullptr}, {0xb209c10b8961d087, "SystemNative_Receive", nullptr}, @@ -568,9 +580,11 @@ static PinvokeEntry dotnet_pinvokes[] = { {0xc3b018f07b7eb078, "SystemNative_Listen", nullptr}, {0xc443fe50f5f9caec, "BrotliDecoderDecompress", nullptr}, {0xc5172279d0dd8ce4, "CryptoNative_EvpSha512", nullptr}, + {0xc5326cd95646b911, "SystemNative_FUTimens", nullptr}, {0xc5a55c1ea92b8dad, "SystemNative_PRead", nullptr}, {0xc5a7ec27a7306804, "AndroidCryptoNative_Des3Cfb8", nullptr}, {0xc5c6b0f531797660, "AndroidCryptoNative_GetDsaParameters", nullptr}, + {0xc643198ec90f44b7, "SystemNative_MkNod", nullptr}, {0xc6a7ac7c8d82da0c, "AndroidCryptoNative_RsaPrivateDecrypt", nullptr}, {0xc8e10aa226d34595, "AndroidCryptoNative_X509StoreEnumerateTrustedCertificates", nullptr}, {0xc97ff652fd643526, "SystemNative_SetRawSockOpt", nullptr}, @@ -595,7 +609,7 @@ static PinvokeEntry dotnet_pinvokes[] = { {0xd4c4c2bec6908797, "SystemNative_CopyFile", nullptr}, {0xd51a39cf7f84a49d, "AndroidCryptoNative_EcKeyCreateByExplicitParameters", nullptr}, {0xd585c80f41abb13d, "SystemNative_LowLevelMonitor_Release", nullptr}, - {0xd643031866d820ad, "SystemNative_PosixFAllocate", nullptr}, + {0xd692f9150ac3480d, "SystemNative_LogError", nullptr}, {0xd71c4eaf80ea218b, "SystemNative_SNPrintF", nullptr}, {0xd7fa29bcafe538c2, "SystemNative_FcntlSetFD", nullptr}, {0xd87251da5bbfe12d, "SystemNative_LowLevelMonitor_Signal_Release", nullptr}, @@ -607,9 +621,11 @@ static PinvokeEntry dotnet_pinvokes[] = { {0xdbafc90d9a1f18ba, "SystemNative_Pipe", nullptr}, {0xdbb2bd51375f6815, "SystemNative_GetRLimit", nullptr}, {0xdd0a4092f77abe2e, "CompressionNative_DeflateInit2_", nullptr}, + {0xddb231fe8665bdce, "SystemNative_GetDeviceIdentifiers", nullptr}, {0xdf32dc1e6afdd53c, "AndroidCryptoNative_X509ChainGetErrorCount", nullptr}, {0xdf55a952b5b68eb0, "SystemNative_SetDelayedSigChildConsoleConfigurationHandler", nullptr}, {0xdf9869ddc8cc3e5e, "SystemNative_Send", nullptr}, + {0xdf9b606ab10c66da, "SystemNative_SearchPath_TempDirectory", nullptr}, {0xdfc9137d2a3eb69e, "SystemNative_ShmOpen", nullptr}, {0xe0c2779cc1f345e5, "SystemNative_GetSystemTimeAsTicks", nullptr}, {0xe0e1dc5c7f1c62d1, "SystemNative_GetRawSockOpt", nullptr}, @@ -618,13 +634,13 @@ static PinvokeEntry dotnet_pinvokes[] = { {0xe1e68596154c4a01, "AndroidCryptoNative_DeleteGlobalReference", nullptr}, {0xe23a89bf78db12b6, "SystemNative_Rename", nullptr}, {0xe23e9d9421fe669c, "BrotliDecoderCreateInstance", nullptr}, + {0xe2ff891a5773274d, "SystemNative_FChflags", nullptr}, {0xe313344977efd173, "BrotliEncoderMaxCompressedSize", nullptr}, {0xe31ff77ee993301b, "AndroidCryptoNative_SSLStreamRelease", nullptr}, {0xe4b4ef9a27c8a0c5, "SystemNative_DrainAutoreleasePool", nullptr}, {0xe5870c0ed57dc802, "SystemNative_SetKeypadXmit", nullptr}, {0xe5dcd5cc2901be3e, "AndroidCryptoNative_GetECCurveParameters", nullptr}, {0xe667c4f469004ea0, "AndroidCryptoNative_Aes256Cfb128", nullptr}, - {0xe789ce4ba0d52f26, "SystemNative_GetProcessArchitecture", nullptr}, {0xe80622add45b97ef, "SystemNative_GetUnixVersion", nullptr}, {0xe80f5b39f5d56291, "SystemNative_Bind", nullptr}, {0xe8a2a4e48b7bcc3b, "SystemNative_SendFile", nullptr}, @@ -638,13 +654,15 @@ static PinvokeEntry dotnet_pinvokes[] = { {0xf0ecd4416f62acfa, "SystemNative_EnumerateGatewayAddressesForInterface", nullptr}, {0xf10b31d4d66b80dd, "SystemNative_LowLevelMonitor_Wait", nullptr}, {0xf12df5fb4b6069c4, "SystemNative_MUnmap", nullptr}, + {0xf1671aab17cc18d5, "SystemNative_FreeLibrary", nullptr}, {0xf247211e6759476f, "SystemNative_GetPort", nullptr}, + {0xf3471f94b386b762, "SystemNative_GetGroupName", nullptr}, {0xf3905b32da336a2e, "SystemNative_GetUnixRelease", nullptr}, {0xf3f61096a5089cfc, "SystemNative_DisablePosixSignalHandling", nullptr}, {0xf4a597d0067676a3, "SystemNative_ChMod", nullptr}, - {0xf53f1d374aef4b21, "SystemNative_GetUsableSize", nullptr}, {0xf5786a949a070824, "SystemNative_CreateNetworkChangeListenerSocket", nullptr}, {0xf60a1dfd974a7e55, "AndroidCryptoNative_Aes192Cfb8", nullptr}, + {0xf60b6d0d58338d19, "SystemNative_Abort", nullptr}, {0xf636f6f74c59be39, "SystemNative_FcntlSetIsNonBlocking", nullptr}, {0xf6fb8a01c3c2e832, "SystemNative_FStat", nullptr}, {0xf71a65bf13d06e36, "AndroidCryptoNative_SSLStreamShutdown", nullptr}, @@ -926,8 +944,9 @@ static PinvokeEntry dotnet_pinvokes[] = { {0x8de5b3d, "SystemNative_GetSid", nullptr}, {0x92bf2d9, "AndroidCryptoNative_EcKeyGetSize", nullptr}, {0xaa46d20, "SystemNative_SNPrintF", nullptr}, + {0xaa7c86e, "SystemNative_Exit", nullptr}, {0xb6a80bd, "SystemNative_SetAddressFamily", nullptr}, - {0xb823d16, "SystemNative_GetUid", nullptr}, + {0xbdd984d, "SystemNative_SetWindowSize", nullptr}, {0xcc59904, "CryptoNative_HmacDestroy", nullptr}, {0xd5ca844, "SystemNative_CreateSocketEventPort", nullptr}, {0xd98d741, "SystemNative_Kill", nullptr}, @@ -964,18 +983,21 @@ static PinvokeEntry dotnet_pinvokes[] = { {0x22011e2b, "SystemNative_SetLingerOption", nullptr}, {0x224ebd71, "SystemNative_Listen", nullptr}, {0x2253b591, "BrotliGetTransforms", nullptr}, + {0x226eec4d, "SystemNative_Abort", nullptr}, {0x229f73d4, "AndroidCryptoNative_RsaUpRef", nullptr}, {0x22bbb587, "AndroidCryptoNative_SSLStreamGetPeerCertificate", nullptr}, {0x2304e65b, "SystemNative_SetRLimit", nullptr}, {0x23cfcfb0, "BrotliTransformDictionaryWord", nullptr}, {0x260a3e8d, "CompressionNative_DeflateInit2_", nullptr}, - {0x262314e4, "SystemNative_CloseNetworkChangeListenerSocket", nullptr}, {0x289b5430, "SystemNative_Log", nullptr}, + {0x28d95a99, "SystemNative_CanGetHiddenFlag", nullptr}, {0x28f3db4b, "SystemNative_ShmUnlink", nullptr}, {0x2af6aa40, "SystemNative_Access", nullptr}, {0x2b117055, "BrotliDecoderDecompress", nullptr}, {0x2b7293c5, "SystemNative_GetTimestamp", nullptr}, + {0x2b747a9c, "SystemNative_MkNod", nullptr}, {0x2bc9ff5e, "AndroidCryptoNative_SSLStreamGetProtocol", nullptr}, + {0x2c4415fd, "AndroidCryptoNative_AeadCipherFinalEx", nullptr}, {0x2c467430, "AndroidCryptoNative_GetECCurveParameters", nullptr}, {0x2d21ad97, "SystemNative_GetReadDirRBufferSize", nullptr}, {0x2d6e4a1c, "AndroidCryptoNative_X509StoreRemoveCertificate", nullptr}, @@ -984,9 +1006,11 @@ static PinvokeEntry dotnet_pinvokes[] = { {0x2ff73621, "CryptoNative_ErrReasonErrorString", nullptr}, {0x30af09b7, "AndroidCryptoNative_DecodeRsaSubjectPublicKeyInfo", nullptr}, {0x31120969, "SystemNative_Malloc", nullptr}, + {0x3374b950, "SystemNative_GetLoadLibraryError", nullptr}, {0x349c5a8f, "SystemNative_GetNetworkInterfaces", nullptr}, {0x354aa58f, "AndroidCryptoNative_DsaKeyCreateByExplicitParameters", nullptr}, {0x363c0010, "CryptoNative_EvpDigestUpdate", nullptr}, + {0x367eee31, "AndroidCryptoNative_SSLStreamIsLocalCertificateUsed", nullptr}, {0x38575bc5, "SystemNative_GetUnixRelease", nullptr}, {0x388a31d4, "SystemNative_PathConf", nullptr}, {0x3a238b9f, "AndroidCryptoNative_RsaVerificationPrimitive", nullptr}, @@ -1023,6 +1047,7 @@ static PinvokeEntry dotnet_pinvokes[] = { {0x493888ee, "CompressionNative_Crc32", nullptr}, {0x494ef6d4, "SystemNative_GetIPv4MulticastOption", nullptr}, {0x496f1885, "SystemNative_GetSocketErrorOption", nullptr}, + {0x49c2af32, "SystemNative_GetBootTimeTicks", nullptr}, {0x49c81782, "SystemNative_MkDir", nullptr}, {0x4a4ef46f, "SystemNative_FcntlGetFD", nullptr}, {0x4b78d330, "CryptoNative_HmacCurrent", nullptr}, @@ -1037,7 +1062,6 @@ static PinvokeEntry dotnet_pinvokes[] = { {0x4f6c3726, "SystemNative_FcntlGetIsNonBlocking", nullptr}, {0x50309413, "SystemNative_GetPeerUserName", nullptr}, {0x50e88639, "CryptoNative_HmacUpdate", nullptr}, - {0x513d0a9e, "SystemNative_GetUnixName", nullptr}, {0x514e739b, "AndroidCryptoNative_EcKeyCreateByExplicitParameters", nullptr}, {0x52590509, "AndroidCryptoNative_Aes128Cbc", nullptr}, {0x526c9f90, "SystemNative_GetNumRoutes", nullptr}, @@ -1045,7 +1069,6 @@ static PinvokeEntry dotnet_pinvokes[] = { {0x5600bd0d, "AndroidCryptoNative_SSLStreamCreate", nullptr}, {0x561fb6ff, "SystemNative_FStat", nullptr}, {0x56993aa9, "SystemNative_SetKeypadXmit", nullptr}, - {0x577cf918, "SystemNative_GetNodeName", nullptr}, {0x57bdcc46, "SystemNative_Open", nullptr}, {0x581adfc6, "SystemNative_GetSignalForBreak", nullptr}, {0x5906e1ba, "SystemNative_Close", nullptr}, @@ -1054,8 +1077,8 @@ static PinvokeEntry dotnet_pinvokes[] = { {0x5989ad17, "SystemNative_GetIcmpv4GlobalStatistics", nullptr}, {0x599921d3, "SystemNative_SysConf", nullptr}, {0x59b67f4d, "AndroidCryptoNative_SSLGetSupportedProtocols", nullptr}, + {0x59e712d5, "SystemNative_MkdTemp", nullptr}, {0x5a492732, "SystemNative_FcntlSetFD", nullptr}, - {0x5b75d3ae, "SystemNative_PosixFAllocate", nullptr}, {0x5ccc38dd, "AndroidCryptoNative_SSLStreamGetPeerCertificates", nullptr}, {0x5e9ef1a2, "SystemNative_GetAtOutOfBandMark", nullptr}, {0x5eb4f827, "SystemNative_LockFileRegion", nullptr}, @@ -1122,13 +1145,15 @@ static PinvokeEntry dotnet_pinvokes[] = { {0x84662605, "CompressionNative_Deflate", nullptr}, {0x8526c9e8, "SystemNative_SetRawSockOpt", nullptr}, {0x8574b133, "AndroidCryptoNative_Aes192Ecb", nullptr}, + {0x88a7558d, "SystemNative_GetDefaultSearchOrderPseudoHandle", nullptr}, {0x8bdaf06c, "SystemNative_GetWindowSize", nullptr}, {0x8bfcd7ba, "CompressionNative_Inflate", nullptr}, {0x8d38b733, "SystemNative_LSeek", nullptr}, - {0x8e969bff, "SystemNative_GetProcessArchitecture", nullptr}, {0x8f4e59f1, "SystemNative_ReadStdin", nullptr}, {0x909e12ee, "SystemNative_SearchPath", nullptr}, {0x910b7740, "SystemNative_GetFormatInfoForMountPoint", nullptr}, + {0x913a3d68, "SystemNative_GetDeviceIdentifiers", nullptr}, + {0x9216d936, "SystemNative_GetGroupName", nullptr}, {0x94477030, "AndroidCryptoNative_Aes256Ccm", nullptr}, {0x95e99740, "AndroidCryptoNative_SSLStreamInitialize", nullptr}, {0x960d4fc0, "SystemNative_GetDefaultTimeZone", nullptr}, @@ -1143,7 +1168,7 @@ static PinvokeEntry dotnet_pinvokes[] = { {0x996952b3, "AndroidCryptoNative_CipherFinalEx", nullptr}, {0x9a005080, "SystemNative_Bind", nullptr}, {0x9a84ffd3, "AndroidCryptoNative_ChaCha20Poly1305", nullptr}, - {0x9adb0570, "AndroidCryptoNative_X509ChainSupportsRevocationOptions", nullptr}, + {0x9abfce84, "SystemNative_GetEnviron", nullptr}, {0x9bda7eb1, "SystemNative_ReadProcessStatusInfo", nullptr}, {0x9cd6cae8, "AndroidCryptoNative_SSLStreamRelease", nullptr}, {0x9d102d58, "CompressionNative_InflateEnd", nullptr}, @@ -1153,7 +1178,10 @@ static PinvokeEntry dotnet_pinvokes[] = { {0x9e717f20, "SystemNative_LChflagsCanSetHiddenFlag", nullptr}, {0x9f47b32d, "SystemNative_ShmOpen", nullptr}, {0xa0db1858, "SystemNative_GetEnv", nullptr}, + {0xa1295a9f, "SystemNative_MkFifo", nullptr}, + {0xa1bec9da, "SystemNative_LogError", nullptr}, {0xa1d774fc, "BrotliEncoderHasMoreOutput", nullptr}, + {0xa2430b33, "SystemNative_SearchPath_TempDirectory", nullptr}, {0xa25daa0e, "BrotliSetDictionaryData", nullptr}, {0xa2d2f390, "SystemNative_TryChangeSocketEventRegistration", nullptr}, {0xa4636764, "AndroidCryptoNative_X509ChainCreateContext", nullptr}, @@ -1173,6 +1201,8 @@ static PinvokeEntry dotnet_pinvokes[] = { {0xab3d1641, "AndroidCryptoNative_DesEcb", nullptr}, {0xabe6739f, "BrotliGetDictionary", nullptr}, {0xacc26fa4, "AndroidCryptoNative_SSLStreamCreateWithCertificates", nullptr}, + {0xacc28460, "SystemNative_GetProcAddress", nullptr}, + {0xad7fbde5, "SystemNative_FUTimens", nullptr}, {0xae443204, "SystemNative_GetSockOpt", nullptr}, {0xae449ad1, "BrotliDecoderIsUsed", nullptr}, {0xafb02e71, "BrotliEncoderMaxCompressedSize", nullptr}, @@ -1185,6 +1215,7 @@ static PinvokeEntry dotnet_pinvokes[] = { {0xb2985645, "AndroidCryptoNative_X509StoreEnumerateCertificates", nullptr}, {0xb4110b14, "AndroidCryptoNative_DsaGenerateKey", nullptr}, {0xb427959c, "SystemNative_FLock", nullptr}, + {0xb439ebdb, "AndroidCryptoNative_RegisterRemoteCertificateValidationCallback", nullptr}, {0xb444f04a, "SystemNative_Accept", nullptr}, {0xb448a24a, "SystemNative_SymLink", nullptr}, {0xb4e5c37d, "SystemNative_UTimensat", nullptr}, @@ -1207,12 +1238,14 @@ static PinvokeEntry dotnet_pinvokes[] = { {0xbb92466f, "SystemNative_AlignedAlloc", nullptr}, {0xbd658356, "CryptoNative_ErrErrorStringN", nullptr}, {0xbdbf2140, "SystemNative_SchedGetAffinity", nullptr}, + {0xbec8a3f2, "SystemNative_FChflags", nullptr}, {0xbf4eeb78, "AndroidCryptoNative_GetBigNumBytes", nullptr}, {0xbf9766c3, "AndroidCryptoNative_SSLStreamHandshake", nullptr}, {0xbfa0ce53, "SystemNative_GetPlatformSignalNumber", nullptr}, {0xbfaad12d, "BrotliDecoderSetParameter", nullptr}, {0xc090b1d3, "CryptoNative_EvpSha512", nullptr}, {0xc0d66913, "SystemNative_GetUnixVersion", nullptr}, + {0xc11dec94, "SystemNative_FAllocate", nullptr}, {0xc1243135, "AndroidCryptoNative_Aes128Gcm", nullptr}, {0xc1e4e6f6, "AndroidCryptoNative_BigNumToBinary", nullptr}, {0xc25ffc33, "BrotliEncoderCompressStream", nullptr}, @@ -1222,12 +1255,14 @@ static PinvokeEntry dotnet_pinvokes[] = { {0xc475f41c, "AndroidCryptoNative_X509StoreContainsCertificate", nullptr}, {0xc4ac1723, "AndroidCryptoNative_Aes256Cbc", nullptr}, {0xc55548f2, "SystemNative_HandleNonCanceledPosixSignal", nullptr}, + {0xc57b40fa, "SystemNative_LoadLibrary", nullptr}, {0xc6d5929c, "SystemNative_LowLevelMonitor_TimedWait", nullptr}, {0xc6f2fb9e, "AndroidCryptoNative_X509ChainSetCustomTrustStore", nullptr}, {0xc717b16e, "CryptoNative_EvpMdCtxDestroy", nullptr}, {0xc746b70c, "AndroidCryptoNative_DsaSign", nullptr}, {0xc7f0668d, "CompressionNative_DeflateReset", nullptr}, {0xc83527e0, "CryptoNative_HmacReset", nullptr}, + {0xc89ccd22, "SystemNative_SchedGetCpu", nullptr}, {0xc8cce896, "SystemNative_GetSocketType", nullptr}, {0xc8e06b20, "AndroidCryptoNative_X509ChainGetCertificates", nullptr}, {0xc9b017c8, "AndroidCryptoNative_EcKeyCreateByOid", nullptr}, @@ -1236,6 +1271,7 @@ static PinvokeEntry dotnet_pinvokes[] = { {0xcb746e5c, "SystemNative_SetIPv4MulticastOption", nullptr}, {0xcb85cd8e, "AndroidCryptoNative_EcdhDeriveKey", nullptr}, {0xccc0dd15, "SystemNative_RegisterForSigChld", nullptr}, + {0xcdfb627d, "SystemNative_FreeLibrary", nullptr}, {0xce91e293, "SystemNative_GetGroupList", nullptr}, {0xcf9bcc75, "AndroidCryptoNative_Aes256Gcm", nullptr}, {0xcfa9e6f1, "AndroidCryptoNative_GetDsaParameters", nullptr}, @@ -1244,7 +1280,6 @@ static PinvokeEntry dotnet_pinvokes[] = { {0xd24d4849, "SystemNative_Socket", nullptr}, {0xd298c3b3, "SystemNative_Write", nullptr}, {0xd378ba49, "CryptoNative_EvpMd5", nullptr}, - {0xd380af35, "SystemNative_GetUsableSize", nullptr}, {0xd473c64c, "SystemNative_SetReceiveTimeout", nullptr}, {0xd4b91180, "SystemNative_ForkAndExecProcess", nullptr}, {0xd6d7b4fb, "AndroidCryptoNative_X509ChainGetCertificateCount", nullptr}, @@ -1274,12 +1309,12 @@ static PinvokeEntry dotnet_pinvokes[] = { {0xe4a78efb, "SystemNative_SetPriority", nullptr}, {0xe4dba4f6, "SystemNative_GetCwd", nullptr}, {0xe4f87d25, "AndroidCryptoNative_SSLStreamVerifyHostname", nullptr}, + {0xe50c82b4, "SystemNative_CreateThread", nullptr}, {0xe58ed8fe, "SystemNative_PlatformSupportsDualModeIPv4PacketInfo", nullptr}, {0xe5ef37b3, "AndroidCryptoNative_DsaSignatureFieldSize", nullptr}, {0xe770cb3f, "SystemNative_CopyFile", nullptr}, {0xe7a9a106, "CompressionNative_InflateInit2_", nullptr}, {0xe7bd8dd1, "AndroidCryptoNative_EcKeyCreateByKeyParameters", nullptr}, - {0xe7edaa92, "SystemNative_MemSet", nullptr}, {0xe890cf58, "AndroidCryptoNative_EcDsaSign", nullptr}, {0xe8b2ec8d, "BrotliDecoderErrorString", nullptr}, {0xe972fbd9, "SystemNative_GetEGid", nullptr}, @@ -1308,6 +1343,7 @@ static PinvokeEntry dotnet_pinvokes[] = { {0xf57828fb, "SystemNative_IsATty", nullptr}, {0xf6141499, "AndroidCryptoNative_X509ChainBuild", nullptr}, {0xf629d20f, "SystemNative_Shutdown", nullptr}, + {0xf6b01c6b, "SystemNative_FreeEnviron", nullptr}, {0xf6bfedad, "SystemNative_ReadEvents", nullptr}, {0xf91cf365, "AndroidCryptoNative_Aes128Ccm", nullptr}, {0xf94a4828, "SystemNative_GetEUid", nullptr}, @@ -1330,4 +1366,4 @@ constexpr hash_t system_security_cryptography_native_android_library_hash = 0x93 #endif constexpr size_t internal_pinvokes_count = 237; -constexpr size_t dotnet_pinvokes_count = 410; +constexpr size_t dotnet_pinvokes_count = 428; From 8dc92611ed118bd5ab0aa3ff28761988cb9ee263 Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Mon, 27 Feb 2023 15:48:59 -0500 Subject: [PATCH 03/22] [ci] Run nunit tests with stable .NET version (#7826) Attempt to improve desktop test execution reliability by running our test assemblies with a stable version of .NET by default. The default value of the `useDotNet` yaml template parameters have been flipped as part of continued efforts to remove classic test runs. .NET 7.0 SDK provisioning has been updated to install the latest GA version now that it is stable. --- .../automation/azure-pipelines-nightly.yaml | 1 + build-tools/automation/azure-pipelines.yaml | 21 ++++++++------- .../yaml-templates/apk-instrumentation.yaml | 2 +- .../yaml-templates/build-windows.yaml | 2 +- .../run-localization-tests.yaml | 1 - .../yaml-templates/run-nunit-tests.yaml | 26 ++++++++++++++++--- .../run-timezoneinfo-tests.yaml | 1 + .../automation/yaml-templates/variables.yaml | 4 +-- 8 files changed, 40 insertions(+), 18 deletions(-) diff --git a/build-tools/automation/azure-pipelines-nightly.yaml b/build-tools/automation/azure-pipelines-nightly.yaml index 89b55d11a86..cc6168b0f35 100644 --- a/build-tools/automation/azure-pipelines-nightly.yaml +++ b/build-tools/automation/azure-pipelines-nightly.yaml @@ -142,6 +142,7 @@ stages: extraBuildArgs: /p:TestAvdApiLevel=$(avdApiLevel) /p:TestAvdAbi=$(avdAbi) /p:TestAvdType=$(avdType) artifactSource: bin/Test$(XA.Build.Configuration)/Mono.Android_Tests-Signed.apk artifactFolder: Default + useDotNet: false - task: MSBuild@1 displayName: shut down emulator diff --git a/build-tools/automation/azure-pipelines.yaml b/build-tools/automation/azure-pipelines.yaml index 2e060009042..ef8c0138fbe 100644 --- a/build-tools/automation/azure-pipelines.yaml +++ b/build-tools/automation/azure-pipelines.yaml @@ -132,6 +132,7 @@ stages: testResultsFiles: TestResult-Xamarin.Android.JcwGen_Tests-$(ApkTestConfiguration).xml artifactSource: bin/Test$(ApkTestConfiguration)/Xamarin.Android.JcwGen_Tests-Signed.apk artifactFolder: Default + useDotNet: false - template: yaml-templates/apk-instrumentation.yaml parameters: @@ -142,6 +143,7 @@ stages: artifactSource: bin/Test$(ApkTestConfiguration)/Xamarin.Android.JcwGen_Tests-Signed.apk artifactFolder: FastDev_Assemblies_Dexes extraBuildArgs: /p:AndroidFastDeploymentType=Assemblies:Dexes + useDotNet: false - template: yaml-templates/apk-instrumentation.yaml parameters: @@ -151,6 +153,7 @@ stages: testResultsFiles: TestResult-Xamarin.Android.Locale_Tests-$(ApkTestConfiguration).xml artifactSource: bin/Test$(ApkTestConfiguration)/Xamarin.Android.Locale_Tests-Signed.apk artifactFolder: Default + useDotNet: false - template: yaml-templates/apk-instrumentation.yaml parameters: @@ -161,6 +164,7 @@ stages: extraBuildArgs: /p:AotAssemblies=True artifactSource: bin/Test$(ApkTestConfiguration)/Xamarin.Android.Locale_Tests-Signed.apk artifactFolder: Aot + useDotNet: false - template: yaml-templates/apk-instrumentation.yaml parameters: @@ -171,6 +175,7 @@ stages: extraBuildArgs: /p:AotAssemblies=True /p:AndroidEnableProfiledAot=true artifactSource: bin/Test$(ApkTestConfiguration)/Xamarin.Android.Locale_Tests-Signed.apk artifactFolder: Profiled-Aot + useDotNet: false - template: yaml-templates/apk-instrumentation.yaml parameters: @@ -180,6 +185,7 @@ stages: testResultsFiles: TestResult-Xamarin.Android.EmbeddedDSO_Test.nunit-$(ApkTestConfiguration).xml artifactSource: bin/Test$(ApkTestConfiguration)/Xamarin.Android.EmbeddedDSO_Test-Signed.apk artifactFolder: Default + useDotNet: false - template: yaml-templates/apk-instrumentation.yaml parameters: @@ -189,6 +195,7 @@ stages: testResultsFiles: TestResult-apkdiff-Xamarin.Forms_Performance_Integration-Signed-$(ApkTestConfiguration).xml artifactSource: bin/Test$(ApkTestConfiguration)/Xamarin.Forms_Performance_Integration-Signed.apk artifactFolder: Default + useDotNet: false - template: yaml-templates/apk-instrumentation.yaml parameters: @@ -199,6 +206,7 @@ stages: extraBuildArgs: /p:AotAssemblies=true artifactSource: bin/Test$(ApkTestConfiguration)/Xamarin.Forms_Performance_Integration-Signed.apk artifactFolder: Aot + useDotNet: false - template: yaml-templates/apk-instrumentation.yaml parameters: @@ -209,6 +217,7 @@ stages: extraBuildArgs: /p:AotAssemblies=True /p:AndroidEnableProfiledAot=true artifactSource: bin/Test$(ApkTestConfiguration)/Xamarin.Forms_Performance_Integration-Signed.apk artifactFolder: Profiled-Aot + useDotNet: false - template: yaml-templates/apk-instrumentation.yaml parameters: @@ -219,6 +228,7 @@ stages: extraBuildArgs: /p:BundleAssemblies=true artifactSource: bin/Test$(ApkTestConfiguration)/Xamarin.Forms_Performance_Integration-Signed.apk artifactFolder: Bundle + useDotNet: false - template: yaml-templates/apk-instrumentation.yaml parameters: @@ -228,6 +238,7 @@ stages: testResultsFiles: TestResult-apkdiff-com.companyname.vsandroidapp-Signed-$(ApkTestConfiguration).xml artifactSource: bin/Test$(ApkTestConfiguration)/com.companyname.vsandroidapp-Signed.apk artifactFolder: Default + useDotNet: false - task: MSBuild@1 displayName: shut down emulator @@ -347,7 +358,6 @@ stages: testResultsFiles: TestResult-Mono.Android.NET_Tests-$(XA.Build.Configuration).xml artifactSource: bin/Test$(XA.Build.Configuration)/$(DotNetTargetFramework)-android/Mono.Android.NET_Tests-Signed.aab artifactFolder: $(DotNetTargetFramework)-$(XA.Build.Configuration) - useDotNet: true - template: yaml-templates/apk-instrumentation.yaml parameters: @@ -358,7 +368,6 @@ stages: testResultsFiles: TestResult-Mono.Android.NET_Tests-Debug.xml artifactSource: bin/Test$(XA.Build.Configuration)/$(DotNetTargetFramework)-android/Mono.Android.NET_Tests-Signed.apk artifactFolder: $(DotNetTargetFramework)-Debug - useDotNet: true - template: yaml-templates/apk-instrumentation.yaml parameters: @@ -369,7 +378,6 @@ stages: extraBuildArgs: -p:TestsFlavor=NoAab -p:AndroidPackageFormat=apk artifactSource: bin/Test$(XA.Build.Configuration)/$(DotNetTargetFramework)-android/Mono.Android.NET_Tests-Signed.apk artifactFolder: $(DotNetTargetFramework)-NoAab - useDotNet: true - template: yaml-templates/apk-instrumentation.yaml parameters: @@ -380,7 +388,6 @@ stages: extraBuildArgs: -p:TestsFlavor=Interpreter -p:UseInterpreter=True artifactSource: bin/Test$(XA.Build.Configuration)/$(DotNetTargetFramework)-android/Mono.Android.NET_Tests-Signed.aab artifactFolder: $(DotNetTargetFramework)-Interpreter - useDotNet: true - template: yaml-templates/apk-instrumentation.yaml parameters: @@ -391,7 +398,6 @@ stages: extraBuildArgs: -p:TestsFlavor=NoAot -p:RunAOTCompilation=false artifactSource: bin/Test$(XA.Build.Configuration)/$(DotNetTargetFramework)-android/Mono.Android.NET_Tests-Signed.aab artifactFolder: $(DotNetTargetFramework)-NoAot - useDotNet: true - template: yaml-templates/apk-instrumentation.yaml parameters: @@ -402,7 +408,6 @@ stages: extraBuildArgs: -p:TestsFlavor=AotLlvm -p:EnableLLVM=true -p:AndroidEnableProfiledAot=false artifactSource: bin/Test$(XA.Build.Configuration)/$(DotNetTargetFramework)-android/Mono.Android.NET_Tests-Signed.aab artifactFolder: $(DotNetTargetFramework)-AotLlvm - useDotNet: true - task: MSBuild@1 displayName: shut down emulator @@ -497,7 +502,6 @@ stages: - template: yaml-templates/run-nunit-tests.yaml parameters: - useDotNet: true testRunTitle: MSBuildDeviceIntegration Smoke - macOS testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/MSBuildDeviceIntegration/$(DotNetStableTargetFramework)/MSBuildDeviceIntegration.dll dotNetTestExtraArgs: --filter "TestCategory = SmokeTests $(DotNetNUnitCategories)" @@ -546,7 +550,6 @@ stages: - template: yaml-templates/run-nunit-tests.yaml parameters: - useDotNet: true testRunTitle: Xamarin.Android.Build.Tests - Linux .NET 6 Smoke Tests testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/$(DotNetStableTargetFramework)/Xamarin.Android.Build.Tests.dll dotNetTestExtraArgs: --filter "TestCategory = SmokeTests $(DotNetNUnitCategories)" @@ -739,7 +742,6 @@ stages: - template: yaml-templates/run-nunit-tests.yaml parameters: - useDotNet: true testRunTitle: WearOS On Device - macOS testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/MSBuildDeviceIntegration/$(DotNetStableTargetFramework)/MSBuildDeviceIntegration.dll dotNetTestExtraArgs: --filter "TestCategory = WearOS" @@ -805,6 +807,7 @@ stages: testResultsFiles: TestResult-Xamarin.Android.Bcl_Tests.nunit-$(XA.Build.Configuration).xml artifactSource: bin/Test$(XA.Build.Configuration)/Xamarin.Android.Bcl_Tests-Signed.apk artifactFolder: Default + useDotNet: false - task: PublishTestResults@2 displayName: publish Xamarin.Android.Bcl-Tests-XUnit results diff --git a/build-tools/automation/yaml-templates/apk-instrumentation.yaml b/build-tools/automation/yaml-templates/apk-instrumentation.yaml index 028df889d7b..354ca060758 100644 --- a/build-tools/automation/yaml-templates/apk-instrumentation.yaml +++ b/build-tools/automation/yaml-templates/apk-instrumentation.yaml @@ -9,7 +9,7 @@ parameters: testResultsFormat: NUnit artifactSource: "" artifactFolder: "" - useDotNet: false + useDotNet: true condition: succeeded() steps: diff --git a/build-tools/automation/yaml-templates/build-windows.yaml b/build-tools/automation/yaml-templates/build-windows.yaml index 4de0eb8b73c..626b75095de 100644 --- a/build-tools/automation/yaml-templates/build-windows.yaml +++ b/build-tools/automation/yaml-templates/build-windows.yaml @@ -116,6 +116,7 @@ stages: - template: run-nunit-tests.yaml parameters: + useDotNet: false testRunTitle: Smoke MSBuild Tests - Windows Build Tree testAssembly: $(System.DefaultWorkingDirectory)\bin\Test$(XA.Build.Configuration)\net472\Xamarin.Android.Build.Tests.dll testResultsFile: TestResult-SmokeMSBuildTests-WinBuildTree-$(XA.Build.Configuration).xml @@ -123,7 +124,6 @@ stages: - template: run-nunit-tests.yaml parameters: - useDotNet: true testRunTitle: Smoke MSBuild Tests - Windows Dotnet Build testAssembly: $(System.DefaultWorkingDirectory)\bin\Test$(XA.Build.Configuration)\$(DotNetStableTargetFramework)\Xamarin.Android.Build.Tests.dll testResultsFile: TestResult-SmokeMSBuildTests-WinDotnetBuild-$(XA.Build.Configuration).xml diff --git a/build-tools/automation/yaml-templates/run-localization-tests.yaml b/build-tools/automation/yaml-templates/run-localization-tests.yaml index 1ed205cf539..2376c0e3dfb 100644 --- a/build-tools/automation/yaml-templates/run-localization-tests.yaml +++ b/build-tools/automation/yaml-templates/run-localization-tests.yaml @@ -36,7 +36,6 @@ jobs: parameters: testRunTitle: LocalizationTests On Device - macOS testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/MSBuildDeviceIntegration/$(DotNetStableTargetFramework)/MSBuildDeviceIntegration.dll - useDotNet: true dotNetTestExtraArgs: --filter "Name~CheckLocalizationIsCorrectNode${{ parameters.node_id }}" testResultsFile: TestResult-LocalizationTests-Node${{ parameters.node_id }}-$(XA.Build.Configuration).xml diff --git a/build-tools/automation/yaml-templates/run-nunit-tests.yaml b/build-tools/automation/yaml-templates/run-nunit-tests.yaml index c3a7ed29c28..95d49d08506 100644 --- a/build-tools/automation/yaml-templates/run-nunit-tests.yaml +++ b/build-tools/automation/yaml-templates/run-nunit-tests.yaml @@ -6,12 +6,15 @@ parameters: testResultsFile: TestResult.xml nunitConsoleExtraArgs: '' dotNetTestExtraArgs: '' - useDotNet: false + useDotNet: true + useDotNetPreview: false workers: $(NUnit.NumberOfTestWorkers) condition: succeeded() + timeoutInMinutes: 0 + retryCountOnTaskFailure: 0 steps: -- ${{ if eq(parameters.useDotNet, false) }}: +- ${{ if and(eq(parameters.useDotNet, false), eq(parameters.useDotNetPreview, false)) }}: - powershell: | Write-Host '##vso[task.setvariable variable=TestResultsFormat]NUnit' if ([Environment]::OSVersion.Platform -eq "Unix") { @@ -28,7 +31,7 @@ steps: condition: ${{ parameters.condition }} continueOnError: true -- ${{ if eq(parameters.useDotNet, true) }}: +- ${{ if and(eq(parameters.useDotNet, true), eq(parameters.useDotNetPreview, true)) }}: - powershell: Write-Host '##vso[task.setvariable variable=TestResultsFormat]VSTest' - template: run-dotnet-preview.yaml parameters: @@ -43,6 +46,21 @@ steps: displayName: run ${{ parameters.testRunTitle }} condition: ${{ parameters.condition }} +- ${{ if and(eq(parameters.useDotNet, true), eq(parameters.useDotNetPreview, false)) }}: + - task: DotNetCoreCLI@2 + inputs: + command: test + projects: ${{ parameters.testAssembly }} + arguments: >- + ${{ parameters.dotNetTestExtraArgs }} -- NUnit.NumberOfTestWorkers=${{ parameters.workers }} + publishTestResults: true + testRunTitle: ${{ parameters.testRunTitle }} + displayName: run ${{ parameters.testRunTitle }} + condition: ${{ parameters.condition }} + continueOnError: true + timeoutInMinutes: ${{ parameters.timeoutInMinutes }} + retryCountOnTaskFailure: ${{ parameters.retryCountOnTaskFailure }} + - template: kill-processes.yaml - task: PublishTestResults@2 @@ -50,4 +68,4 @@ steps: testResultsFormat: $(TestResultsFormat) testResultsFiles: ${{ parameters.testResultsFile }} testRunTitle: ${{ parameters.testRunTitle }} - condition: ${{ parameters.condition }} + condition: and(${{ parameters.condition }}, or(ne('${{ parameters.useDotNet }}', 'true'), eq('${{ parameters.useDotNetPreview }}', 'true'))) diff --git a/build-tools/automation/yaml-templates/run-timezoneinfo-tests.yaml b/build-tools/automation/yaml-templates/run-timezoneinfo-tests.yaml index baa624c70cd..3f96affb8bf 100644 --- a/build-tools/automation/yaml-templates/run-timezoneinfo-tests.yaml +++ b/build-tools/automation/yaml-templates/run-timezoneinfo-tests.yaml @@ -34,6 +34,7 @@ jobs: - template: run-nunit-tests.yaml parameters: + useDotNet: false testRunTitle: TimeZoneInfoTests On Device - macOS testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/MSBuildDeviceIntegration/net472/MSBuildDeviceIntegration.dll nunitConsoleExtraArgs: --where "test == Xamarin.Android.Build.Tests.DeploymentTest.CheckTimeZoneInfoIsCorrectNode${{ parameters.node_id }}" diff --git a/build-tools/automation/yaml-templates/variables.yaml b/build-tools/automation/yaml-templates/variables.yaml index 1c5899f879c..5f49d1afd0f 100644 --- a/build-tools/automation/yaml-templates/variables.yaml +++ b/build-tools/automation/yaml-templates/variables.yaml @@ -18,9 +18,9 @@ variables: - name: NUnit.NumberOfTestWorkers value: 4 - name: DotNetSdkVersion - value: 7.0.1xx + value: 7.0 - name: DotNetSdkQuality - value: preview + value: GA - name: GitHub.Token value: $(github--pat--vs-mobiletools-engineering-service2) - name: HostedMacImage From 61767a03fb9571ff2abdc0524ce4f1e27055a5cb Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 27 Feb 2023 16:58:33 -0600 Subject: [PATCH 04/22] Bump to dotnet/installer/main@e3ab0b5 8.0.100-preview.2.23123.10 (#7813) Changes: https://github.com/dotnet/installer/compare/f05478b...e3ab0b5 Changes: https://github.com/dotnet/runtime/compare/fe4760c...ff7c19f Changes: https://github.com/dotnet/emsdk/compare/fd5a0d1...d7ff0aa Updates: * Microsoft.Dotnet.Sdk.Internal: from 8.0.100-preview.2.23107.13 to 8.0.100-preview.2.23123.10 * Microsoft.NET.ILLink.Tasks: from 8.0.0-preview.2.23106.6 to 8.0.0-preview.2.23123.4 * Microsoft.NETCore.App.Ref: from 8.0.0-preview.2.23106.6 to 8.0.0-preview.2.23123.4 * Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100-preview.2: from 8.0.0-preview.2.23081.1 to 8.0.0-preview.2.23113.1 ~~ Other changes ~~ * Revert "[Microsoft.Android.Sdk.ILLink] target `net7.0` temporarily (#7803)" This reverts commit 7ba7dd499b8e03c68838d33a008583ed51caad53. We should be able to build ILLink steps for `net8.0` going forward. * Add `@(PackageReference)` to `Mono.Cecil` Context: https://github.com/dotnet/runtime/blob/fb13c2cf6eaf69b53773e94674772f217fa39416/src/coreclr/tools/aot/Mono.Linker.Tests/Mono.Linker.Tests.csproj#L22 `Microsoft.NET.ILLink` no longer has an implicit dependency on `Mono.Cecil`. * Update BuildReleaseArm64XFormsDotNet.apkdesc Fixes the failure: apkdiff: File 'assemblies/System.Collections.Concurrent.dll' has changed by 1,032 bytes (8.93 %). This exceeds the threshold of 5.00 % Co-authored-by: Jonathan Peppers --- eng/Version.Details.xml | 18 +-- eng/Versions.props | 10 +- .../Microsoft.Android.Sdk.ILLink.csproj | 3 +- .../BuildReleaseArm64XFormsDotNet.apkdesc | 110 +++++++++--------- 4 files changed, 71 insertions(+), 70 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 33b4096ba6d..548edd16819 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,20 +1,20 @@ - + https://github.com/dotnet/installer - dec120944450abb58bc07a2fcdae2f4383bfd6bf + e3ab0b5b8c29d8d882ab1bfe6a5a99a703622c7e - - https://github.com/dotnet/linker - c790896f128957acd2999208f44f09ae1e826c8c + + https://github.com/dotnet/runtime + ff7c19f266c835e3694a088c4a9e4e5a1ffb1b74 - + https://github.com/dotnet/runtime - 9529803ae29c2804880c6bd8ca710b8c037cb498 + ff7c19f266c835e3694a088c4a9e4e5a1ffb1b74 - + https://github.com/dotnet/emsdk - 0fe864fc71191ff4ee18e59ef0af2929ca367a11 + d7ff0aa47c680be543905cc1410e2f62b54dfefe diff --git a/eng/Versions.props b/eng/Versions.props index 926781e3a0a..c8776a79cd2 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -1,13 +1,13 @@ - 8.0.100-alpha.1.23080.11 - 8.0.100-1.23067.1 - 8.0.0-alpha.1.23080.2 + 8.0.100-preview.2.23123.10 + 8.0.0-preview.2.23123.4 + 8.0.0-preview.2.23123.4 7.0.0-beta.22103.1 7.0.0-beta.22103.1 - 8.0.0-alpha.1.23077.4 - $(MicrosoftNETWorkloadEmscriptenCurrentManifest80100alpha1Version) + 8.0.0-preview.2.23113.1 + $(MicrosoftNETWorkloadEmscriptenCurrentManifest80100preview2Version) 7.0.100-rc.1.22410.7 diff --git a/src/Microsoft.Android.Sdk.ILLink/Microsoft.Android.Sdk.ILLink.csproj b/src/Microsoft.Android.Sdk.ILLink/Microsoft.Android.Sdk.ILLink.csproj index 81a86470d19..fcb1091f3da 100644 --- a/src/Microsoft.Android.Sdk.ILLink/Microsoft.Android.Sdk.ILLink.csproj +++ b/src/Microsoft.Android.Sdk.ILLink/Microsoft.Android.Sdk.ILLink.csproj @@ -1,12 +1,13 @@  - $(DotNetStableTargetFramework) + $(DotNetTargetFramework) ILLINK false $(MicrosoftAndroidSdkOutDir) + diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Resources/Base/BuildReleaseArm64XFormsDotNet.apkdesc b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Resources/Base/BuildReleaseArm64XFormsDotNet.apkdesc index afcd83a9d39..b3fc11fd0e4 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Resources/Base/BuildReleaseArm64XFormsDotNet.apkdesc +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Resources/Base/BuildReleaseArm64XFormsDotNet.apkdesc @@ -5,136 +5,136 @@ "Size": 3568 }, "assemblies/_Microsoft.Android.Resource.Designer.dll": { - "Size": 1942 + "Size": 1940 }, "assemblies/FormsViewGroup.dll": { "Size": 7313 }, "assemblies/Java.Interop.dll": { - "Size": 66786 + "Size": 66563 }, "assemblies/Mono.Android.dll": { - "Size": 444703 + "Size": 444617 }, "assemblies/Mono.Android.Runtime.dll": { - "Size": 5895 + "Size": 5897 }, "assemblies/mscorlib.dll": { - "Size": 3857 + "Size": 3866 }, "assemblies/netstandard.dll": { - "Size": 5567 + "Size": 5579 }, "assemblies/rc.bin": { "Size": 1182 }, "assemblies/System.Collections.Concurrent.dll": { - "Size": 10529 + "Size": 11561 }, "assemblies/System.Collections.dll": { - "Size": 15258 + "Size": 15271 }, "assemblies/System.Collections.NonGeneric.dll": { - "Size": 7487 + "Size": 7499 }, "assemblies/System.ComponentModel.dll": { - "Size": 1964 + "Size": 1973 }, "assemblies/System.ComponentModel.Primitives.dll": { - "Size": 2579 + "Size": 2595 }, "assemblies/System.ComponentModel.TypeConverter.dll": { - "Size": 6069 + "Size": 6081 }, "assemblies/System.Console.dll": { - "Size": 6610 + "Size": 6623 }, "assemblies/System.Core.dll": { - "Size": 1982 + "Size": 1992 }, "assemblies/System.Diagnostics.TraceSource.dll": { - "Size": 6580 + "Size": 6591 }, "assemblies/System.dll": { - "Size": 2338 + "Size": 2347 }, "assemblies/System.Drawing.dll": { - "Size": 2023 + "Size": 2032 }, "assemblies/System.Drawing.Primitives.dll": { - "Size": 11996 + "Size": 12010 }, "assemblies/System.IO.Compression.dll": { - "Size": 16847 + "Size": 16858 }, "assemblies/System.IO.IsolatedStorage.dll": { - "Size": 9957 + "Size": 10011 }, "assemblies/System.Linq.dll": { - "Size": 19441 + "Size": 19453 }, "assemblies/System.Linq.Expressions.dll": { - "Size": 164128 + "Size": 164141 }, "assemblies/System.Net.Http.dll": { - "Size": 65982 + "Size": 66153 }, "assemblies/System.Net.Primitives.dll": { - "Size": 22441 + "Size": 22487 }, "assemblies/System.Net.Requests.dll": { - "Size": 3620 + "Size": 3630 }, "assemblies/System.ObjectModel.dll": { - "Size": 8144 + "Size": 8154 }, "assemblies/System.Private.CoreLib.dll": { - "Size": 808708 + "Size": 814216 }, "assemblies/System.Private.DataContractSerialization.dll": { - "Size": 192356 + "Size": 192370 }, "assemblies/System.Private.Uri.dll": { - "Size": 42878 + "Size": 42897 }, "assemblies/System.Private.Xml.dll": { - "Size": 216193 + "Size": 216180 }, "assemblies/System.Private.Xml.Linq.dll": { - "Size": 16662 + "Size": 16673 }, "assemblies/System.Runtime.dll": { - "Size": 2763 + "Size": 2774 }, "assemblies/System.Runtime.InteropServices.dll": { - "Size": 3753 + "Size": 3760 }, "assemblies/System.Runtime.Serialization.dll": { - "Size": 1943 + "Size": 1950 }, "assemblies/System.Runtime.Serialization.Formatters.dll": { - "Size": 2509 + "Size": 2517 }, "assemblies/System.Runtime.Serialization.Primitives.dll": { - "Size": 3791 + "Size": 3802 }, "assemblies/System.Security.Cryptography.dll": { - "Size": 7766 + "Size": 7781 }, "assemblies/System.Text.RegularExpressions.dll": { - "Size": 156677 + "Size": 157123 }, "assemblies/System.Xml.dll": { - "Size": 1833 + "Size": 1839 }, "assemblies/System.Xml.Linq.dll": { - "Size": 1856 + "Size": 1864 }, "assemblies/UnnamedProject.dll": { "Size": 5294 }, "assemblies/Xamarin.AndroidX.Activity.dll": { - "Size": 5870 + "Size": 5867 }, "assemblies/Xamarin.AndroidX.AppCompat.AppCompatResources.dll": { "Size": 6117 @@ -146,7 +146,7 @@ "Size": 6592 }, "assemblies/Xamarin.AndroidX.CoordinatorLayout.dll": { - "Size": 16404 + "Size": 16408 }, "assemblies/Xamarin.AndroidX.Core.dll": { "Size": 96738 @@ -158,16 +158,16 @@ "Size": 39951 }, "assemblies/Xamarin.AndroidX.Legacy.Support.Core.UI.dll": { - "Size": 5923 + "Size": 5924 }, "assemblies/Xamarin.AndroidX.Lifecycle.Common.dll": { "Size": 6391 }, "assemblies/Xamarin.AndroidX.Lifecycle.LiveData.Core.dll": { - "Size": 6459 + "Size": 6462 }, "assemblies/Xamarin.AndroidX.Lifecycle.ViewModel.dll": { - "Size": 3067 + "Size": 3068 }, "assemblies/Xamarin.AndroidX.Loader.dll": { "Size": 12473 @@ -176,7 +176,7 @@ "Size": 84804 }, "assemblies/Xamarin.AndroidX.SavedState.dll": { - "Size": 4866 + "Size": 4870 }, "assemblies/Xamarin.AndroidX.SwipeRefreshLayout.dll": { "Size": 10389 @@ -188,10 +188,10 @@ "Size": 528450 }, "assemblies/Xamarin.Forms.Platform.Android.dll": { - "Size": 337828 + "Size": 337831 }, "assemblies/Xamarin.Forms.Platform.dll": { - "Size": 11084 + "Size": 11080 }, "assemblies/Xamarin.Forms.Xaml.dll": { "Size": 60774 @@ -200,28 +200,28 @@ "Size": 40158 }, "classes.dex": { - "Size": 3141008 + "Size": 3127152 }, "lib/arm64-v8a/libmono-component-marshal-ilgen.so": { "Size": 93552 }, "lib/arm64-v8a/libmonodroid.so": { - "Size": 379320 + "Size": 379152 }, "lib/arm64-v8a/libmonosgen-2.0.so": { - "Size": 3090760 + "Size": 3106808 }, "lib/arm64-v8a/libSystem.IO.Compression.Native.so": { "Size": 723840 }, "lib/arm64-v8a/libSystem.Native.so": { - "Size": 94328 + "Size": 94280 }, "lib/arm64-v8a/libSystem.Security.Cryptography.Native.Android.so": { - "Size": 155056 + "Size": 154904 }, "lib/arm64-v8a/libxamarin-app.so": { - "Size": 333720 + "Size": 333760 }, "META-INF/android.support.design_material.version": { "Size": 12 @@ -1976,5 +1976,5 @@ "Size": 341228 } }, - "PackageSize": 7828228 + "PackageSize": 7820036 } \ No newline at end of file From d447bffd22a8369e7c3baa268c0e7a95da490644 Mon Sep 17 00:00:00 2001 From: Jonathan Pobst Date: Mon, 27 Feb 2023 17:46:13 -0600 Subject: [PATCH 05/22] [ci] Use AZDO built-in parallelization strategy. (#7804) [Previously](https://github.com/xamarin/xamarin-android/pull/6360), we split our `MSBuildIntegration` unit tests to run across multiple CI test agents. While a huge improvement, there are a few downsides to the approach we went with at the time: - The number of agents is hardcoded by copy/pasting steps in the CI YAML. - The tests must be manually load-balanced across agents with `[Category ("Node-X")]` in code which is cumbersome and hard to keep updated. As we are at the point where our tests have expanded well past the 1 hour target we are faced with needing to increase our parallelization. First, we can remove the YAML duplication by using AZDO's built-in `parallel` strategy, allowing us to control the number of agents to use with a single number: ```yaml - job: strategy: parallel: 4 ``` This leaves us the issue of automatically splitting our tests among an unknown number of test agents. A clever solution is [provided in the AZDO docs](https://learn.microsoft.com/en-us/azure/devops/pipelines/test/parallel-testing-any-test-runner?view=azure-devops): - Use `dotnet test --list-tests` to find all the tests - Use a script to calculate which tests the agent should run, based on `$(System.JobPositionInPhase)` and `$(System.TotalJobsInPhase)` - Pass those test names into `dotnet test` as a filter Unfortunately there are issues with the provided approach: - `dotnet test --list-tests` is not compatible with `--filter` so you have to run *all* tests in the test assembly which is not desirable for us. (https://github.com/dotnet/sdk/issues/8643) - Passing test names (including test parameters) on the command line hits limitations with escaping certain characters and argument limits. So the approach is good, but we have to do all the work ourselves. Enter [dotnet-test-slicer](https://github.com/jpobst/dotnet-test-slicer). This dotnet global tool: - Uses the `NUnit.Engine` NuGet package to find all tests in a test assembly using the desired filter query. - Slices the test list for the current test agent. - Outputs the desired tests into an NUnit-specific `.runsettings` file that can be passed to `dotnet test --settings foo.runsettings`, bypassing command line arguments. Voila! Now we can automatically scale our test agents up or down as needed by changing a single variable in our YAML file. Limitation: The tests are sliced in a round robin fashion. This can produce uneven results if test durations are uneven. A future optimization would be to store approximate test durations so tests can be load balanced more intelligently. --- build-tools/automation/azure-pipelines.yaml | 116 +------------ .../install-dotnet-test-slicer.yaml | 15 ++ .../setup-test-environment.yaml | 4 + .../stage-msbuild-emulator-tests.yaml | 152 ++++++++++++++++++ .../Tests/AotProfileTests.cs | 2 +- .../Tests/BundleToolTests.cs | 2 +- .../Tests/DebuggingTest.cs | 6 +- .../Tests/DeleteBinObjTest.cs | 2 +- .../Tests/DeploymentTest.cs | 2 +- .../Tests/InstallAndRunTests.cs | 2 +- .../Tests/InstallTests.cs | 2 +- .../Tests/InstantRunTest.cs | 2 +- .../Tests/MonoAndroidExportTest.cs | 2 +- .../Tests/PerformanceTest.cs | 1 - .../Tests/SystemApplicationTests.cs | 2 +- .../Tests/UncaughtExceptionTests.cs | 2 +- .../Tests/XASdkDeployTests.cs | 4 +- 17 files changed, 191 insertions(+), 127 deletions(-) create mode 100644 build-tools/automation/yaml-templates/install-dotnet-test-slicer.yaml create mode 100644 build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml diff --git a/build-tools/automation/azure-pipelines.yaml b/build-tools/automation/azure-pipelines.yaml index ef8c0138fbe..33a502ee5af 100644 --- a/build-tools/automation/azure-pipelines.yaml +++ b/build-tools/automation/azure-pipelines.yaml @@ -652,116 +652,12 @@ stages: nunit_categories: $(DotNetNUnitCategories) & TestCategory != SmokeTests target_framework: $(DotNetStableTargetFramework) provisionatorChannel: ${{ parameters.provisionatorChannel }} - -- stage: msbuilddevice_tests - displayName: MSBuild Emulator Tests - dependsOn: mac_build - condition: and(succeeded(), or(eq(variables['RunAllTests'], true), contains(dependencies.mac_build.outputs['mac_build_create_installers.TestConditions.TestAreas'], 'MSBuildDevice'))) - jobs: - # Check - "Xamarin.Android (macOS > Tests > MSBuild+Emulator One .NET #N)" - - template: yaml-templates/run-msbuild-device-tests.yaml - parameters: - node_id: 1 - job_name: mac_dotnetdevice_tests_1 - job_suffix: One .NET - nunit_categories: $(DotNetNUnitCategories) - target_framework: $(DotNetStableTargetFramework) - provisionatorChannel: ${{ parameters.provisionatorChannel }} - - - template: yaml-templates/run-msbuild-device-tests.yaml - parameters: - node_id: 2 - job_name: mac_dotnetdevice_tests_2 - job_suffix: One .NET - nunit_categories: $(DotNetNUnitCategories) - target_framework: $(DotNetStableTargetFramework) - provisionatorChannel: ${{ parameters.provisionatorChannel }} - - - template: yaml-templates/run-msbuild-device-tests.yaml - parameters: - node_id: 3 - job_name: mac_dotnetdevice_tests_3 - job_suffix: One .NET - nunit_categories: $(DotNetNUnitCategories) - target_framework: $(DotNetStableTargetFramework) - provisionatorChannel: ${{ parameters.provisionatorChannel }} - - - template: yaml-templates/run-msbuild-device-tests.yaml - parameters: - node_id: 4 - job_name: mac_dotnetdevice_tests_4 - job_suffix: One .NET - nunit_categories: $(DotNetNUnitCategories) - target_framework: $(DotNetStableTargetFramework) - provisionatorChannel: ${{ parameters.provisionatorChannel }} - - - job: wear_tests - displayName: macOS > Tests > WearOS - timeoutInMinutes: 180 - cancelTimeoutInMinutes: 2 - strategy: - matrix: - Android30-x86: - avdApiLevel: 30 - avdAbi: x86 - avdType: android-wear - deviceName: wear_square - pool: - vmImage: $(HostedMacImage) - workspace: - clean: all - steps: - - template: yaml-templates/setup-test-environment.yaml - parameters: - configuration: $(XA.Build.Configuration) - - - template: yaml-templates/run-xaprepare.yaml - parameters: - displayName: install required brew tools and prepare java.interop - arguments: --s=Required --auto-provision=yes --auto-provision-uses-sudo=yes - - - template: yaml-templates/run-xaprepare.yaml - parameters: - displayName: install emulator - arguments: --s=EmulatorTestDependencies - - - script: echo "##vso[task.setvariable variable=Java8SdkDirectory]$JAVA_HOME_8_X64" - displayName: set Java8SdkDirectory - - - task: DownloadPipelineArtifact@2 - inputs: - artifactName: $(TestAssembliesArtifactName) - downloadPath: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration) - - - task: MSBuild@1 - displayName: install and launch emulator - inputs: - solution: tests/Mono.Android-Tests/Mono.Android-Tests.csproj - configuration: $(XA.Build.Configuration) - msbuildArguments: /t:InstallAvdImage;AcquireAndroidTarget /p:TestDeviceName=$(deviceName) /p:TestAvdApiLevel=$(avdApiLevel) /p:TestAvdAbi=$(avdAbi) /p:TestAvdType=$(avdType) /bl:$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/install-emulator-$(avdApiLevel).binlog - - - template: yaml-templates/run-nunit-tests.yaml - parameters: - testRunTitle: WearOS On Device - macOS - testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/MSBuildDeviceIntegration/$(DotNetStableTargetFramework)/MSBuildDeviceIntegration.dll - dotNetTestExtraArgs: --filter "TestCategory = WearOS" - testResultsFile: TestResult-WearOS--$(XA.Build.Configuration).xml - - - task: MSBuild@1 - displayName: shut down emulator - inputs: - solution: tests/Mono.Android-Tests/Mono.Android-Tests.csproj - configuration: $(XA.Build.Configuration) - msbuildArguments: /t:AcquireAndroidTarget,ReleaseAndroidTarget /p:TestDeviceName=$(deviceName) /p:TestAvdApiLevel=$(avdApiLevel) /p:TestAvdAbi=$(avdAbi) /p:TestAvdType=$(avdType) /bl:$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/shutdown-emulator.binlog - condition: always() - - - template: yaml-templates/upload-results.yaml - parameters: - configuration: $(XA.Build.Configuration) - artifactName: Test Results - Emulator $(avdApiLevel)-$(avdAbi)-$(avdType) - macOS - - - template: yaml-templates/fail-on-issue.yaml - + +- template: yaml-templates/stage-msbuild-emulator-tests.yaml + parameters: + provisionatorChannel: ${{ parameters.provisionatorChannel }} + stageCondition: and(succeeded(), or(eq(variables['RunAllTests'], true), contains(dependencies.mac_build.outputs['mac_build_create_installers.TestConditions.TestAreas'], 'MSBuildDevice'))) + nunit_categories: '& cat != DotNetIgnore & cat != HybridAOT & cat != MkBundle & cat != MonoSymbolicate & cat != PackagesConfig & cat != StaticProject & cat != SystemApplication' - stage: bcl_tests displayName: BCL Emulator Tests diff --git a/build-tools/automation/yaml-templates/install-dotnet-test-slicer.yaml b/build-tools/automation/yaml-templates/install-dotnet-test-slicer.yaml new file mode 100644 index 00000000000..0073fa34537 --- /dev/null +++ b/build-tools/automation/yaml-templates/install-dotnet-test-slicer.yaml @@ -0,0 +1,15 @@ +parameters: + version: '0.1.0-alpha1' + condition: succeeded() + continueOnError: true + +steps: +- powershell: dotnet tool uninstall dotnet-test-slicer -g + displayName: uninstall dotnet-test-slicer + ignoreLASTEXITCODE: true + condition: ${{ parameters.condition }} + +- script: dotnet tool update dotnet-test-slicer --version ${{ parameters.version }} --add-source https://api.nuget.org/v3/index.json -g + displayName: install dotnet-test-slicer ${{ parameters.version }} + condition: ${{ parameters.condition }} + continueOnError: ${{ parameters.continueOnError }} diff --git a/build-tools/automation/yaml-templates/setup-test-environment.yaml b/build-tools/automation/yaml-templates/setup-test-environment.yaml index 727499dc2b6..63dbd94e598 100644 --- a/build-tools/automation/yaml-templates/setup-test-environment.yaml +++ b/build-tools/automation/yaml-templates/setup-test-environment.yaml @@ -7,6 +7,7 @@ parameters: updateVS: false jdkTestFolder: $(JAVA_HOME_11_X64) remove_dotnet: false + installTestSlicer: false steps: - checkout: self @@ -101,3 +102,6 @@ steps: arguments: -t:ExtractWorkloadPacks -c ${{ parameters.configuration }} -v:n -bl:${{ parameters.xaSourcePath }}/bin/Test${{ parameters.configuration }}/extract-workloads.binlog - template: install-apkdiff.yaml + +- ${{ if eq(parameters.installTestSlicer, true) }}: + - template: install-dotnet-test-slicer.yaml diff --git a/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml b/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml new file mode 100644 index 00000000000..2438d9af305 --- /dev/null +++ b/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml @@ -0,0 +1,152 @@ +# Runs MSBuild tests against a device running on macOS + +parameters: + job_name: 'mac_dotnetdevice_tests' + agent_count: 6 + nunit_categories: $(DotNetNUnitCategories) + target_framework: $(DotNetStableTargetFramework) + provisionatorChannel: latest + stageCondition: succeeded() + jobCondition: succeeded() + +stages: +- stage: msbuilddevice_tests + displayName: MSBuild Emulator Tests + dependsOn: mac_build + condition: ${{ parameters.stageCondition }} + jobs: + - job: ${{ parameters.job_name }} + strategy: + parallel: ${{ parameters.agent_count }} + displayName: "macOS > Tests > MSBuild+Emulator" + condition: ${{ parameters.jobCondition }} + pool: + vmImage: $(HostedMacImage) + timeoutInMinutes: 90 + cancelTimeoutInMinutes: 5 + workspace: + clean: all + steps: + - template: setup-test-environment.yaml + parameters: + provisionClassic: false + provisionatorChannel: ${{ parameters.provisionatorChannel }} + installTestSlicer: true + + - template: run-xaprepare.yaml + parameters: + displayName: install emulator + arguments: --s=EmulatorTestDependencies --android-sdk-platforms="19,21,26,32,33" + + - task: DownloadPipelineArtifact@2 + inputs: + artifactName: $(TestAssembliesArtifactName) + downloadPath: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration) + + - pwsh: | + dotnet-test-slicer ` + --test-assembly="$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/MSBuildDeviceIntegration/${{ parameters.target_framework }}/MSBuildDeviceIntegration.dll" ` + --test-filter="cat != TimeZoneInfo & cat != Localization ${{ parameters.nunit_categories }}" ` + --slice-number=$(System.JobPositionInPhase) ` + --total-slices=$(System.TotalJobsInPhase) ` + --outfile="$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/MSBuildDeviceIntegration/${{ parameters.target_framework }}/MSBuildDeviceIntegration.runsettings" + displayName: Slice unit tests + + - task: MSBuild@1 + displayName: start emulator + inputs: + solution: tests/Mono.Android-Tests/Mono.Android-Tests.csproj + configuration: $(XA.Build.Configuration) + msbuildArguments: /t:AcquireAndroidTarget /bl:$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/start-emulator.binlog + + - template: run-nunit-tests.yaml + parameters: + useDotNet: true + testRunTitle: MSBuildDeviceIntegration On Device - macOS-$(System.JobPositionInPhase) + testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/MSBuildDeviceIntegration/${{ parameters.target_framework }}/MSBuildDeviceIntegration.dll + dotNetTestExtraArgs: --settings "$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/MSBuildDeviceIntegration/${{ parameters.target_framework }}/MSBuildDeviceIntegration.runsettings" + testResultsFile: TestResult-MSBuildDeviceIntegration-${{ parameters.job_name }}-$(System.JobPositionInPhase)-$(XA.Build.Configuration).xml + + - task: MSBuild@1 + displayName: shut down emulator + inputs: + solution: tests/Mono.Android-Tests/Mono.Android-Tests.csproj + configuration: $(XA.Build.Configuration) + msbuildArguments: >- + /t:AcquireAndroidTarget,ReleaseAndroidTarget + /bl:$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/shutdown-emulator.binlog + condition: always() + + - template: upload-results.yaml + parameters: + artifactName: Test Results - MSBuild With Emulator - macOS-$(System.JobPositionInPhase) + + - template: fail-on-issue.yaml + + - job: wear_tests + displayName: macOS > Tests > WearOS + timeoutInMinutes: 180 + cancelTimeoutInMinutes: 2 + strategy: + matrix: + Android30-x86: + avdApiLevel: 30 + avdAbi: x86 + avdType: android-wear + deviceName: wear_square + pool: + vmImage: $(HostedMacImage) + workspace: + clean: all + steps: + - template: setup-test-environment.yaml + parameters: + configuration: $(XA.Build.Configuration) + + - template: run-xaprepare.yaml + parameters: + displayName: install required brew tools and prepare java.interop + arguments: --s=Required --auto-provision=yes --auto-provision-uses-sudo=yes + + - template: run-xaprepare.yaml + parameters: + displayName: install emulator + arguments: --s=EmulatorTestDependencies + + - script: echo "##vso[task.setvariable variable=Java8SdkDirectory]$JAVA_HOME_8_X64" + displayName: set Java8SdkDirectory + + - task: DownloadPipelineArtifact@2 + inputs: + artifactName: $(TestAssembliesArtifactName) + downloadPath: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration) + + - task: MSBuild@1 + displayName: install and launch emulator + inputs: + solution: tests/Mono.Android-Tests/Mono.Android-Tests.csproj + configuration: $(XA.Build.Configuration) + msbuildArguments: /t:InstallAvdImage;AcquireAndroidTarget /p:TestDeviceName=$(deviceName) /p:TestAvdApiLevel=$(avdApiLevel) /p:TestAvdAbi=$(avdAbi) /p:TestAvdType=$(avdType) /bl:$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/install-emulator-$(avdApiLevel).binlog + + - template: run-nunit-tests.yaml + parameters: + testRunTitle: WearOS On Device - macOS + testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/MSBuildDeviceIntegration/$(DotNetStableTargetFramework)/MSBuildDeviceIntegration.dll + dotNetTestExtraArgs: --filter "TestCategory = WearOS" + testResultsFile: TestResult-WearOS--$(XA.Build.Configuration).xml + + - task: MSBuild@1 + displayName: shut down emulator + inputs: + solution: tests/Mono.Android-Tests/Mono.Android-Tests.csproj + configuration: $(XA.Build.Configuration) + msbuildArguments: /t:AcquireAndroidTarget,ReleaseAndroidTarget /p:TestDeviceName=$(deviceName) /p:TestAvdApiLevel=$(avdApiLevel) /p:TestAvdAbi=$(avdAbi) /p:TestAvdType=$(avdType) /bl:$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/shutdown-emulator.binlog + condition: always() + + - template: upload-results.yaml + parameters: + configuration: $(XA.Build.Configuration) + artifactName: Test Results - Emulator $(avdApiLevel)-$(avdAbi)-$(avdType) - macOS + + - template: fail-on-issue.yaml + diff --git a/tests/MSBuildDeviceIntegration/Tests/AotProfileTests.cs b/tests/MSBuildDeviceIntegration/Tests/AotProfileTests.cs index 3ca51ac00a2..151ece0ba6c 100644 --- a/tests/MSBuildDeviceIntegration/Tests/AotProfileTests.cs +++ b/tests/MSBuildDeviceIntegration/Tests/AotProfileTests.cs @@ -6,7 +6,7 @@ namespace Xamarin.Android.Build.Tests { - [Category ("UsesDevice"), Category ("AOT"), Category ("ProfiledAOT"), Category ("Node-3")] + [Category ("UsesDevice"), Category ("AOT"), Category ("ProfiledAOT")] public class AotProfileTests : DeviceTest { diff --git a/tests/MSBuildDeviceIntegration/Tests/BundleToolTests.cs b/tests/MSBuildDeviceIntegration/Tests/BundleToolTests.cs index 8242981e58e..1c94a4bc95a 100644 --- a/tests/MSBuildDeviceIntegration/Tests/BundleToolTests.cs +++ b/tests/MSBuildDeviceIntegration/Tests/BundleToolTests.cs @@ -11,7 +11,7 @@ namespace Xamarin.Android.Build.Tests { [TestFixture] [TestFixtureSource(nameof(FixtureArgs))] - [Category ("Node-1"), Category ("XamarinBuildDownload")] + [Category ("XamarinBuildDownload")] public class BundleToolTests : DeviceTest { static readonly object[] FixtureArgs = { diff --git a/tests/MSBuildDeviceIntegration/Tests/DebuggingTest.cs b/tests/MSBuildDeviceIntegration/Tests/DebuggingTest.cs index 878cfdf6dcd..89afd11dae3 100755 --- a/tests/MSBuildDeviceIntegration/Tests/DebuggingTest.cs +++ b/tests/MSBuildDeviceIntegration/Tests/DebuggingTest.cs @@ -46,7 +46,6 @@ int FindTextInFile (string file, string text) } [Test] - [Category ("Node-3")] public void ApplicationRunsWithoutDebugger ([Values (false, true)] bool isRelease, [Values (false, true)] bool extractNativeLibs, [Values (false, true)] bool useEmbeddedDex) { AssertHasDevices (); @@ -84,7 +83,6 @@ public void ApplicationRunsWithoutDebugger ([Values (false, true)] bool isReleas } [Test] - [Category ("Node-3")] public void ClassLibraryMainLauncherRuns ([Values (true, false)] bool preloadAssemblies) { AssertHasDevices (); @@ -169,7 +167,7 @@ public void ClassLibraryMainLauncherRuns ([Values (true, false)] bool preloadAss }; #pragma warning restore 414 - [Test, Category ("Debugger"), Category ("Node-4")] + [Test, Category ("Debugger")] [TestCaseSource (nameof (DebuggerCustomAppTestCases))] [Retry(5)] public void CustomApplicationRunsWithDebuggerAndBreaks (bool embedAssemblies, string fastDevType, bool activityStarts) @@ -347,7 +345,7 @@ public override void OnCreate () }; #pragma warning restore 414 - [Test, Category ("SmokeTests"), Category ("Debugger"), Category ("Node-4")] + [Test, Category ("SmokeTests"), Category ("Debugger")] [TestCaseSource (nameof(DebuggerTestCases))] [Retry (5)] public void ApplicationRunsWithDebuggerAndBreaks (bool embedAssemblies, string fastDevType, bool allowDeltaInstall, string username, string debugType) diff --git a/tests/MSBuildDeviceIntegration/Tests/DeleteBinObjTest.cs b/tests/MSBuildDeviceIntegration/Tests/DeleteBinObjTest.cs index aeee3a0150d..85cecea4c96 100644 --- a/tests/MSBuildDeviceIntegration/Tests/DeleteBinObjTest.cs +++ b/tests/MSBuildDeviceIntegration/Tests/DeleteBinObjTest.cs @@ -6,7 +6,7 @@ namespace Xamarin.Android.Build.Tests { [TestFixture] - [Category ("DotNetIgnore"), Category ("Node-1")] // .csproj files are legacy projects that won't build under dotnet + [Category ("DotNetIgnore")] // .csproj files are legacy projects that won't build under dotnet public class DeleteBinObjTest : DeviceTest { const string BaseUrl = "https://github.com/dellis1972/xamarin-android-unittest-files/blob/main/"; diff --git a/tests/MSBuildDeviceIntegration/Tests/DeploymentTest.cs b/tests/MSBuildDeviceIntegration/Tests/DeploymentTest.cs index 688814fccf1..17e6982a6ea 100644 --- a/tests/MSBuildDeviceIntegration/Tests/DeploymentTest.cs +++ b/tests/MSBuildDeviceIntegration/Tests/DeploymentTest.cs @@ -20,7 +20,7 @@ namespace Xamarin.Android.Build.Tests { [TestFixture] - [Category ("UsesDevice"), Category ("Node-2")] + [Category ("UsesDevice")] [NonParallelizable] public class DeploymentTest : DeviceTest { diff --git a/tests/MSBuildDeviceIntegration/Tests/InstallAndRunTests.cs b/tests/MSBuildDeviceIntegration/Tests/InstallAndRunTests.cs index f1ab011b0ee..74054ded00c 100644 --- a/tests/MSBuildDeviceIntegration/Tests/InstallAndRunTests.cs +++ b/tests/MSBuildDeviceIntegration/Tests/InstallAndRunTests.cs @@ -8,7 +8,7 @@ namespace Xamarin.Android.Build.Tests { [TestFixture] - [Category ("UsesDevice"), Category ("Node-2")] + [Category ("UsesDevice")] public class InstallAndRunTests : DeviceTest { static ProjectBuilder builder; diff --git a/tests/MSBuildDeviceIntegration/Tests/InstallTests.cs b/tests/MSBuildDeviceIntegration/Tests/InstallTests.cs index 7161e21b5f2..582f5d0a1c1 100644 --- a/tests/MSBuildDeviceIntegration/Tests/InstallTests.cs +++ b/tests/MSBuildDeviceIntegration/Tests/InstallTests.cs @@ -12,7 +12,7 @@ namespace Xamarin.Android.Build.Tests { [TestFixture] - [Category ("Commercial"), Category ("UsesDevice"), Category ("Node-1")] + [Category ("Commercial"), Category ("UsesDevice")] public class InstallTests : DeviceTest { string GetContentFromAllOverrideDirectories (string packageName, bool useRunAsCommand = true) diff --git a/tests/MSBuildDeviceIntegration/Tests/InstantRunTest.cs b/tests/MSBuildDeviceIntegration/Tests/InstantRunTest.cs index 6605cba3a8d..daeccc6d9aa 100644 --- a/tests/MSBuildDeviceIntegration/Tests/InstantRunTest.cs +++ b/tests/MSBuildDeviceIntegration/Tests/InstantRunTest.cs @@ -7,7 +7,7 @@ namespace Xamarin.Android.Build.Tests { [TestFixture] - [Category ("Commercial"), Category ("UsesDevice"), Category ("Node-3")] + [Category ("Commercial"), Category ("UsesDevice")] public class InstantRunTest : DeviceTest { [Test] diff --git a/tests/MSBuildDeviceIntegration/Tests/MonoAndroidExportTest.cs b/tests/MSBuildDeviceIntegration/Tests/MonoAndroidExportTest.cs index 115c608077f..3b55b461388 100644 --- a/tests/MSBuildDeviceIntegration/Tests/MonoAndroidExportTest.cs +++ b/tests/MSBuildDeviceIntegration/Tests/MonoAndroidExportTest.cs @@ -12,7 +12,7 @@ namespace Xamarin.Android.Build.Tests { [TestFixture] - [Category ("UsesDevice"), Category ("Node-1")] + [Category ("UsesDevice")] public class MonoAndroidExportTest : DeviceTest { #pragma warning disable 414 static object [] MonoAndroidExportTestCases = new object [] { diff --git a/tests/MSBuildDeviceIntegration/Tests/PerformanceTest.cs b/tests/MSBuildDeviceIntegration/Tests/PerformanceTest.cs index 4c4dea9ead0..e7e811eea17 100644 --- a/tests/MSBuildDeviceIntegration/Tests/PerformanceTest.cs +++ b/tests/MSBuildDeviceIntegration/Tests/PerformanceTest.cs @@ -11,7 +11,6 @@ namespace Xamarin.Android.Build.Tests { [TestFixture] - [Category ("Node-2")] public class PerformanceTest : DeviceTest { const int Retry = 2; diff --git a/tests/MSBuildDeviceIntegration/Tests/SystemApplicationTests.cs b/tests/MSBuildDeviceIntegration/Tests/SystemApplicationTests.cs index aec87827786..63f4eeb5db5 100644 --- a/tests/MSBuildDeviceIntegration/Tests/SystemApplicationTests.cs +++ b/tests/MSBuildDeviceIntegration/Tests/SystemApplicationTests.cs @@ -11,7 +11,7 @@ namespace Xamarin.Android.Build.Tests { [TestFixture] - [Category ("Commercial"), Category ("UsesDevice"), Category ("Node-1")] + [Category ("Commercial"), Category ("UsesDevice")] public class SystemApplicationTests : DeviceTest { // All Tests here require the emulator to be started with -writable-system diff --git a/tests/MSBuildDeviceIntegration/Tests/UncaughtExceptionTests.cs b/tests/MSBuildDeviceIntegration/Tests/UncaughtExceptionTests.cs index 167c60238d2..cbd646f55c8 100644 --- a/tests/MSBuildDeviceIntegration/Tests/UncaughtExceptionTests.cs +++ b/tests/MSBuildDeviceIntegration/Tests/UncaughtExceptionTests.cs @@ -8,7 +8,7 @@ namespace Xamarin.Android.Build.Tests { [TestFixture] - [Category ("UsesDevice"), Category ("Node-3")] + [Category ("UsesDevice")] public class UncaughtExceptionTests : DeviceTest { class LogcatLine diff --git a/tests/MSBuildDeviceIntegration/Tests/XASdkDeployTests.cs b/tests/MSBuildDeviceIntegration/Tests/XASdkDeployTests.cs index aeb8ea6764d..ea14979cc75 100644 --- a/tests/MSBuildDeviceIntegration/Tests/XASdkDeployTests.cs +++ b/tests/MSBuildDeviceIntegration/Tests/XASdkDeployTests.cs @@ -16,7 +16,7 @@ namespace Xamarin.Android.Build.Tests { [TestFixture] - [Category ("UsesDevice"), Category ("SmokeTests"), Category ("WearOS"), Category ("Node-3")] + [Category ("UsesDevice"), Category ("SmokeTests"), Category ("WearOS")] public class XASdkDeployTests : DeviceTest { static object [] DotNetInstallAndRunSource = new object [] { @@ -209,7 +209,7 @@ public void SupportDesugaringStaticInterfaceMethods () } [Test] - [Category ("Debugger"), Category ("Node-4")] + [Category ("Debugger")] public void DotNetDebug ([Values("net6.0-android", "net7.0-android")] string targetFramework) { AssertCommercialBuild (); From c9918efe60bb545c4d51f0dcfd7f80140701cfac Mon Sep 17 00:00:00 2001 From: Jonathan Pryor Date: Tue, 28 Feb 2023 08:32:10 -0500 Subject: [PATCH 06/22] Bump to xamarin/java.interop/main@77800dda (#7824) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes: https://github.com/xamarin/java.interop/compare/bbaeda6f698369bdd48bfc2dd1a32a41c9d23229...77800dda83c2db4d90b501c00069abc9880caaeb * xamarin/java.interop@77800dda: [Java.Interop.Tools.Expressions] Add Java.Interop.Tools.Expressions (xamarin/java.interop#1046) Remember `jnimarshalmethod-gen.exe`? (0140ab83, d5b2ece6, 106a6211, …) It never made it to completion, was never stable enough to be used, even though we did add a "public" *documented* `$(AndroidGenerateJniMarshalMethods)` MSBuild property to control it… `jnimarshalmethod-gen.exe` never made it to .NET Android, as it required .NET Framework features which didn't make it to .NET Core. xamarin/java.interop@77800dda updates `jnimarshalmethod-gen` to drop support for building on .NET Framework 4.7.2, and adds support to build it for .NET 7. Update `build-tools/installers/create-installers.targets` so that `jnimarshalmethod-gen.exe` is no longer included in the Classic installers (which are increasingly moot anyway; see also 618bd4ab). Remove generation of `Java.Runtime.Environment.dll.config`, as that file was only supported when using Mono, which won't be the case under .NET 7. Update the `_GenerateJniMarshalMethods` target so that it ``s when `$(AndroidGenerateJniMarshalMethods)` is True. While `jnimarshalmethod-gen.dll` may run on .NET 7 now, @jonpryor doesn't want to deal with the *integration* work to see if it is usable on .NET Android, especially considering that the Classic version didn't work either! (That integration effort is for "later".) --- .../installers/create-installers.targets | 6 ----- .../scripts/JavaInteropDllConfigs.targets | 26 ------------------- external/Java.Interop | 2 +- .../Xamarin.Android.Common.targets | 17 +----------- src/monodroid/monodroid.csproj | 10 ------- src/monodroid/monodroid.targets | 3 +-- .../Directory.Build.targets | 9 ------- ...orms.Performance.Integration.Droid.targets | 6 ----- 8 files changed, 3 insertions(+), 76 deletions(-) delete mode 100644 build-tools/scripts/JavaInteropDllConfigs.targets diff --git a/build-tools/installers/create-installers.targets b/build-tools/installers/create-installers.targets index d8880a6ab2f..39b34ef30e3 100644 --- a/build-tools/installers/create-installers.targets +++ b/build-tools/installers/create-installers.targets @@ -155,12 +155,6 @@ <_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)jcw-gen.pdb" /> <_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)jit-times.exe" /> <_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)jit-times.pdb" /> - <_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)jnimarshalmethod-gen.exe" /> - <_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)jnimarshalmethod-gen.pdb" /> - <_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)Java.Interop.dll.config" /> - <_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)Java.Runtime.Environment.dll" /> - <_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)Java.Runtime.Environment.pdb" /> - <_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)Java.Runtime.Environment.dll.config" Condition=" '$(HostOS)' != 'Windows' " /> <_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)logcat-parse.exe" /> <_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)logcat-parse.pdb" /> <_LegacyJIFiles Include="$(LegacyMSBuildSrcDir)Mono.CSharp.dll" /> diff --git a/build-tools/scripts/JavaInteropDllConfigs.targets b/build-tools/scripts/JavaInteropDllConfigs.targets deleted file mode 100644 index b78f6e0fa91..00000000000 --- a/build-tools/scripts/JavaInteropDllConfigs.targets +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - <_DllMaps>@(_JavaInteropDllMapContent->'%(Identity)', '%0a ') - - - - diff --git a/external/Java.Interop b/external/Java.Interop index bbaeda6f698..77800dda83c 160000 --- a/external/Java.Interop +++ b/external/Java.Interop @@ -1 +1 @@ -Subproject commit bbaeda6f698369bdd48bfc2dd1a32a41c9d23229 +Subproject commit 77800dda83c2db4d90b501c00069abc9880caaeb diff --git a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets index 060d670a696..1d63c65c6a0 100644 --- a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets +++ b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets @@ -1456,22 +1456,7 @@ because xbuild doesn't support framework reference assemblies. DependsOnTargets="_GetReferenceAssemblyPaths;_SetLatestTargetFrameworkVersion" Inputs="$(_AndroidBuildPropertiesCache);@(ResolvedUserAssemblies)" Outputs="$(_AndroidStampDirectory)_GenerateJniMarshalMethods.stamp"> - - <_JniFrameworkAssembly Include="Mono.Android.dll" /> - <_JniFrameworkAssembly Include="OpenTK.dll" /> - <_JniFrameworkAssembly Include="Xamarin.Android.NUnitLite.dll" /> - <_AssembliesToProcess Include="@(ResolvedUserAssemblies)" /> - <_AssembliesToProcess Include="@(ResolvedFrameworkAssemblies)" Condition=" '%(Filename)' == '@(_JniFrameworkAssembly->'%(Filename)')' " /> - - - - - - - - + diff --git a/src/monodroid/monodroid.csproj b/src/monodroid/monodroid.csproj index 7e68ca4f678..c4dbc2d7b5c 100644 --- a/src/monodroid/monodroid.csproj +++ b/src/monodroid/monodroid.csproj @@ -17,15 +17,5 @@ - - diff --git a/src/monodroid/monodroid.targets b/src/monodroid/monodroid.targets index d157bb0a0f8..08a94631e20 100644 --- a/src/monodroid/monodroid.targets +++ b/src/monodroid/monodroid.targets @@ -3,7 +3,6 @@ - @@ -207,7 +206,7 @@ diff --git a/tests/Mono.Android-Tests/Directory.Build.targets b/tests/Mono.Android-Tests/Directory.Build.targets index c10fba5a277..353ac12a59c 100644 --- a/tests/Mono.Android-Tests/Directory.Build.targets +++ b/tests/Mono.Android-Tests/Directory.Build.targets @@ -24,13 +24,4 @@ - - - - - - diff --git a/tests/Xamarin.Forms-Performance-Integration/Droid/Xamarin.Forms.Performance.Integration.Droid.targets b/tests/Xamarin.Forms-Performance-Integration/Droid/Xamarin.Forms.Performance.Integration.Droid.targets index 1b201ecdd72..c5a5e4d97b7 100644 --- a/tests/Xamarin.Forms-Performance-Integration/Droid/Xamarin.Forms.Performance.Integration.Droid.targets +++ b/tests/Xamarin.Forms-Performance-Integration/Droid/Xamarin.Forms.Performance.Integration.Droid.targets @@ -2,10 +2,4 @@ - - - From 922a369758a70b22937be3647b4f8af3acc57caa Mon Sep 17 00:00:00 2001 From: Marek Habersack Date: Tue, 28 Feb 2023 16:09:00 +0100 Subject: [PATCH 07/22] [monodroid] Properly process satellite assemblies (#7823) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: https://github.com/xamarin/xamarin-android/issues/7819 Our native runtime uses a cache of pointers to loaded managed assembly images (essentially an array of the native `struct MonoImage` pointers) which is pre-allocated at build time and placed in the native `libxamarin-app.so` library. While generating the cache, we also generate hashes for a number of assembly name permutations (currently two per assembly: with and without the extension). Only unique assembly names are considered when generating the cache (it's possible to have duplicate names, because we package more than one copy of some assemblies - those which are architecture specific). This algorithm had a bug which made it ignore culture prefix in satellite assembly names (e.g. `en/MyAssembly.resources.dll`); instead of several entries for each culture, we generated only two entries (e.g. `MyAssembly.resources.dll` and `MyAssembly.resources`) but we still counted each culture-prefixed assembly and stored that number in `libxamarin-app.so` to be used at runtime to calculate number of entries in the cache. This made the array storing cached `MonoImage*` pointers to be smaller than the number of actual assemblies in the APK times 2 and in some cases we failed to look up pointer to some images and, as the result, passed a `NULL` pointer to MonoVM which then caused a segmentation fault trying to dereference the pointer: F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x000000000000001c F DEBUG : Cause: null pointer dereference … F DEBUG : #00 pc 00000000000bdad8 /data/app/~~7gCkYmQcKwTyS9NmxfgKxA==/com.companyname.bubby-PJIkJ0Lv0RiQhEVLeWi4wg==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (mono_class_get_checked+24) (BuildId: 80b786675a56824331f363bf29a2b54f454cf006) Update the `` task to stop ignoring the culture prefix for satellite assemblies in order to avoid the situation. Additionally, since the previous assumption that MonoVM will validate all pointers passed to its APIs turned out to be unwarranted, we now check more carefully for `NULL` pointers when trying to obtain a native function pointer from the MonoVM runtime. Add a test for the issue, based on the `MissingSatelliteAssemblyInLibrary()` packaging test which, when it fails, will result in a `SIGABRT`: D monodroid-assembly: assembly_store_open_from_bundles: looking for bundled name: 'System.Private.CoreLib' (hash 0x6b0ff375198b9c17) F monodroid-assembly: Invalid assembly index 19, exceeds the maximum index of 11 F libc : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 17957 (semblyinlibrary), pid 17957 (semblyinlibrary) Enhance the packaging test `MissingSatelliteAssemblyInLibrary()` by adding more languages, to see if they're all packaged correctly. --- .../Tasks/GeneratePackageManagerJava.cs | 4 +- .../PackagingTest.cs | 17 +++++-- .../MarshalMethodsNativeAssemblyGenerator.cs | 3 +- .../jni/xamarin-android-app-context.cc | 12 ++--- .../Tests/InstallAndRunTests.cs | 47 +++++++++++++++++++ 5 files changed, 69 insertions(+), 14 deletions(-) diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/GeneratePackageManagerJava.cs b/src/Xamarin.Android.Build.Tasks/Tasks/GeneratePackageManagerJava.cs index f9616ef190d..83594593445 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/GeneratePackageManagerJava.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/GeneratePackageManagerJava.cs @@ -265,7 +265,9 @@ void AddEnvironment () HashSet archAssemblyNames = null; HashSet uniqueAssemblyNames = new HashSet (StringComparer.OrdinalIgnoreCase); Action updateAssemblyCount = (ITaskItem assembly) => { - string assemblyName = Path.GetFileName (assembly.ItemSpec); + // We need to use the 'RelativePath' metadata, if found, because it will give us the correct path for satellite assemblies - with the culture in the path. + string? relativePath = assembly.GetMetadata ("RelativePath"); + string assemblyName = String.IsNullOrEmpty (relativePath) ? Path.GetFileName (assembly.ItemSpec) : relativePath; if (!uniqueAssemblyNames.Contains (assemblyName)) { uniqueAssemblyNames.Add (assemblyName); } diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/PackagingTest.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/PackagingTest.cs index f69eeb8b5c1..ef3db27cad6 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/PackagingTest.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/PackagingTest.cs @@ -807,12 +807,18 @@ public void MissingSatelliteAssemblyInLibrary () new BuildItem ("EmbeddedResource", "Foo.resx") { TextContent = () => InlineData.ResxWithContents ("Cancel") }, - new BuildItem ("EmbeddedResource", "Foo.es.resx") { - TextContent = () => InlineData.ResxWithContents ("Cancelar") - } } }; + var languages = new string[] {"es", "de", "fr", "he", "it", "pl", "pt", "ru", "sl" }; + foreach (string lang in languages) { + lib.OtherBuildItems.Add ( + new BuildItem ("EmbeddedResource", $"Foo.{lang}.resx") { + TextContent = () => InlineData.ResxWithContents ($"{lang}") + } + ); + } + var app = new XamarinAndroidApplicationProject { IsRelease = true, }; @@ -829,7 +835,10 @@ public void MissingSatelliteAssemblyInLibrary () var apk = Path.Combine (Root, appBuilder.ProjectDirectory, app.OutputPath, $"{app.PackageName}-Signed.apk"); var helper = new ArchiveAssemblyHelper (apk); - Assert.IsTrue (helper.Exists ($"assemblies/es/{lib.ProjectName}.resources.dll"), "Apk should contain satellite assemblies!"); + + foreach (string lang in languages) { + Assert.IsTrue (helper.Exists ($"assemblies/{lang}/{lib.ProjectName}.resources.dll"), $"Apk should contain satellite assembly for language '{lang}'!"); + } } } diff --git a/src/Xamarin.Android.Build.Tasks/Utilities/MarshalMethodsNativeAssemblyGenerator.cs b/src/Xamarin.Android.Build.Tasks/Utilities/MarshalMethodsNativeAssemblyGenerator.cs index 5c94e9b6e27..50aec79c9ed 100644 --- a/src/Xamarin.Android.Build.Tasks/Utilities/MarshalMethodsNativeAssemblyGenerator.cs +++ b/src/Xamarin.Android.Build.Tasks/Utilities/MarshalMethodsNativeAssemblyGenerator.cs @@ -816,7 +816,8 @@ void WriteHashes () where T: struct uint index = 0; foreach (string name in uniqueAssemblyNames) { - string clippedName = Path.GetFileNameWithoutExtension (name); + // We must make sure we keep the possible culture prefix, which will be treated as "directory" path here + string clippedName = Path.Combine (Path.GetDirectoryName (name) ?? String.Empty, Path.GetFileNameWithoutExtension (name)); ulong hashFull = HashName (name, is64Bit); ulong hashClipped = HashName (clippedName, is64Bit); diff --git a/src/monodroid/jni/xamarin-android-app-context.cc b/src/monodroid/jni/xamarin-android-app-context.cc index 3654491b944..c1c401880e9 100644 --- a/src/monodroid/jni/xamarin-android-app-context.cc +++ b/src/monodroid/jni/xamarin-android-app-context.cc @@ -13,7 +13,7 @@ MonodroidRuntime::get_method_name (uint32_t mono_image_index, uint32_t method_to { uint64_t id = (static_cast(mono_image_index) << 32) | method_token; - log_debug (LOG_ASSEMBLY, "Looking for name of method with id 0x%llx, in mono image at index %u", id, mono_image_index); + log_debug (LOG_ASSEMBLY, "MM: looking for name of method with id 0x%llx, in mono image at index %u", id, mono_image_index); size_t i = 0; while (mm_method_names[i].id != 0) { if (mm_method_names[i].id == id) { @@ -58,19 +58,15 @@ MonodroidRuntime::get_function_pointer (uint32_t mono_image_index, uint32_t clas // We need to do that, as Mono APIs cannot be invoked from threads that aren't attached to the runtime. mono_thread_attach (mono_get_root_domain ()); - // We don't check for valid return values from image loader, class and method lookup because if any - // of them fails to find the requested entity, they will return `null`. In consequence, we can pass - // these pointers without checking all the way to `mono_method_get_unmanaged_callers_only_ftnptr`, after - // which call we check for errors. This saves some time (not much, but definitely more than zero) MonoImage *image = MonoImageLoader::get_from_index (mono_image_index); MarshalMethodsManagedClass &klass = marshal_methods_class_cache[class_index]; if (klass.klass == nullptr) { - klass.klass = mono_class_get (image, klass.token); + klass.klass = image != nullptr ? mono_class_get (image, klass.token) : nullptr; } - MonoMethod *method = mono_get_method (image, method_token, klass.klass); + MonoMethod *method = klass.klass != nullptr ? mono_get_method (image, method_token, klass.klass) : nullptr; MonoError error; - void *ret = mono_method_get_unmanaged_callers_only_ftnptr (method, &error); + void *ret = method != nullptr ? mono_method_get_unmanaged_callers_only_ftnptr (method, &error) : nullptr; if (XA_LIKELY (ret != nullptr)) { if constexpr (NeedsLocking) { diff --git a/tests/MSBuildDeviceIntegration/Tests/InstallAndRunTests.cs b/tests/MSBuildDeviceIntegration/Tests/InstallAndRunTests.cs index 74054ded00c..c202c0c264a 100644 --- a/tests/MSBuildDeviceIntegration/Tests/InstallAndRunTests.cs +++ b/tests/MSBuildDeviceIntegration/Tests/InstallAndRunTests.cs @@ -25,9 +25,56 @@ public void Teardown () Directory.Delete (builder.ProjectDirectory, recursive: true); builder?.Dispose (); + builder = null; proj = null; } + [Test] + public void NativeAssemblyCacheWithSatelliteAssemblies () + { + var path = Path.Combine ("temp", TestName); + var lib = new XamarinAndroidLibraryProject { + ProjectName = "Localization", + OtherBuildItems = { + new BuildItem ("EmbeddedResource", "Foo.resx") { + TextContent = () => InlineData.ResxWithContents ("Cancel") + }, + } + }; + + var languages = new string[] {"es", "de", "fr", "he", "it", "pl", "pt", "ru", "sl" }; + foreach (string lang in languages) { + lib.OtherBuildItems.Add ( + new BuildItem ("EmbeddedResource", $"Foo.{lang}.resx") { + TextContent = () => InlineData.ResxWithContents ($"{lang}") + } + ); + } + + proj = new XamarinAndroidApplicationProject { + IsRelease = true, + }; + proj.References.Add (new BuildItem.ProjectReference ($"..\\{lib.ProjectName}\\{lib.ProjectName}.csproj", lib.ProjectName, lib.ProjectGuid)); + proj.SetAndroidSupportedAbis ("armeabi-v7a", "arm64-v8a", "x86", "x86_64"); + + using (var libBuilder = CreateDllBuilder (Path.Combine (path, lib.ProjectName))) { + builder = CreateApkBuilder (Path.Combine (path, proj.ProjectName)); + Assert.IsTrue (libBuilder.Build (lib), "Library Build should have succeeded."); + Assert.IsTrue (builder.Install (proj), "Install should have succeeded."); + + var apk = Path.Combine (Root, builder.ProjectDirectory, proj.OutputPath, $"{proj.PackageName}-Signed.apk"); + var helper = new ArchiveAssemblyHelper (apk); + + foreach (string lang in languages) { + Assert.IsTrue (helper.Exists ($"assemblies/{lang}/{lib.ProjectName}.resources.dll"), $"Apk should contain satellite assembly for language '{lang}'!"); + } + + Assert.True (builder.RunTarget (proj, "_Run"), "Project should have run."); + Assert.True (WaitForActivityToStart (proj.PackageName, "MainActivity", + Path.Combine (Root, builder.ProjectDirectory, "logcat.log"), 30), "Activity should have started."); + } + } + [Test] public void GlobalLayoutEvent_ShouldRegisterAndFire_OnActivityLaunch ([Values (false, true)] bool isRelease) { From 0b2a982724b8ac32fa0336ad7d897a09febcf104 Mon Sep 17 00:00:00 2001 From: Marek Habersack Date: Tue, 28 Feb 2023 18:30:07 +0100 Subject: [PATCH 08/22] [Xamarin.Android.Build.Tasks] `unable to open file as zip archive`? (#7759) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes? https://github.com/xamarin/xamarin-android/issues/6067 Context: https://gist.github.com/grendello/55b9a74c80c611dd48b726ee6f16d3c9 Context: https://github.com/xamarin/LibZipSharp/pull/125 Context: https://github.com/xamarin/xamarin-android/issues/7622 Changes: http://github.com/xamarin/monodroid/compare/50faac94c6a0c27864564829ac83f3988c82f8ef...602aca98245744882a129206b79b5a5e093dae44 * xamarin/monodroid@602aca982: Bump androidtools for new LibZipSharp (xamarin/monodroid#1287) * xamarin/monodroid@1f52d5873: [tools/msbuild] Deploy *resources.dll from PackageReference (xamarin/monodroid#1276) Changes: https://github.com/xamarin/androidtools/compare/f11d16350b088742f1293a58a3078e99f7deca09...c0bcb66c0beadcb3d1488349ce0fc906f2f3d8e4 * xamarin/androidtools@c0bcb66: Bump xamarin-android-tools for new LibZipSharp (xamarin/androidtools#377) Changes: https://github.com/xamarin/xamarin-android-tools/compare/099fd95f5459d9df78af0ad28f46e3016dd7ca1d...dbe42bf1688e79e1ca474dff4a1f8060158cafd9 * xamarin/xamarin-android-tools@dbe42bf: Bump LibZipSharp version (xamarin/xamarin-android-tools#204) Sometimes in our tests we see an error from LibZipSharp which claims a file cannot be opened as a valid ZIP archive: error ANDZA0000: Unable to open '…/example.apk' as zip archive The reason for this is ZIP format corruption happening sometimes in the `` task. The way the process works is that we first run `aapt2` to produce an APK archive named `packaged_resources`, which we then copy to the destination APK (using standard `File.Copy()`) and open it to append our content. The first item we always append is the `classes.dex` file which is also the **only** corrupted entry in the broken APK files. ZIP files contain two records describing each entry in the archive: 1. in the Central Directory (located at the end of the file) 2. local header in the ZIP data stream, offset of which is contained in the above Central Directory record. After close examination, it appears that the broken APK files contain (1) for `classes.dex` but not (2). Instead of (2) we see a *copy* of `packaged_resource` package's Central Directory record: % zipinfo -vv example.apk … Central directory entry #9: --------------------------- There are an extra 2 bytes preceding this file. classes.dex offset of local header from start of archive: 21680 … In particular, "There are an extra 2 bytes preceding this file" is a sign that something "isn't right". If we use `hexdump` to look at the 128 bytes starting at offset 21680: % hexdump -C -s 21680 -n 128 example.apk 000054b0 50 4b 01 02 00 00 00 00 00 00 08 00 00 00 21 00 |PK............!.| 000054c0 5e b2 00 5e cc 03 00 00 5c 0b 00 00 13 00 00 00 |^..^....\.......| 000054d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 41 6e |..............An| 000054e0 64 72 6f 69 64 4d 61 6e 69 66 65 73 74 2e 78 6d |droidManifest.xm| 000054f0 6c 50 4b 01 02 00 00 00 00 00 00 00 00 00 00 21 |lPK............!| 00005500 00 5c 71 d9 26 d2 05 00 00 d2 05 00 00 1d 00 00 |.\q.&...........| 00005510 00 00 00 00 00 00 00 00 00 00 00 fd 03 00 00 72 |...............r| 00005520 65 73 2f 64 72 61 77 61 62 6c 65 2d 6d 64 70 69 |es/drawable-mdpi| we see that it starts with "PK", the common magic signature for zip archives, and the following bytes { 0x1 0x2 } indicate that this is a *central directory* entry, while it *should* be { 0x3, 0x4 } for a *local header* entry. The corruption may be caused by invalid stream position after we open the `packaged_resources` copy and append `classes.dex` entry to it; see xamarin/LibZipSharp#125 for details. We believe that the changes to `ZipArchive.stream_callback()` in xamarin/LibZipSharp#125 alongside additional calls to `Flush()` after adding `classex.dex` **may** fix the problem. If it doesn't, we should consider copying data from `packaged_resources` to the final APK entry by entry by decompressing them from the original archive and adding them to the destination one. --- .external | 2 +- Directory.Build.props | 2 +- external/xamarin-android-tools | 2 +- src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.external b/.external index 1f60e2f5032..0deda634333 100644 --- a/.external +++ b/.external @@ -1,2 +1,2 @@ -xamarin/monodroid:main@50faac94c6a0c27864564829ac83f3988c82f8ef +xamarin/monodroid:main@602aca98245744882a129206b79b5a5e093dae44 mono/mono:2020-02@6dd9def57ce969ca04a0ecd9ef72c0a8f069112d diff --git a/Directory.Build.props b/Directory.Build.props index 431d9255db4..33a80a4adcf 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -40,7 +40,7 @@ - 2.0.7 + 2.1.0 1.0.0 0.11.4 13.0.1 diff --git a/external/xamarin-android-tools b/external/xamarin-android-tools index 099fd95f545..dbe42bf1688 160000 --- a/external/xamarin-android-tools +++ b/external/xamarin-android-tools @@ -1 +1 @@ -Subproject commit 099fd95f5459d9df78af0ad28f46e3016dd7ca1d +Subproject commit dbe42bf1688e79e1ca474dff4a1f8060158cafd9 diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs b/src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs index 28cca622f9b..b3998d336cb 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs @@ -183,6 +183,7 @@ void ExecuteWithAbi (string [] supportedAbis, string apkInputPath, string apkOut string apkName = dex.GetMetadata ("ApkName"); string dexPath = string.IsNullOrWhiteSpace (apkName) ? Path.GetFileName (dex.ItemSpec) : apkName; AddFileToArchiveIfNewer (apk, dex.ItemSpec, DalvikPath + dexPath, compressionMethod: dexCompressionMethod); + apk.Flush (); } if (EmbedAssemblies && !BundleAssemblies) { From d0701eb75e096f53e3c070fc6cdbad6d7477afba Mon Sep 17 00:00:00 2001 From: Marek Habersack Date: Tue, 28 Feb 2023 20:09:50 +0100 Subject: [PATCH 09/22] [Xamarin.Android.Build.Tasks] Remove support for mkbundle (#7772) Fixes: https://github.com/xamarin/xamarin-android/issues/7764 Context: d236af54538ef1fe62d0125798cdde78e46dcd8e Context: https://github.com/xamarin/AndroidX/issues/64#issuecomment-609970584 .NET Android dropped support for `$(BundleAssemblies)`=True; see also commit d236af54 and [a comment on xamarin/AndroidX#64][0]: > After internal discussion, we are strongly considering removing > support for `$(BundleAssemblies)` in .NET 5, as it increases > on-device memory use and slows down app startup times. However, this "dropping of support" was incomplete; setting it would result in broken apps! % dotnet new android -n android-ba % cd android-ba % dotnet build -p:BundleAssemblies=true # run the app, or just look at the .apk contents % unzip -l bin/Debug/net7.0-android/*-Signed.apk | grep assem 660 02-03-2023 14:13 assemblies/rc.bin # Note: `assemblies/assemblies.blob` is not present, but is required! Fix this by *removing* most usage of the `$(BundleAssemblies)` MSBuild property as well as all the code affected by it. - Stop running bundle test apps on CI - Remove bundle unit tests - Remove the `CodeGen-MkBundle` project from the tests solution - Remove the `Xamarin.Android.MakeBundle-Tests` from the tests solution - Remove all native code (and configuration) related to mkbundle - Warn about `$(BundleAssemblies)` usage in .NET projects. A XA1035 warning will be emitted when `$(BundleAssemblies)`=True in .NET Android apps. Preserve a couple of related properties in the `` and `` tasks, because they are still used by the debugger targets from `xamarin/monodroid`. [0]: https://github.com/xamarin/AndroidX/issues/64#issuecomment-6099 --- Configuration.props | 3 +- Documentation/guides/messages/README.md | 1 + Documentation/guides/messages/xa1035.md | 19 ++ Xamarin.Android-Tests.sln | 9 - build-tools/automation/azure-pipelines.yaml | 13 +- .../installers/create-installers.targets | 1 - build-tools/scripts/RunTests.targets | 16 - .../xaprepare/Steps/Step_PrepareLocal.cs | 11 +- .../Android/Xamarin.Android.Designer.targets | 1 - .../Properties/Resources.resx | 4 + .../Tasks/BuildApk.cs | 2 +- .../Tasks/GeneratePackageManagerJava.cs | 4 - .../AndroidDependenciesTests.cs | 1 - .../Xamarin.Android.Build.Tests/AotTests.cs | 11 +- .../Xamarin.Android.Build.Tests/BuildTest2.cs | 57 ---- .../IncrementalBuildTest.cs | 1 - .../MakeBundleTests.cs | 320 ------------------ .../Tasks/GeneratePackageManagerJavaTests.cs | 1 - .../Utilities/EnvironmentHelper.cs | 51 ++- .../Android/KnownProperties.cs | 2 - .../XamarinAndroidApplicationProject.cs | 5 - .../Utilities/ApplicationConfig.cs | 1 - ...pplicationConfigNativeAssemblyGenerator.cs | 2 - .../Xamarin.Android.Build.Tasks.csproj | 4 - .../Xamarin.Android.Common.targets | 12 +- src/monodroid/jni/application_dso_stub.cc | 1 - src/monodroid/jni/logger.cc | 4 - src/monodroid/jni/mkbundle-api.h | 35 -- src/monodroid/jni/monodroid-glue-internal.hh | 1 - src/monodroid/jni/monodroid-glue.cc | 86 +---- src/monodroid/jni/xamarin-app.hh | 1 - ...Forms.Performance.Integration.Droid.csproj | 3 +- ...marin.Forms.Performance.Integration.csproj | 5 +- 33 files changed, 62 insertions(+), 626 deletions(-) create mode 100644 Documentation/guides/messages/xa1035.md delete mode 100644 src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/MakeBundleTests.cs delete mode 100644 src/monodroid/jni/mkbundle-api.h diff --git a/Configuration.props b/Configuration.props index 447a8fda27f..c0845f0c472 100644 --- a/Configuration.props +++ b/Configuration.props @@ -155,8 +155,7 @@ $([System.IO.Path]::PathSeparator) <_TestsAotName Condition=" '$(AotAssemblies)' == 'true' ">-Aot <_TestsProfiledAotName Condition=" '$(AndroidEnableProfiledAot)' == 'true' ">-Profiled - <_TestsBundleName Condition=" '$(BundleAssemblies)' == 'true' ">-Bundle - $(_TestsProfiledAotName)$(_TestsAotName)$(_TestsBundleName) + $(_TestsProfiledAotName)$(_TestsAotName) i686-w64-mingw32 diff --git a/Documentation/guides/messages/README.md b/Documentation/guides/messages/README.md index c32d917a755..235d1d866f9 100644 --- a/Documentation/guides/messages/README.md +++ b/Documentation/guides/messages/README.md @@ -134,6 +134,7 @@ or 'Help->Report a Problem' in Visual Studio for Mac. + [XA1031](xa1031.md): The 'AndroidHttpClientHandlerType' has an invalid value. + [XA1032](xa1032.md):Failed to resolve '{0}' from '{1}'. Please check your `AndroidHttpClientHandlerType` setting. + [XA1033](xa1033.md): Could not resolve '{0}'. Please check your `AndroidHttpClientHandlerType` setting. ++ [XA1035](xa1035.md): The 'BundleAssemblies' property is deprecated and it has no effect on the application build. Equivalent functionality is implemented by the 'AndroidUseAssemblyStore' and 'AndroidEnableAssemblyCompression' properties. ## XA2xxx: Linker diff --git a/Documentation/guides/messages/xa1035.md b/Documentation/guides/messages/xa1035.md new file mode 100644 index 00000000000..0f5299a2288 --- /dev/null +++ b/Documentation/guides/messages/xa1035.md @@ -0,0 +1,19 @@ +--- +title: Xamarin.Android warning XA1035 +description: XA1034 warning code +ms.date: 13/12/2022 +--- +# Xamarin.Android warning XA1035 + +## Example messages + +``` +The 'BundleAssemblies' property is deprecated and it has no effect on the application build. Equivalent functionality is implemented by the 'AndroidUseAssemblyStore' and 'AndroidEnableAssemblyCompression' properties. +``` + +## Solution + +Edit your csproj directly and remove the 'BundleAssemblies' property. +`AndroidUseAssemblyStore` and `AndroidEnableAssemblyCompression` are +both enabled by default and, together, they implement behavior +equivalent to that of `BundleAssemblies`. diff --git a/Xamarin.Android-Tests.sln b/Xamarin.Android-Tests.sln index 0b732d451e6..d32380afde2 100644 --- a/Xamarin.Android-Tests.sln +++ b/Xamarin.Android-Tests.sln @@ -34,10 +34,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamarin.Android.FixJavaAbst EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamarin.Android.JcwGen-Tests", "tests\CodeGen-Binding\Xamarin.Android.JcwGen-Tests\Xamarin.Android.JcwGen-Tests.csproj", "{9479B71F-19FE-48F9-AB3F-AE764D76038A}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CodeGen-MkBundle", "CodeGen-MkBundle", "{93CBCEB8-8B64-420C-950C-BCE9CC8C6032}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamarin.Android.MakeBundle-Tests", "tests\CodeGen-MkBundle\Xamarin.Android.MakeBundle-Tests\Xamarin.Android.MakeBundle-Tests.csproj", "{A0B2692E-9FBE-4157-9526-7145F07F2C5A}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ResolveImports", "ResolveImports", "{E49089E4-4CE0-475E-BE9C-0AB4E4D56EE9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamarin.Android.BindingResolveImportLib1", "tests\ResolveImports\Xamarin.Android.BindingResolveImportLib1\Xamarin.Android.BindingResolveImportLib1.csproj", "{2A0519DF-0DDA-45F7-AC3C-E2992748D364}" @@ -151,10 +147,6 @@ Global {9479B71F-19FE-48F9-AB3F-AE764D76038A}.Debug|Any CPU.Build.0 = Debug|Any CPU {9479B71F-19FE-48F9-AB3F-AE764D76038A}.Release|Any CPU.ActiveCfg = Release|Any CPU {9479B71F-19FE-48F9-AB3F-AE764D76038A}.Release|Any CPU.Build.0 = Release|Any CPU - {A0B2692E-9FBE-4157-9526-7145F07F2C5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A0B2692E-9FBE-4157-9526-7145F07F2C5A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A0B2692E-9FBE-4157-9526-7145F07F2C5A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A0B2692E-9FBE-4157-9526-7145F07F2C5A}.Release|Any CPU.Build.0 = Release|Any CPU {2A0519DF-0DDA-45F7-AC3C-E2992748D364}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A0519DF-0DDA-45F7-AC3C-E2992748D364}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A0519DF-0DDA-45F7-AC3C-E2992748D364}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -269,7 +261,6 @@ Global {7B9D9F32-973F-49CF-A8F8-05BDFC75556C} = {2EFFECF5-1CCA-4005-AE62-1D6F01C88DF4} {B7476528-C166-40BF-931F-EAEB02247879} = {2EFFECF5-1CCA-4005-AE62-1D6F01C88DF4} {9479B71F-19FE-48F9-AB3F-AE764D76038A} = {2EFFECF5-1CCA-4005-AE62-1D6F01C88DF4} - {A0B2692E-9FBE-4157-9526-7145F07F2C5A} = {93CBCEB8-8B64-420C-950C-BCE9CC8C6032} {2A0519DF-0DDA-45F7-AC3C-E2992748D364} = {E49089E4-4CE0-475E-BE9C-0AB4E4D56EE9} {DD4E2A49-730C-41FD-B6D4-AFB73F94271F} = {E49089E4-4CE0-475E-BE9C-0AB4E4D56EE9} {9802CB35-0BC0-4EE1-9A81-BB40BD97945A} = {E49089E4-4CE0-475E-BE9C-0AB4E4D56EE9} diff --git a/build-tools/automation/azure-pipelines.yaml b/build-tools/automation/azure-pipelines.yaml index 33a502ee5af..6e7fa3f3b5c 100644 --- a/build-tools/automation/azure-pipelines.yaml +++ b/build-tools/automation/azure-pipelines.yaml @@ -219,17 +219,6 @@ stages: artifactFolder: Profiled-Aot useDotNet: false - - template: yaml-templates/apk-instrumentation.yaml - parameters: - configuration: $(ApkTestConfiguration) - testName: Xamarin.Forms-Performance-Integration-Bundle - project: tests/Xamarin.Forms-Performance-Integration/Droid/Xamarin.Forms.Performance.Integration.Droid.csproj - testResultsFiles: TestResult-apkdiff-Xamarin.Forms_Performance_Integration-Signed-$(ApkTestConfiguration)-Bundle.xml - extraBuildArgs: /p:BundleAssemblies=true - artifactSource: bin/Test$(ApkTestConfiguration)/Xamarin.Forms_Performance_Integration-Signed.apk - artifactFolder: Bundle - useDotNet: false - - template: yaml-templates/apk-instrumentation.yaml parameters: configuration: $(ApkTestConfiguration) @@ -652,7 +641,7 @@ stages: nunit_categories: $(DotNetNUnitCategories) & TestCategory != SmokeTests target_framework: $(DotNetStableTargetFramework) provisionatorChannel: ${{ parameters.provisionatorChannel }} - + - template: yaml-templates/stage-msbuild-emulator-tests.yaml parameters: provisionatorChannel: ${{ parameters.provisionatorChannel }} diff --git a/build-tools/installers/create-installers.targets b/build-tools/installers/create-installers.targets index 39b34ef30e3..7cd264758a6 100644 --- a/build-tools/installers/create-installers.targets +++ b/build-tools/installers/create-installers.targets @@ -242,7 +242,6 @@ <_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Microsoft.Android.Build.BaseTasks.pdb" /> <_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)mkbundle.exe" ExcludeFromAndroidNETSdk="true" /> <_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)mkbundle.pdb" ExcludeFromAndroidNETSdk="true" /> - <_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)mkbundle-api.h" /> <_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)mono-symbolicate.exe" ExcludeFromAndroidNETSdk="true" /> <_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)mono-symbolicate.pdb" ExcludeFromAndroidNETSdk="true" /> <_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Mono.CompilerServices.SymbolWriter.dll" /> diff --git a/build-tools/scripts/RunTests.targets b/build-tools/scripts/RunTests.targets index 2ba159f9e9c..5445dab3a85 100644 --- a/build-tools/scripts/RunTests.targets +++ b/build-tools/scripts/RunTests.targets @@ -159,22 +159,6 @@ Condition=" '$(_CrossCompilerAvailable)' == 'True' " Properties="AndroidEnableProfiledAot=True;AotAssemblies=True" /> - - <_ApkTestProjectBundle> - <_BinLog>$(_XABinLogPrefix)-$([System.DateTime]::Now.ToString ("yyyyMMddTHHmmss"))-%(Filename)-Bundle.binlog" - - - - diff --git a/build-tools/xaprepare/xaprepare/Steps/Step_PrepareLocal.cs b/build-tools/xaprepare/xaprepare/Steps/Step_PrepareLocal.cs index 37ff297ba7e..e9ec7ff5f5d 100644 --- a/build-tools/xaprepare/xaprepare/Steps/Step_PrepareLocal.cs +++ b/build-tools/xaprepare/xaprepare/Steps/Step_PrepareLocal.cs @@ -16,16 +16,7 @@ protected override async Task Execute(Context context) var msbuild = new MSBuildRunner (context); string xfTestPath = Path.Combine (BuildPaths.XamarinAndroidSourceRoot, "tests", "Xamarin.Forms-Performance-Integration", "Xamarin.Forms.Performance.Integration.csproj"); - if (!await msbuild.Restore (projectPath: xfTestPath, logTag: "xfperf", binlogName: "prepare-local")) - return false; - - // The Xamarin.Forms PackageReference version varies based on the value of $(BundleAssemblies) - return await msbuild.Restore ( - projectPath: xfTestPath, - logTag: "xfperfbundle", - arguments: new List { "-p:BundleAssemblies=true" }, - binlogName: "prepare-local-bundle" - ); + return await msbuild.Restore (projectPath: xfTestPath, logTag: "xfperf", binlogName: "prepare-local"); } } } diff --git a/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Designer.targets b/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Designer.targets index e3192db607f..13c502141e8 100644 --- a/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Designer.targets +++ b/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Designer.targets @@ -135,7 +135,6 @@ Copyright (C) 2016 Xamarin. All rights reserved. Debug="$(AndroidIncludeDebugSymbols)" AndroidSequencePointsMode="$(_SequencePointsMode)" EnableSGenConcurrent="$(AndroidEnableSGenConcurrent)" - IsBundledApplication="$(BundleAssemblies)" SupportedAbis="$(_BuildTargetAbis)" AndroidPackageName="$(_AndroidPackage)" EnablePreloadAssembliesDefault="$(_AndroidEnablePreloadAssembliesDefault)" diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx index f78a40c1314..d84bb10ce53 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx @@ -493,6 +493,10 @@ Please change the value to an assembly-qualifed type name which inherits from '{ The following are literal names and should not be translated: '_Microsoft.Android.Resource.Desinger', 'AndroidUseDesignerAssembly', 'true' {0} - The name of the assembly + + The 'BundleAssemblies' property is deprecated and it has no effect on the application build. Equivalent functionality is implemented by the 'AndroidUseAssemblyStore' and 'AndroidEnableAssemblyCompression' properties. + The following are literal names and should not be translated: 'BundleAssemblies', 'AndroidUseAssemblyStore', 'AndroidEnableAssemblyCompression' + Use of AppDomain.CreateDomain() detected in assembly: {0}. .NET 6 and higher will only support a single AppDomain, so this API will no longer be available in Xamarin.Android once .NET 6 is released. The following are literal names and should not be translated: AppDomain.CreateDomain(), AppDomain diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs b/src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs index b3998d336cb..4065ba1ef8d 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs @@ -186,7 +186,7 @@ void ExecuteWithAbi (string [] supportedAbis, string apkInputPath, string apkOut apk.Flush (); } - if (EmbedAssemblies && !BundleAssemblies) { + if (EmbedAssemblies) { AddAssemblies (apk, debug, compress, compressedAssembliesInfo, assemblyStoreApkName); apk.Flush (); } diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/GeneratePackageManagerJava.cs b/src/Xamarin.Android.Build.Tasks/Tasks/GeneratePackageManagerJava.cs index 83594593445..ee869ddad32 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/GeneratePackageManagerJava.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/GeneratePackageManagerJava.cs @@ -53,9 +53,6 @@ public class GeneratePackageManagerJava : AndroidTask [Required] public string Manifest { get; set; } - [Required] - public bool IsBundledApplication { get; set; } - [Required] public string [] SupportedAbis { get; set; } @@ -375,7 +372,6 @@ void AddEnvironment () var appConfState = BuildEngine4.GetRegisteredTaskObjectAssemblyLocal (ProjectSpecificTaskObjectKey (ApplicationConfigTaskState.RegisterTaskObjectKey), RegisteredTaskObjectLifetime.Build); var jniRemappingNativeCodeInfo = BuildEngine4.GetRegisteredTaskObjectAssemblyLocal (ProjectSpecificTaskObjectKey (GenerateJniRemappingNativeCode.JniRemappingNativeCodeInfoKey), RegisteredTaskObjectLifetime.Build); var appConfigAsmGen = new ApplicationConfigNativeAssemblyGenerator (environmentVariables, systemProperties, Log) { - IsBundledApp = IsBundledApplication, UsesMonoAOT = usesMonoAOT, UsesMonoLLVM = EnableLLVM, UsesAssemblyPreload = environmentParser.UsesAssemblyPreload, diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AndroidDependenciesTests.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AndroidDependenciesTests.cs index a881d54de63..dc386e3dfa8 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AndroidDependenciesTests.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AndroidDependenciesTests.cs @@ -56,7 +56,6 @@ public void InstallAndroidDependenciesTest () [TestCase ("AotAssemblies", false)] [TestCase ("AndroidEnableProfiledAot", false)] [TestCase ("EnableLLVM", true)] - [TestCase ("BundleAssemblies", true)] public void GetDependencyNdkRequiredConditions (string property, bool ndkRequired) { var proj = new XamarinAndroidApplicationProject (); diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AotTests.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AotTests.cs index 3f2ee58ed3a..4244e4c8529 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AotTests.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AotTests.cs @@ -144,9 +144,7 @@ public void BuildAotApplicationWithNdkAndBundleAndÜmläüts (string supportedAb AotAssemblies = true, PackageName = "com.xamarin.buildaotappwithspecialchars", }; - if (!Builder.UseDotNet) { - proj.BundleAssemblies = true; - } + proj.SetProperty ("AndroidNdkDirectory", AndroidNdkPath); proj.SetAndroidSupportedAbis (supportedAbis); proj.SetProperty ("EnableLLVM", enableLLVM.ToString ()); @@ -194,12 +192,7 @@ public void BuildAotApplicationWithNdkAndBundleAndÜmläüts (string supportedAb proj.OutputPath, $"{proj.PackageName}-Signed.apk"); var helper = new ArchiveAssemblyHelper (apk, usesAssemblyBlobs); - if (!Builder.UseDotNet) { - // BundleAssemblies=true - Assert.IsFalse (helper.Exists ("assemblies/UnnamedProject.dll"), $"UnnamedProject.dll should not be in the {proj.PackageName}-Signed.apk"); - } else { - Assert.IsTrue (helper.Exists ("assemblies/UnnamedProject.dll"), $"UnnamedProject.dll should be in the {proj.PackageName}-Signed.apk"); - } + Assert.IsTrue (helper.Exists ("assemblies/UnnamedProject.dll"), $"UnnamedProject.dll should be in the {proj.PackageName}-Signed.apk"); using (var zipFile = ZipHelper.OpenZip (apk)) { Assert.IsNotNull (ZipHelper.ReadFileFromZip (zipFile, string.Format ("lib/{0}/libaot-UnnamedProject.dll.so", abi)), diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest2.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest2.cs index f27fa07ca22..1ac9ed252bf 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest2.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest2.cs @@ -1101,63 +1101,6 @@ public void CSharp8Features ([Values (true, false)] bool bindingProject) } } - [Test] - [Category ("SmokeTests"), Category ("MkBundle")] - public void BuildMkBundleApplicationRelease () - { - var proj = new XamarinAndroidApplicationProject () { IsRelease = true, BundleAssemblies = true }; - proj.SetProperty ("AndroidNdkDirectory", AndroidNdkPath); - using (var b = CreateApkBuilder ("temp/BuildMkBundleApplicationRelease", false)) { - Assert.IsTrue (b.Build (proj), "Build should have succeeded."); - var assemblies = Path.Combine (Root, b.ProjectDirectory, proj.IntermediateOutputPath, - "bundles", "armeabi-v7a", "assemblies.o"); - Assert.IsTrue (File.Exists (assemblies), "assemblies.o does not exist"); - var libapp = Path.Combine (Root, b.ProjectDirectory, proj.IntermediateOutputPath, - "bundles", "armeabi-v7a", "libmonodroid_bundle_app.so"); - Assert.IsTrue (File.Exists (libapp), "libmonodroid_bundle_app.so does not exist"); - var apk = Path.Combine (Root, b.ProjectDirectory, - proj.OutputPath, $"{proj.PackageName}-Signed.apk"); - using (var zipFile = ZipHelper.OpenZip (apk)) { - Assert.IsNotNull (ZipHelper.ReadFileFromZip (zipFile, - "lib/armeabi-v7a/libmonodroid_bundle_app.so"), - $"lib/armeabi-v7a/libmonodroid_bundle_app.so should be in the {proj.PackageName}-Signed.apk"); - Assert.IsNull (ZipHelper.ReadFileFromZip (zipFile, - Path.Combine ("assemblies", "UnnamedProject.dll")), - $"UnnamedProject.dll should not be in the {proj.PackageName}-Signed.apk"); - } - } - } - - [Test] - [Category ("Minor"), Category ("MkBundle")] - public void BuildMkBundleApplicationReleaseAllAbi () - { - var proj = new XamarinAndroidApplicationProject () { IsRelease = true, BundleAssemblies = true }; - proj.SetProperty ("AndroidNdkDirectory", AndroidNdkPath); - proj.SetAndroidSupportedAbis ("armeabi-v7a", "x86"); - using (var b = CreateApkBuilder ("temp/BuildMkBundleApplicationReleaseAllAbi", false)) { - Assert.IsTrue (b.Build (proj), "Build should have succeeded."); - foreach (var abi in new string [] { "armeabi-v7a", "x86" }) { - var assemblies = Path.Combine (Root, b.ProjectDirectory, proj.IntermediateOutputPath, - "bundles", abi, "assemblies.o"); - Assert.IsTrue (File.Exists (assemblies), abi + " assemblies.o does not exist"); - var libapp = Path.Combine (Root, b.ProjectDirectory, proj.IntermediateOutputPath, - "bundles", abi, "libmonodroid_bundle_app.so"); - Assert.IsTrue (File.Exists (libapp), abi + " libmonodroid_bundle_app.so does not exist"); - var apk = Path.Combine (Root, b.ProjectDirectory, - proj.OutputPath, $"{proj.PackageName}-Signed.apk"); - using (var zipFile = ZipHelper.OpenZip (apk)) { - Assert.IsNotNull (ZipHelper.ReadFileFromZip (zipFile, - "lib/" + abi + "/libmonodroid_bundle_app.so"), - $"lib/{0}/libmonodroid_bundle_app.so should be in the {proj.PackageName}-Signed.apk", abi); - Assert.IsNull (ZipHelper.ReadFileFromZip (zipFile, - Path.Combine ("assemblies", "UnnamedProject.dll")), - $"UnnamedProject.dll should not be in the {proj.PackageName}-Signed.apk"); - } - } - } - } - static readonly object [] BuildProguardEnabledProjectSource = new object [] { new object [] { /* isRelease */ false, diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/IncrementalBuildTest.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/IncrementalBuildTest.cs index ae7e039c1a7..d8ab6b85c6a 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/IncrementalBuildTest.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/IncrementalBuildTest.cs @@ -1093,7 +1093,6 @@ public void BuildIncrementalAot (string supportedAbis, string androidAotMode, bo var path = Path.Combine ("temp", $"BuildAotApplication_{supportedAbis}_{androidAotMode}_{aotAssemblies}_{expectedResult}"); var proj = new XamarinAndroidApplicationProject () { IsRelease = true, - BundleAssemblies = false, AotAssemblies = aotAssemblies, }; if (aotAssemblies) { diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/MakeBundleTests.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/MakeBundleTests.cs deleted file mode 100644 index 3ddb6596501..00000000000 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/MakeBundleTests.cs +++ /dev/null @@ -1,320 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading; -using System.Xml; -using System.Xml.XPath; - -using Microsoft.Build.Framework; -using NUnit.Framework; -using Xamarin.ProjectTools; -using Xamarin.Tools.Zip; - -namespace Xamarin.Android.Build.Tests -{ - [Category ("Node-2"), Category ("MkBundle"), Category ("StaticProject")] - [Parallelizable (ParallelScope.Children)] - public class MakeBundleTests : BaseTest - { - sealed class LocalBuilder : Builder - { - public LocalBuilder () - { - BuildingInsideVisualStudio = false; - } - - public bool Build (string projectOrSolution, string target, string[] parameters = null, Dictionary environmentVariables = null) - { - return BuildInternal (projectOrSolution, target, parameters, environmentVariables); - } - } - - const string ProjectName = "Xamarin.Android.MakeBundle-Tests"; - const string ProjectAssemblyName = "Xamarin.Android.MakeBundle-Tests"; - const string ProjectPackageName = "Xamarin.Android.MakeBundle_Tests"; - - static readonly string hostArch = TestEnvironment.IsWindows ? "windows-x86_64" : (TestEnvironment.IsMacOS ? "darwin-x86_64" : "linux-x86_64"); - static readonly string executableExtension = TestEnvironment.IsWindows ? ".exe" : string.Empty; - static readonly string LlvmReadobj = Path.Combine (AndroidSdkResolver.GetAndroidNdkPath(), "toolchains", "llvm", "prebuilt", hostArch, "bin", $"llvm-readobj{executableExtension}"); - static readonly string GccReadelf = Path.Combine (AndroidSdkResolver.GetAndroidNdkPath (), "toolchains", "x86_64-4.9", "prebuilt", hostArch, "bin", $"x86_64-linux-android-readelf{executableExtension}"); - - static readonly char[] ElfDynamicFieldSep = new [] { ' ', '\t' }; - static readonly string TestProjectRootDirectory; - static readonly string TestOutputDir; - - static readonly List produced_binaries = new List { - $"{ProjectAssemblyName}.dll", - $"{ProjectPackageName}-Signed.apk", - $"{ProjectPackageName}.apk", - }; - - static readonly List log_files = new List { - "process.log", - "msbuild.binlog", - }; - - static readonly string[] bundles = new [] { - "lib/x86/libmonodroid_bundle_app.so", - "lib/armeabi-v7a/libmonodroid_bundle_app.so", - }; - - string elfReaderPath; - bool elfReaderLlvm; - string testProjectPath; - string apk; - - static MakeBundleTests () - { - TestProjectRootDirectory = Path.GetFullPath (Path.Combine (XABuildPaths.TopDirectory, "tests", "CodeGen-MkBundle", "Xamarin.Android.MakeBundle-Tests")); - TestOutputDir = Path.Combine (SetUp.TestDirectoryRoot, "temp", "CodeGen-MkBundle"); - } - - [OneTimeSetUp] - public void BuildProject () - { - if (File.Exists (LlvmReadobj)) { - elfReaderPath = LlvmReadobj; - elfReaderLlvm = true; - } else if (File.Exists (GccReadelf)) { - elfReaderPath = GccReadelf; - elfReaderLlvm = false; - } else - Assert.Fail ($"No ELF reader found. Tried '{LlvmReadobj}' and '{GccReadelf}'"); - - Console.WriteLine ($"Will use the following ELF reader: {elfReaderPath}"); - - testProjectPath = PrepareProject (ProjectName); - apk = Path.Combine (testProjectPath, "bin", XABuildPaths.Configuration, $"{ProjectPackageName}-Signed.apk"); - string projectPath = Path.Combine (testProjectPath, $"{ProjectName}.csproj"); - LocalBuilder builder = GetBuilder ("Xamarin.Android.MakeBundle-Tests"); - bool success = builder.Build (projectPath, "SignAndroidPackage", new [] { "UnitTestsMode=true", $"Configuration={XABuildPaths.Configuration}" }); - - Assert.That (success, Is.True, "Should have been built"); - } - - [OneTimeTearDown] - public void CleanUp () - { - if (TestContext.CurrentContext.Result.FailCount == 0) { - FileSystemUtils.SetDirectoryWriteable (TestOutputDir); - Directory.Delete (TestOutputDir, recursive: true); - } - } - - [Test] - public void BinariesExist () - { - foreach (string binary in produced_binaries) { - string fp = Path.Combine (testProjectPath, "bin", XABuildPaths.Configuration, binary); - - Assert.That (new FileInfo (fp), Does.Exist, $"File {fp} should exist"); - } - } - - [Test] - public void PackageIsBundled () - { - Assert.That (new FileInfo (apk), Does.Exist, $"File {apk} should exist"); - - using (ZipArchive zip = ZipArchive.Open (apk, FileMode.Open)) { - Assert.That (zip, Is.Not.Null, $"{apk} couldn't be opened as a zip archive"); - - foreach (string bundle in bundles) { - Assert.That (zip.ContainsEntry (bundle), Is.True, $"`{bundle}` file not found in {apk}"); - } - } - } - - [Test] - public void BundleHasSoname () - { - Assert.That (new FileInfo (apk), Does.Exist, $"File {apk} should exist"); - - using (ZipArchive zip = ZipArchive.Open (apk, FileMode.Open)) { - Assert.That (zip, Is.Not.Null, $"{apk} couldn't be opened as a zip archive"); - - foreach (string bundle in bundles) { - Assert.That (zip.ContainsEntry (bundle), Is.True, $"`{bundle}` file not found in {apk}"); - CheckBundleForSoname (zip, bundle); - } - } - } - - void CheckBundleForSoname (ZipArchive zip, string bundlePath) - { - string tempFile = Path.GetTempFileName (); - using (Stream fs = File.Open (tempFile, FileMode.Create)) { - ZipEntry entry = zip.FirstOrDefault (e => String.Compare (e.FullName, bundlePath, StringComparison.Ordinal) == 0); - Assert.That (entry, Is.Not.Null, $"Unable to open the `{bundlePath}` entry in {apk}"); - - entry.Extract (fs); - } - - var stdout = new List (); - string arguments; - string sonameField; - - if (elfReaderLlvm) { - arguments = "--dynamic-table"; - sonameField = "SONAME"; - } else { - arguments = "-d"; - sonameField = "(SONAME)"; - } - bool success; - - try { - Console.WriteLine ($"Checking bundle {bundlePath} in {tempFile}"); - success = RunCommand (elfReaderPath, $"{arguments} \"{tempFile}\"", stdout); - } finally { - File.Delete (tempFile); - } - - Assert.That (success, Is.True, $"Command {elfReaderPath} failed"); - - string soname = null; - foreach (string l in stdout) { - string line = l?.Trim (); - if (String.IsNullOrEmpty (line)) - continue; - - string[] parts = line.Split (ElfDynamicFieldSep, StringSplitOptions.RemoveEmptyEntries); - if (parts.Length < 3) - continue; - - if (String.Compare (sonameField, parts [1], StringComparison.Ordinal) != 0) - continue; - - if (parts.Length > 3) - soname = String.Join (" ", parts, 3, parts.Length - 3); - else - soname = String.Empty; - break; - } - - const string expectedSoname = "libmonodroid_bundle_app.so"; - Assert.That (soname, Is.Not.Null, $"Bundle {bundlePath} doesn't have DT_SONAME in ELF header"); - Assert.That (soname.Length, Is.GreaterThanOrEqualTo (0), $"Unknown DT_SONAME field format in {bundlePath}"); - Assert.That (soname.IndexOf (expectedSoname, StringComparison.Ordinal), Is.GreaterThanOrEqualTo (0), $"Unexpected bundle {bundlePath} SONAME (expected {expectedSoname}"); - } - - bool RunCommand (string command, string arguments, List stdout) - { - var psi = new ProcessStartInfo () { - FileName = command, - Arguments = arguments, - UseShellExecute = false, - RedirectStandardInput = false, - RedirectStandardOutput = true, - RedirectStandardError = true, - CreateNoWindow = true, - WindowStyle = ProcessWindowStyle.Hidden, - }; - - var stderr_completed = new ManualResetEvent (false); - var stdout_completed = new ManualResetEvent (false); - - var p = new Process () { - StartInfo = psi, - }; - - p.ErrorDataReceived += (sender, e) => { - if (e.Data == null) - stderr_completed.Set (); - else - Console.WriteLine ($"stderr: {e.Data}"); - }; - - p.OutputDataReceived += (sender, e) => { - if (e.Data == null) - stdout_completed.Set (); - else { - stdout.Add (e.Data); - Console.WriteLine ($"stdout: {e.Data}"); - } - }; - - using (p) { - p.StartInfo = psi; - p.Start (); - p.BeginOutputReadLine (); - p.BeginErrorReadLine (); - - bool success = p.WaitForExit (60000); - - // We need to call the parameter-less WaitForExit only if any of the standard - // streams have been redirected (see - // https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.process.waitforexit?view=netframework-4.7.2#System_Diagnostics_Process_WaitForExit) - // - p.WaitForExit (); - stderr_completed.WaitOne (TimeSpan.FromSeconds (60)); - stdout_completed.WaitOne (TimeSpan.FromSeconds (60)); - - if (!success || p.ExitCode != 0) { - Console.Error.WriteLine ($"Process `{command} {arguments}` exited with value {p.ExitCode}."); - return false; - } - - return true; - } - } - - string PrepareProject (string testName) - { - string tempRoot = Path.Combine (TestOutputDir, $"{testName}.build", XABuildPaths.Configuration); - string temporaryProjectPath = Path.Combine (tempRoot, "project"); - - var ignore = new HashSet { - Path.Combine (TestProjectRootDirectory, "bin"), - Path.Combine (TestProjectRootDirectory, "obj"), - }; - - CopyRecursively (TestProjectRootDirectory, temporaryProjectPath, ignore); - return temporaryProjectPath; - } - - void CopyRecursively (string fromDir, string toDir, HashSet ignoreDirs) - { - if (String.IsNullOrEmpty (fromDir)) - throw new ArgumentException ($"{nameof (fromDir)} is must have a non-empty value"); - if (String.IsNullOrEmpty (toDir)) - throw new ArgumentException ($"{nameof (toDir)} is must have a non-empty value"); - - if (ignoreDirs.Contains (fromDir)) - return; - - var fdi = new DirectoryInfo (fromDir); - if (!fdi.Exists) - throw new InvalidOperationException ($"Source directory '{fromDir}' does not exist"); - - if (Directory.Exists (toDir)) - Directory.Delete (toDir, true); - - foreach (FileSystemInfo fsi in fdi.EnumerateFileSystemInfos ("*", SearchOption.TopDirectoryOnly)) { - if (fsi is FileInfo finfo) - CopyFile (fsi.FullName, Path.Combine (toDir, finfo.Name)); - else - CopyRecursively (fsi.FullName, Path.Combine (toDir, fsi.Name), ignoreDirs); - } - } - - void CopyFile (string from, string to) - { - string dir = Path.GetDirectoryName (to); - if (!Directory.Exists (dir)) - Directory.CreateDirectory (dir); - File.Copy (from, to, true); - } - - LocalBuilder GetBuilder (string baseLogFileName) - { - return new LocalBuilder { - BuildLogFile = $"{baseLogFileName}.log" - }; - } - } -} diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Tasks/GeneratePackageManagerJavaTests.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Tasks/GeneratePackageManagerJavaTests.cs index 71d686ddabf..416e3598350 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Tasks/GeneratePackageManagerJavaTests.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Tasks/GeneratePackageManagerJavaTests.cs @@ -74,7 +74,6 @@ public void CheckPackageManagerAssemblyOrder (string[] resolvedUserAssemblies, s MainAssembly = "linked/HelloAndroid.dll", TargetFrameworkVersion = "v6.0", Manifest = Path.Combine (path, "AndroidManifest.xml"), - IsBundledApplication = false, SupportedAbis = new string [] { "x86" , "arm64-v8a" }, AndroidPackageName = "com.microsoft.net6.helloandroid", EnablePreloadAssembliesDefault = false, diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/EnvironmentHelper.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/EnvironmentHelper.cs index c3c30ebae39..5b79d0e8309 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/EnvironmentHelper.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/EnvironmentHelper.cs @@ -43,7 +43,6 @@ public sealed class ApplicationConfig public bool uses_mono_aot; public bool aot_lazy_load; public bool uses_assembly_preload; - public bool is_a_bundled_app; public bool broken_exception_transitions; public bool instant_run_enabled; public bool jni_add_native_method_registration_attribute_present; @@ -67,7 +66,7 @@ public sealed class ApplicationConfig public string android_package_name = String.Empty; } - const uint ApplicationConfigFieldCount = 26; + const uint ApplicationConfigFieldCount = 25; const string ApplicationConfigSymbolName = "application_config"; const string AppEnvironmentVariablesSymbolName = "app_environment_variables"; @@ -226,112 +225,107 @@ static ApplicationConfig ReadApplicationConfig (EnvironmentFile envFile) ret.uses_assembly_preload = ConvertFieldToBool ("uses_assembly_preload", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 4: // is_a_bundled_app: bool / .byte - AssertFieldType (envFile.Path, parser.SourceFilePath, ".byte", field [0], item.LineNumber); - ret.is_a_bundled_app = ConvertFieldToBool ("is_a_bundled_app", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); - break; - - case 5: // broken_exception_transitions: bool / .byte + case 4: // broken_exception_transitions: bool / .byte AssertFieldType (envFile.Path, parser.SourceFilePath, ".byte", field [0], item.LineNumber); ret.broken_exception_transitions = ConvertFieldToBool ("broken_exception_transitions", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 6: // instant_run_enabled: bool / .byte + case 5: // instant_run_enabled: bool / .byte AssertFieldType (envFile.Path, parser.SourceFilePath, ".byte", field [0], item.LineNumber); ret.instant_run_enabled = ConvertFieldToBool ("instant_run_enabled", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 7: // jni_add_native_method_registration_attribute_present: bool / .byte + case 6: // jni_add_native_method_registration_attribute_present: bool / .byte AssertFieldType (envFile.Path, parser.SourceFilePath, ".byte", field [0], item.LineNumber); ret.jni_add_native_method_registration_attribute_present = ConvertFieldToBool ("jni_add_native_method_registration_attribute_present", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 8: // have_runtime_config_blob: bool / .byte + case 7: // have_runtime_config_blob: bool / .byte AssertFieldType (envFile.Path, parser.SourceFilePath, ".byte", field [0], item.LineNumber); ret.have_runtime_config_blob = ConvertFieldToBool ("have_runtime_config_blob", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 9: // have_assemblies_blob: bool / .byte + case 8: // have_assemblies_blob: bool / .byte AssertFieldType (envFile.Path, parser.SourceFilePath, ".byte", field [0], item.LineNumber); ret.have_assemblies_blob = ConvertFieldToBool ("have_assemblies_blob", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 10: // marshal_methods_enabled: bool / .byte + case 9: // marshal_methods_enabled: bool / .byte AssertFieldType (envFile.Path, parser.SourceFilePath, ".byte", field [0], item.LineNumber); ret.marshal_methods_enabled = ConvertFieldToBool ("marshal_methods_enabled", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 11: // bound_stream_io_exception_type: byte / .byte + case 10: // bound_stream_io_exception_type: byte / .byte AssertFieldType (envFile.Path, parser.SourceFilePath, ".byte", field [0], item.LineNumber); ret.bound_stream_io_exception_type = ConvertFieldToByte ("bound_stream_io_exception_type", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 12: // package_naming_policy: uint32_t / .word | .long + case 11: // package_naming_policy: uint32_t / .word | .long Assert.IsTrue (expectedUInt32Types.Contains (field [0]), $"Unexpected uint32_t field type in '{envFile.Path}:{item.LineNumber}': {field [0]}"); ret.package_naming_policy = ConvertFieldToUInt32 ("package_naming_policy", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 13: // environment_variable_count: uint32_t / .word | .long + case 12: // environment_variable_count: uint32_t / .word | .long Assert.IsTrue (expectedUInt32Types.Contains (field [0]), $"Unexpected uint32_t field type in '{envFile.Path}:{item.LineNumber}': {field [0]}"); ret.environment_variable_count = ConvertFieldToUInt32 ("environment_variable_count", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 14: // system_property_count: uint32_t / .word | .long + case 13: // system_property_count: uint32_t / .word | .long Assert.IsTrue (expectedUInt32Types.Contains (field [0]), $"Unexpected uint32_t field type in '{envFile.Path}:{item.LineNumber}': {field [0]}"); ret.system_property_count = ConvertFieldToUInt32 ("system_property_count", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 15: // number_of_assemblies_in_apk: uint32_t / .word | .long + case 14: // number_of_assemblies_in_apk: uint32_t / .word | .long Assert.IsTrue (expectedUInt32Types.Contains (field [0]), $"Unexpected uint32_t field type in '{envFile.Path}:{item.LineNumber}': {field [0]}"); ret.number_of_assemblies_in_apk = ConvertFieldToUInt32 ("number_of_assemblies_in_apk", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 16: // bundled_assembly_name_width: uint32_t / .word | .long + case 15: // bundled_assembly_name_width: uint32_t / .word | .long Assert.IsTrue (expectedUInt32Types.Contains (field [0]), $"Unexpected uint32_t field type in '{envFile.Path}:{item.LineNumber}': {field [0]}"); ret.bundled_assembly_name_width = ConvertFieldToUInt32 ("bundled_assembly_name_width", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 17: // number_of_assembly_store_files: uint32_t / .word | .long + case 16: // number_of_assembly_store_files: uint32_t / .word | .long Assert.IsTrue (expectedUInt32Types.Contains (field [0]), $"Unexpected uint32_t field type in '{envFile.Path}:{item.LineNumber}': {field [0]}"); ret.number_of_assembly_store_files = ConvertFieldToUInt32 ("number_of_assembly_store_files", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 18: // number_of_dso_cache_entries: uint32_t / .word | .long + case 17: // number_of_dso_cache_entries: uint32_t / .word | .long Assert.IsTrue (expectedUInt32Types.Contains (field [0]), $"Unexpected uint32_t field type in '{envFile.Path}:{item.LineNumber}': {field [0]}"); ret.number_of_dso_cache_entries = ConvertFieldToUInt32 ("number_of_dso_cache_entries", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 19: // android_runtime_jnienv_class_token: uint32_t / .word | .long + case 18: // android_runtime_jnienv_class_token: uint32_t / .word | .long Assert.IsTrue (expectedUInt32Types.Contains (field [0]), $"Unexpected uint32_t field type in '{envFile.Path}:{item.LineNumber}': {field [0]}"); ret.number_of_dso_cache_entries = ConvertFieldToUInt32 ("android_runtime_jnienv_class_token", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 20: // jnienv_initialize_method_token: uint32_t / .word | .long + case 19: // jnienv_initialize_method_token: uint32_t / .word | .long Assert.IsTrue (expectedUInt32Types.Contains (field [0]), $"Unexpected uint32_t field type in '{envFile.Path}:{item.LineNumber}': {field [0]}"); ret.number_of_dso_cache_entries = ConvertFieldToUInt32 ("jnienv_initialize_method_token", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 21: // jnienv_registerjninatives_method_token: uint32_t / .word | .long + case 20: // jnienv_registerjninatives_method_token: uint32_t / .word | .long Assert.IsTrue (expectedUInt32Types.Contains (field [0]), $"Unexpected uint32_t field type in '{envFile.Path}:{item.LineNumber}': {field [0]}"); ret.number_of_dso_cache_entries = ConvertFieldToUInt32 ("jnienv_registerjninatives_method_token", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 22: // jni_remapping_replacement_type_count: uint32_t / .word | .long + case 21: // jni_remapping_replacement_type_count: uint32_t / .word | .long Assert.IsTrue (expectedUInt32Types.Contains (field [0]), $"Unexpected uint32_t field type in '{envFile.Path}:{item.LineNumber}': {field [0]}"); ret.jni_remapping_replacement_type_count = ConvertFieldToUInt32 ("jni_remapping_replacement_type_count", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 23: // jni_remapping_replacement_method_index_entry_count: uint32_t / .word | .long + case 22: // jni_remapping_replacement_method_index_entry_count: uint32_t / .word | .long Assert.IsTrue (expectedUInt32Types.Contains (field [0]), $"Unexpected uint32_t field type in '{envFile.Path}:{item.LineNumber}': {field [0]}"); ret.jni_remapping_replacement_method_index_entry_count = ConvertFieldToUInt32 ("jni_remapping_replacement_method_index_entry_count", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 24: // mono_components_mask: uint32_t / .word | .long + case 23: // mono_components_mask: uint32_t / .word | .long Assert.IsTrue (expectedUInt32Types.Contains (field [0]), $"Unexpected uint32_t field type in '{envFile.Path}:{item.LineNumber}': {field [0]}"); ret.mono_components_mask = ConvertFieldToUInt32 ("mono_components_mask", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 25: // android_package_name: string / [pointer type] + case 24: // android_package_name: string / [pointer type] Assert.IsTrue (expectedPointerTypes.Contains (field [0]), $"Unexpected pointer field type in '{envFile.Path}:{item.LineNumber}': {field [0]}"); pointers.Add (field [1].Trim ()); break; @@ -434,7 +428,6 @@ static void AssertApplicationConfigIsIdentical (ApplicationConfig firstAppConfig { Assert.AreEqual (firstAppConfig.uses_mono_llvm, secondAppConfig.uses_mono_llvm, $"Field 'uses_mono_llvm' has different value in environment file '{secondEnvFile}' than in environment file '{firstEnvFile}'"); Assert.AreEqual (firstAppConfig.uses_mono_aot, secondAppConfig.uses_mono_aot, $"Field 'uses_mono_aot' has different value in environment file '{secondEnvFile}' than in environment file '{firstEnvFile}'"); - Assert.AreEqual (firstAppConfig.is_a_bundled_app, secondAppConfig.is_a_bundled_app, $"Field 'is_a_bundled_app' has different value in environment file '{secondEnvFile}' than in environment file '{firstEnvFile}'"); Assert.AreEqual (firstAppConfig.environment_variable_count, secondAppConfig.environment_variable_count, $"Field 'environment_variable_count' has different value in environment file '{secondEnvFile}' than in environment file '{firstEnvFile}'"); Assert.AreEqual (firstAppConfig.system_property_count, secondAppConfig.system_property_count, $"Field 'system_property_count' has different value in environment file '{secondEnvFile}' than in environment file '{firstEnvFile}'"); Assert.AreEqual (firstAppConfig.android_package_name, secondAppConfig.android_package_name, $"Field 'android_package_name' has different value in environment file '{secondEnvFile}' than in environment file '{firstEnvFile}'"); diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/KnownProperties.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/KnownProperties.cs index f59a3c9cc75..d8b7b63fa51 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/KnownProperties.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/KnownProperties.cs @@ -21,7 +21,6 @@ public static class KnownProperties public const string SupportedOSPlatformVersion = "SupportedOSPlatformVersion"; public const string Deterministic = "Deterministic"; - public const string BundleAssemblies = "BundleAssemblies"; public const string AndroidEnableDesugar = "AndroidEnableDesugar"; public const string AndroidManifestMerger = "AndroidManifestMerger"; public const string AndroidLinkTool = "AndroidLinkTool"; @@ -39,4 +38,3 @@ public static class KnownProperties public const string ImplicitUsings = "ImplicitUsings"; } } - diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/XamarinAndroidApplicationProject.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/XamarinAndroidApplicationProject.cs index 7e462f5cc64..fde6e298fa1 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/XamarinAndroidApplicationProject.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/XamarinAndroidApplicationProject.cs @@ -103,11 +103,6 @@ public virtual string DefaultMainActivity { /// public string MinSdkVersion { get; set; } = "19"; - public bool BundleAssemblies { - get { return string.Equals (GetProperty (KnownProperties.BundleAssemblies), "True", StringComparison.OrdinalIgnoreCase); } - set { SetProperty (KnownProperties.BundleAssemblies, value.ToString ()); } - } - string AotAssembliesPropertyName => Builder.UseDotNet ? KnownProperties.RunAOTCompilation : KnownProperties.AotAssemblies; public bool AotAssemblies { diff --git a/src/Xamarin.Android.Build.Tasks/Utilities/ApplicationConfig.cs b/src/Xamarin.Android.Build.Tasks/Utilities/ApplicationConfig.cs index e5a1405b127..25550eb3473 100644 --- a/src/Xamarin.Android.Build.Tasks/Utilities/ApplicationConfig.cs +++ b/src/Xamarin.Android.Build.Tasks/Utilities/ApplicationConfig.cs @@ -28,7 +28,6 @@ sealed class ApplicationConfig public bool uses_mono_aot; public bool aot_lazy_load; public bool uses_assembly_preload; - public bool is_a_bundled_app; public bool broken_exception_transitions; public bool instant_run_enabled ; public bool jni_add_native_method_registration_attribute_present; diff --git a/src/Xamarin.Android.Build.Tasks/Utilities/ApplicationConfigNativeAssemblyGenerator.cs b/src/Xamarin.Android.Build.Tasks/Utilities/ApplicationConfigNativeAssemblyGenerator.cs index 16bc2daa34a..6802af86229 100644 --- a/src/Xamarin.Android.Build.Tasks/Utilities/ApplicationConfigNativeAssemblyGenerator.cs +++ b/src/Xamarin.Android.Build.Tasks/Utilities/ApplicationConfigNativeAssemblyGenerator.cs @@ -149,7 +149,6 @@ sealed class XamarinAndroidBundledAssembly StructureInfo assemblyStoreSingleAssemblyRuntimeDataStructureinfo; StructureInfo assemblyStoreRuntimeDataStructureInfo; - public bool IsBundledApp { get; set; } public bool UsesMonoAOT { get; set; } public bool UsesMonoLLVM { get; set; } public bool UsesAssemblyPreload { get; set; } @@ -196,7 +195,6 @@ public override void Init () uses_mono_aot = UsesMonoAOT, aot_lazy_load = AotEnableLazyLoad, uses_assembly_preload = UsesAssemblyPreload, - is_a_bundled_app = IsBundledApp, broken_exception_transitions = BrokenExceptionTransitions, instant_run_enabled = InstantRunEnabled, jni_add_native_method_registration_attribute_present = JniAddNativeMethodRegistrationAttributePresent, diff --git a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj index dd902240461..ad980b06223 100644 --- a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj +++ b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj @@ -361,10 +361,6 @@ LayoutBinding.cs PreserveNewest - - mkbundle-api.h - PreserveNewest - PreserveNewest diff --git a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets index 1d63c65c6a0..2093580d04d 100644 --- a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets +++ b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets @@ -333,7 +333,7 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved. <_AndroidAotStripLibraries Condition=" '$(_AndroidAotStripLibraries)' == '' And '$(AndroidIncludeDebugSymbols)' != 'true' ">True - false + false true True True @@ -560,6 +560,10 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved. ResourceName="XA1026_dotnet" Condition=" '$(AndroidUseAapt2)' != 'true' and '$(UsingAndroidNETSdk)' == 'true' " /> + - <_PropertyCacheItems Include="BundleAssemblies=$(BundleAssemblies)" /> <_PropertyCacheItems Include="AotAssemblies=$(AotAssemblies)" /> <_PropertyCacheItems Include="AndroidAddKeepAlives=$(AndroidAddKeepAlives)" /> <_PropertyCacheItems Include="AndroidAotMode=$(AndroidAotMode)" /> @@ -1769,7 +1772,6 @@ because xbuild doesn't support framework reference assemblies. Debug="$(AndroidIncludeDebugSymbols)" AndroidSequencePointsMode="$(_SequencePointsMode)" EnableSGenConcurrent="$(AndroidEnableSGenConcurrent)" - IsBundledApplication="$(BundleAssemblies)" SupportedAbis="@(_BuildTargetAbis)" AndroidPackageName="$(_AndroidPackage)" EnablePreloadAssembliesDefault="$(_AndroidEnablePreloadAssembliesDefault)" @@ -2126,7 +2128,6 @@ because xbuild doesn't support framework reference assemblies. AndroidNdkDirectory="$(_AndroidNdkDirectory)" ApkInputPath="$(_PackagedResources)" ApkOutputPath="$(ApkFileIntermediate)" - BundleAssemblies="$(BundleAssemblies)" BundleNativeLibraries="$(_BundleResultNativeLibraries)" EmbedAssemblies="$(EmbedAssembliesIntoApk)" ResolvedUserAssemblies="@(_ShrunkUserAssemblies);@(_AndroidResolvedSatellitePaths)" @@ -2160,7 +2161,6 @@ because xbuild doesn't support framework reference assemblies. AndroidNdkDirectory="$(_AndroidNdkDirectory)" ApkInputPath="$(_PackagedResources)" ApkOutputPath="$(_BaseZipIntermediate)" - BundleAssemblies="$(BundleAssemblies)" BundleNativeLibraries="$(_BundleResultNativeLibraries)" EmbedAssemblies="$(EmbedAssembliesIntoApk)" ResolvedUserAssemblies="@(_ShrunkUserAssemblies);@(_AndroidResolvedSatellitePaths)" @@ -2745,7 +2745,7 @@ because xbuild doesn't support framework reference assemblies. <_ProjectAndroidManifest>$(ProjectDir)$(AndroidManifest) - <_NdkRequired Condition="'$(BundleAssemblies)' == 'True' Or '$(EnableLLVM)' == 'True'">true + <_NdkRequired Condition="'$(EnableLLVM)' == 'True'">true <_NdkRequired Condition="'$(_NdkRequired)' == ''">false diff --git a/src/monodroid/jni/application_dso_stub.cc b/src/monodroid/jni/application_dso_stub.cc index 5cbc623260a..8a59a03e51a 100644 --- a/src/monodroid/jni/application_dso_stub.cc +++ b/src/monodroid/jni/application_dso_stub.cc @@ -46,7 +46,6 @@ const ApplicationConfig application_config = { .uses_mono_aot = false, .aot_lazy_load = false, .uses_assembly_preload = false, - .is_a_bundled_app = false, .broken_exception_transitions = false, .instant_run_enabled = false, .jni_add_native_method_registration_attribute_present = false, diff --git a/src/monodroid/jni/logger.cc b/src/monodroid/jni/logger.cc index 7edd748b424..57f1ea79957 100644 --- a/src/monodroid/jni/logger.cc +++ b/src/monodroid/jni/logger.cc @@ -197,10 +197,6 @@ init_logging_categories (char*& mono_log_mask, char*& mono_log_level) continue; } - if (set_category ("bundle", param, LOG_BUNDLE)) { - continue; - } - if (set_category ("network", param, LOG_NET)) { continue; } diff --git a/src/monodroid/jni/mkbundle-api.h b/src/monodroid/jni/mkbundle-api.h deleted file mode 100644 index 586f5d26273..00000000000 --- a/src/monodroid/jni/mkbundle-api.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef __MKBUNDLE_API_H -#define __MKBUNDLE_API_H - -#ifdef __cplusplus -using namespace xamarin::android; -#endif - -typedef struct BundleMonoAPI -{ - void (*mono_register_bundled_assemblies) (const MonoBundledAssembly **assemblies); - void (*mono_register_config_for_assembly) (const char* assembly_name, const char* config_xml); - void (*mono_jit_set_aot_mode) (int mode); - void (*mono_aot_register_module) (void** aot_info); - void (*mono_config_parse_memory) (const char *buffer); - void (*mono_register_machine_config) (const char *config_xml); -} BundleMonoAPI; - -#if ANDROID -#include -#include - -#ifdef __cplusplus -[[maybe_unused]] -#endif -static void -mkbundle_log_error (const char *format, ...) -{ - va_list ap; - - va_start (ap, format); - __android_log_vprint (ANDROID_LOG_ERROR, "mkbundle", format, ap); - va_end (ap); -} -#endif // ANDROID -#endif // __MKBUNDLE_API_H diff --git a/src/monodroid/jni/monodroid-glue-internal.hh b/src/monodroid/jni/monodroid-glue-internal.hh index def9a263218..85128eb1915 100644 --- a/src/monodroid/jni/monodroid-glue-internal.hh +++ b/src/monodroid/jni/monodroid-glue-internal.hh @@ -304,7 +304,6 @@ namespace xamarin::android::internal void init_android_runtime (JNIEnv *env, jclass runtimeClass, jobject loader); #else //def NET void init_android_runtime (MonoDomain *domain, JNIEnv *env, jclass runtimeClass, jobject loader); - void setup_bundled_app (const char *dso_name); #endif // ndef NET void set_environment_variable_for_directory (const char *name, jstring_wrapper &value, bool createDirectory, mode_t mode); diff --git a/src/monodroid/jni/monodroid-glue.cc b/src/monodroid/jni/monodroid-glue.cc index d50c2c73d3a..d6a910d2c40 100644 --- a/src/monodroid/jni/monodroid-glue.cc +++ b/src/monodroid/jni/monodroid-glue.cc @@ -80,7 +80,6 @@ #include "debug.hh" #include "embedded-assemblies.hh" #include "monodroid-glue.hh" -#include "mkbundle-api.h" #include "monodroid-glue-internal.hh" #include "globals.hh" #include "xamarin-app.hh" @@ -104,10 +103,6 @@ using namespace microsoft::java_interop; using namespace xamarin::android; using namespace xamarin::android::internal; -// This is below the above because we don't want to modify the header with our internal -// implementation details as it would prevent mkbundle from working -#include "mkbundle-api.h" - #if !defined (NET) #include "config.include" #include "machine.config.include" @@ -175,58 +170,6 @@ setenv(const char *name, const char *value, int overwrite) } #endif // def WINDOWS -#if !defined (NET) -typedef void* (*mono_mkbundle_init_ptr) (void (*)(const MonoBundledAssembly **), void (*)(const char* assembly_name, const char* config_xml),void (*) (int mode)); -mono_mkbundle_init_ptr mono_mkbundle_init; - -typedef void (*mono_mkbundle_initialize_mono_api_ptr) (const BundleMonoAPI *info); -mono_mkbundle_initialize_mono_api_ptr mono_mkbundle_initialize_mono_api; - -void -MonodroidRuntime::setup_bundled_app (const char *dso_name) -{ - if (!application_config.is_a_bundled_app) - return; - - static unsigned int dlopen_flags = JAVA_INTEROP_LIB_LOAD_LOCALLY; - void *libapp = nullptr; - - if (androidSystem.is_embedded_dso_mode_enabled ()) { - log_info (LOG_DEFAULT, "bundle app: embedded DSO mode"); - libapp = androidSystem.load_dso_from_any_directories (dso_name, dlopen_flags); - } else { - log_info (LOG_DEFAULT, "bundle app: normal mode"); - dynamic_local_string bundle_path; - if (!androidSystem.get_full_dso_path_on_disk (dso_name, bundle_path)) { - log_info (LOG_DEFAULT, "bundle %s not found on filesystem", dso_name); - return; - } - log_info (LOG_BUNDLE, "Attempting to load bundled app from %s", bundle_path.get ()); - libapp = androidSystem.load_dso (bundle_path.get (), dlopen_flags, true); - } - - if (libapp == nullptr) { - log_info (LOG_DEFAULT, "No libapp!"); - if (!androidSystem.is_embedded_dso_mode_enabled ()) { - log_fatal (LOG_BUNDLE, "bundled app initialization error"); - Helpers::abort_application (); - } else { - log_info (LOG_BUNDLE, "bundled app not found in the APK, ignoring."); - return; - } - } - - mono_mkbundle_initialize_mono_api = reinterpret_cast (java_interop_lib_symbol (libapp, "initialize_mono_api", nullptr)); - if (mono_mkbundle_initialize_mono_api == nullptr) - log_error (LOG_BUNDLE, "Missing initialize_mono_api in the application"); - - mono_mkbundle_init = reinterpret_cast (java_interop_lib_symbol (libapp, "mono_mkbundle_init", nullptr)); - if (mono_mkbundle_init == nullptr) - log_error (LOG_BUNDLE, "Missing mono_mkbundle_init in the application"); - log_info (LOG_BUNDLE, "Bundled app loaded: %s", dso_name); -} -#endif - void MonodroidRuntime::thread_start ([[maybe_unused]] MonoProfiler *prof, [[maybe_unused]] uintptr_t tid) { @@ -854,24 +797,6 @@ MonodroidRuntime::mono_runtime_init ([[maybe_unused]] dynamic_local_string(mono_jit_set_aot_mode), - .mono_aot_register_module = mono_aot_register_module, - .mono_config_parse_memory = mono_config_parse_memory, - .mono_register_machine_config = reinterpret_cast(mono_register_machine_config), - }; - - /* The initialization function copies the struct */ - mono_mkbundle_initialize_mono_api (&bundle_mono_api); - } - - if (mono_mkbundle_init) - mono_mkbundle_init (mono_register_bundled_assemblies, mono_register_config_for_assembly, reinterpret_cast(mono_jit_set_aot_mode)); -#endif // ndef NET /* * Assembly preload hooks are invoked in _reverse_ registration order. * Looking for assemblies from the update dir takes precedence over @@ -905,11 +830,6 @@ MonoDomain* MonodroidRuntime::create_domain (JNIEnv *env, jstring_array_wrapper &runtimeApks, bool is_root_domain, bool have_split_apks) { size_t user_assemblies_count = 0; -#if defined (NET) - constexpr bool have_mono_mkbundle_init = false; -#else // def NET - bool have_mono_mkbundle_init = mono_mkbundle_init != nullptr; -#endif // ndef NET gather_bundled_assemblies (runtimeApks, &user_assemblies_count, have_split_apks); @@ -930,7 +850,7 @@ MonodroidRuntime::create_domain (JNIEnv *env, jstring_array_wrapper &runtimeApks } #endif // def NET - if (!have_mono_mkbundle_init && user_assemblies_count == 0 && androidSystem.count_override_assemblies () == 0 && !is_running_on_desktop) { + if (user_assemblies_count == 0 && androidSystem.count_override_assemblies () == 0 && !is_running_on_desktop) { #if defined (DEBUG) log_fatal (LOG_DEFAULT, "No assemblies found in '%s' or '%s'. Assuming this is part of Fast Deployment. Exiting...", androidSystem.get_override_dir (0), @@ -2262,10 +2182,6 @@ MonodroidRuntime::Java_mono_android_Runtime_initInternal (JNIEnv *env, jclass kl set_debug_env_vars (); #endif -#if !defined (NET) - setup_bundled_app ("libmonodroid_bundle_app.so"); -#endif - #if defined (ANDROID) bool have_log_assembly = (log_categories & LOG_ASSEMBLY) != 0; bool have_log_gc = (log_categories & LOG_GC) != 0; diff --git a/src/monodroid/jni/xamarin-app.hh b/src/monodroid/jni/xamarin-app.hh index 0843a17d270..3dbc037407b 100644 --- a/src/monodroid/jni/xamarin-app.hh +++ b/src/monodroid/jni/xamarin-app.hh @@ -205,7 +205,6 @@ struct ApplicationConfig bool uses_mono_aot; bool aot_lazy_load; bool uses_assembly_preload; - bool is_a_bundled_app; bool broken_exception_transitions; bool instant_run_enabled; bool jni_add_native_method_registration_attribute_present; diff --git a/tests/Xamarin.Forms-Performance-Integration/Droid/Xamarin.Forms.Performance.Integration.Droid.csproj b/tests/Xamarin.Forms-Performance-Integration/Droid/Xamarin.Forms.Performance.Integration.Droid.csproj index 18505d4c067..6d3fbc7f627 100644 --- a/tests/Xamarin.Forms-Performance-Integration/Droid/Xamarin.Forms.Performance.Integration.Droid.csproj +++ b/tests/Xamarin.Forms-Performance-Integration/Droid/Xamarin.Forms.Performance.Integration.Droid.csproj @@ -60,8 +60,7 @@ {195BE9C2-1F91-40DC-BD6D-DE860BF083FB} - - + diff --git a/tests/Xamarin.Forms-Performance-Integration/Xamarin.Forms.Performance.Integration.csproj b/tests/Xamarin.Forms-Performance-Integration/Xamarin.Forms.Performance.Integration.csproj index 6d83bbd37ff..a3ca49e47b0 100644 --- a/tests/Xamarin.Forms-Performance-Integration/Xamarin.Forms.Performance.Integration.csproj +++ b/tests/Xamarin.Forms-Performance-Integration/Xamarin.Forms.Performance.Integration.csproj @@ -10,7 +10,6 @@ - - + - \ No newline at end of file + From 3524476d199a284a737ca591fd963302101dd1e7 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Tue, 28 Feb 2023 17:35:01 -0600 Subject: [PATCH 10/22] $(AndroidPackVersionSuffix)=preview.3; net8 is 34.0.0-preview.3 (#7839) Context: https://github.com/xamarin/xamarin-android/tree/release/8.0.1xx-preview2 We branched for .NET 8 preview 2 from d0701eb into `release/8.0.1xx-preview2`. Update xamarin-android/main's version number to 34.0.0-preview.3 for .NET 8 preview 3. --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 33a80a4adcf..df130024544 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -35,7 +35,7 @@ * Bump first digit of the patch version for feature releases (and reset the first two digits to 0) --> 34.0.0 - preview.2 + preview.3 From 5d68699061cfa8150531bdb694aeac61120954ae Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Tue, 28 Feb 2023 21:07:32 -0600 Subject: [PATCH 11/22] Replace K4os.Hash.xxHash with System.IO.Hashing (#7831) This allows us to remove an external dependency and use code from dotnet/runtime. Update `create-installers.targets` to include `System.IO.Hashing.dll` and remove `K4os.Hash.xxHash.dll`. --- build-tools/installers/create-installers.targets | 2 +- eng/Version.Details.xml | 4 ++++ eng/Versions.props | 1 + .../Utilities/AssemblyStoreIndexEntry.cs | 7 +++---- .../Utilities/LlvmIrGenerator/LlvmIrComposer.cs | 7 +++---- .../Utilities/TypeMappingReleaseNativeAssemblyGenerator.cs | 6 +++--- .../Xamarin.Android.Build.Tasks.csproj | 2 +- 7 files changed, 16 insertions(+), 13 deletions(-) diff --git a/build-tools/installers/create-installers.targets b/build-tools/installers/create-installers.targets index 7cd264758a6..4ed80da1171 100644 --- a/build-tools/installers/create-installers.targets +++ b/build-tools/installers/create-installers.targets @@ -270,6 +270,7 @@ <_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)System.CodeDom.dll" /> <_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)System.Collections.Immutable.dll" /> <_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)System.Buffers.dll" /> + <_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)System.IO.Hashing.dll" /> <_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Aapt.targets" ExcludeFromAndroidNETSdk="true" /> <_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Aapt2.targets" /> <_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Analysis.targets" /> @@ -315,7 +316,6 @@ <_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Build.AsyncTask.dll" /> <_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Build.AsyncTask.pdb" /> <_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)K4os.Compression.LZ4.dll" /> - <_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)K4os.Hash.xxHash.dll" /> <_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)ELFSharp.dll" /> <_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)ManifestOverlays\Timing.xml" /> diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 548edd16819..8cde5bb99d6 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -16,6 +16,10 @@ https://github.com/dotnet/emsdk d7ff0aa47c680be543905cc1410e2f62b54dfefe + + https://github.com/dotnet/runtime + 9529803ae29c2804880c6bd8ca710b8c037cb498 + diff --git a/eng/Versions.props b/eng/Versions.props index c8776a79cd2..0a14f1f09ab 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -9,6 +9,7 @@ 8.0.0-preview.2.23113.1 $(MicrosoftNETWorkloadEmscriptenCurrentManifest80100preview2Version) 7.0.100-rc.1.22410.7 + 8.0.0-alpha.1.23080.2 diff --git a/src/Xamarin.Android.Build.Tasks/Utilities/AssemblyStoreIndexEntry.cs b/src/Xamarin.Android.Build.Tasks/Utilities/AssemblyStoreIndexEntry.cs index 59f012f5142..51d2bd8ca77 100644 --- a/src/Xamarin.Android.Build.Tasks/Utilities/AssemblyStoreIndexEntry.cs +++ b/src/Xamarin.Android.Build.Tasks/Utilities/AssemblyStoreIndexEntry.cs @@ -1,8 +1,7 @@ using System; +using System.IO.Hashing; using System.Text; -using K4os.Hash.xxHash; - namespace Xamarin.Android.Tasks { class AssemblyStoreIndexEntry @@ -37,8 +36,8 @@ public AssemblyStoreIndexEntry (string name, uint blobID, uint mappingIndex, uin LocalBlobIndex = localBlobIndex; byte[] nameBytes = Encoding.UTF8.GetBytes (name); - NameHash32 = XXH32.DigestOf (nameBytes, 0, nameBytes.Length); - NameHash64 = XXH64.DigestOf (nameBytes, 0, nameBytes.Length); + NameHash32 = XxHash32.HashToUInt32 (nameBytes); + NameHash64 = XxHash64.HashToUInt64 (nameBytes); } } } diff --git a/src/Xamarin.Android.Build.Tasks/Utilities/LlvmIrGenerator/LlvmIrComposer.cs b/src/Xamarin.Android.Build.Tasks/Utilities/LlvmIrGenerator/LlvmIrComposer.cs index 734ece97e18..374a432e76a 100644 --- a/src/Xamarin.Android.Build.Tasks/Utilities/LlvmIrGenerator/LlvmIrComposer.cs +++ b/src/Xamarin.Android.Build.Tasks/Utilities/LlvmIrGenerator/LlvmIrComposer.cs @@ -1,9 +1,8 @@ using System; using System.IO; +using System.IO.Hashing; using System.Text; -using K4os.Hash.xxHash; - using Xamarin.Android.Tools; namespace Xamarin.Android.Tasks.LLVMIR @@ -45,10 +44,10 @@ protected ulong HashName (string name, bool is64Bit) { byte[] nameBytes = Encoding.UTF8.GetBytes (name); if (is64Bit) { - return XXH64.DigestOf (nameBytes, 0, nameBytes.Length); + return XxHash64.HashToUInt64 (nameBytes); } - return (ulong)XXH32.DigestOf (nameBytes, 0, nameBytes.Length); + return (ulong)XxHash32.HashToUInt32 (nameBytes); } protected virtual void InitGenerator (LlvmIrGenerator generator) diff --git a/src/Xamarin.Android.Build.Tasks/Utilities/TypeMappingReleaseNativeAssemblyGenerator.cs b/src/Xamarin.Android.Build.Tasks/Utilities/TypeMappingReleaseNativeAssemblyGenerator.cs index 1152841c654..bc407b478aa 100644 --- a/src/Xamarin.Android.Build.Tasks/Utilities/TypeMappingReleaseNativeAssemblyGenerator.cs +++ b/src/Xamarin.Android.Build.Tasks/Utilities/TypeMappingReleaseNativeAssemblyGenerator.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; +using System.IO.Hashing; using System.Linq; using System.Text; -using K4os.Hash.xxHash; using Xamarin.Android.Tasks.LLVMIR; namespace Xamarin.Android.Tasks @@ -306,10 +306,10 @@ ulong HashName (string name) ulong HashBytes (byte[] bytes) { if (is64Bit) { - return XXH64.DigestOf (bytes, 0, bytes.Length); + return XxHash64.HashToUInt64 (bytes); } - return (ulong)XXH32.DigestOf (bytes, 0, bytes.Length); + return (ulong)XxHash32.HashToUInt32 (bytes); } } diff --git a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj index ad980b06223..b677c0ece0e 100644 --- a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj +++ b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj @@ -52,10 +52,10 @@ + - From ef3e7ce4e0df53930acb02c056f9d03efe9af8e5 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Wed, 1 Mar 2023 13:00:02 -0600 Subject: [PATCH 12/22] [build] pass `--skip-sign-check` to `dotnet workload` (#7840) Context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=7397299&view=logs&j=28f7b402-0b52-5743-3f46-b0c973acb4f8&t=06392762-0cbe-5837-5fae-a131d329206a&l=81 Context: 978b74f69ec049317501bd58f1f4a9073d13db46 Many times on release branches, parts of the .NET installer are signed, and we need to allow unsigned workloads to be installed via the `--skip-sign-check` flag: Rolling back pack Microsoft.Android.Sdk.Windows installation... Workload installation failed: Failed to validate package signing. Verifying Microsoft.Android.Sdk.Windows.34.0.0-ci.darc-release-8-0-1xx-preview2-cef50a92-f62d-4147-9b74-08689588cab8.180 This is testing a local build of the `android` workload, so it will not be signed at this stage. Let's put this change in main, so we don't have to keep doing this release branches. --- build-tools/create-packs/Directory.Build.targets | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build-tools/create-packs/Directory.Build.targets b/build-tools/create-packs/Directory.Build.targets index 8cb06e245c0..ff6d4f99933 100644 --- a/build-tools/create-packs/Directory.Build.targets +++ b/build-tools/create-packs/Directory.Build.targets @@ -129,6 +129,7 @@ <_InstallArguments Include="android" /> <_InstallArguments Include="android-$(AndroidLatestUnstableApiLevel)" Condition=" '@(_PreviewPacks->Count())' != '0' " /> <_InstallArguments Include="--skip-manifest-update" /> + <_InstallArguments Include="--skip-sign-check" /> <_InstallArguments Include="--verbosity diag" /> <_InstallArguments Include="--source "%(_NuGetSources.Identity)"" /> <_InstallArguments Include="--temp-dir "$(_TempDirectory)"" /> @@ -278,7 +279,7 @@ Overwrite="true" /> From 58c31dca361a6ae7e26dfaa4eb5a88c2bc6597ba Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Wed, 1 Mar 2023 17:45:06 -0500 Subject: [PATCH 13/22] [ci] Use compliance stage template (#7818) Context: https://github.com/xamarin/yaml-templates/blob/b186f6181c088c34bbf5dd210a343598f3e45489/security/full/v0.yml Updates our compliance stage to use the universal compliance template, ensuring that we run all required tasks and their latest versions. The `policheck-rules-db.mdb` file has been replaced with `.gdnsuppress` files, which are generated by the compliance build. These files provide a more convenient way to exclude specific "invalid" PoliCheck failures. If a new PoliCheck failure arises in the future that should be excluded, we can copy the entry for it from the `.gdnsuppress` file produced by the build and add it to the file we have in our sources. --- build-tools/automation/azure-pipelines.yaml | 74 ++---- .../automation/guardian/CHT.gdnsuppress | 26 ++ .../{ => guardian}/CredScanSuppressions.json | 0 .../PoliCheck.Exclusions.xml} | 7 +- .../automation/guardian/source.gdnsuppress | 236 ++++++++++++++++++ .../automation/guardian/tsaoptions-v2.json | 11 + build-tools/automation/policheck-rules-db.mdb | Bin 393216 -> 0 bytes .../BindingDatabase.cs | 22 +- 8 files changed, 312 insertions(+), 64 deletions(-) create mode 100644 build-tools/automation/guardian/CHT.gdnsuppress rename build-tools/automation/{ => guardian}/CredScanSuppressions.json (100%) rename build-tools/automation/{PoliCheckExclusions.xml => guardian/PoliCheck.Exclusions.xml} (51%) create mode 100644 build-tools/automation/guardian/source.gdnsuppress create mode 100644 build-tools/automation/guardian/tsaoptions-v2.json delete mode 100644 build-tools/automation/policheck-rules-db.mdb diff --git a/build-tools/automation/azure-pipelines.yaml b/build-tools/automation/azure-pipelines.yaml index 6e7fa3f3b5c..de78de7422a 100644 --- a/build-tools/automation/azure-pipelines.yaml +++ b/build-tools/automation/azure-pipelines.yaml @@ -1147,54 +1147,26 @@ stages: packageFilter: '*.nupkg;*.msi;*.pkg;*.vsix' GitHub.Token: $(GitHub.Token) -- stage: tenets - dependsOn: [] - displayName: Tenets - jobs: - # Check - "Xamarin.Android (Tenets Code Analysis)" - - job: run_static_analysis - displayName: Code Analysis - pool: - vmImage: $(HostedWinImage) - timeoutInMinutes: 60 - cancelTimeoutInMinutes: 5 - steps: - - checkout: self - submodules: recursive - - - template: security\credscan\v2.yml@yaml-templates - parameters: - suppressionsFile: $(System.DefaultWorkingDirectory)\build-tools\automation\CredScanSuppressions.json - - - template: security\policheck\v1.yml@yaml-templates - parameters: - exclusionFile: $(System.DefaultWorkingDirectory)\build-tools\automation\PoliCheckExclusions.xml - pE: 1|2|3|4 - rulesDBPath: $(System.DefaultWorkingDirectory)\build-tools\automation\policheck-rules-db.mdb - - - task: securedevelopmentteam.vss-secure-development-tools.build-task-antimalware.AntiMalware@3 - displayName: Run AntiMalware (Defender) Scan - inputs: - FileDirPath: $(System.DefaultWorkingDirectory) - EnableServices: true - condition: succeededOrFailed() - - - task: securedevelopmentteam.vss-secure-development-tools.build-task-report.SdtReport@1 - displayName: Create Security Analysis Report - inputs: - CredScan: true - PoliCheck: true - condition: succeededOrFailed() - - - task: securedevelopmentteam.vss-secure-development-tools.build-task-publishsecurityanalysislogs.PublishSecurityAnalysisLogs@2 - displayName: Publish Security Analysis Logs - inputs: - ArtifactName: CodeAnalysisLogs - condition: succeededOrFailed() - - - task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@1 - displayName: Fail Job if Security Issues are Detected - inputs: - CredScan: true - PoliCheck: true - condition: succeededOrFailed() +# Check - "Xamarin.Android (Compliance)" +- template: security/full/v0.yml@yaml-templates + parameters: + stageDependsOn: [] + credScanSuppressionFile: $(Build.SourcesDirectory)\build-tools\automation\guardian\CredScanSuppressions.json + sourceGdnSuppressionFile: $(Build.SourcesDirectory)\build-tools\automation\guardian\source.gdnsuppress + tsaConfigFile: $(Build.SourcesDirectory)\build-tools\automation\guardian\tsaoptions-v2.json + policheckLocScanEnabled: true + policheckExclusionFilesFolder: $(Build.SourcesDirectory)\build-tools\automation\guardian + policheckGdnSuppressionFilesFolder: $(Build.SourcesDirectory)\build-tools\automation\guardian + policheckChsScanFolder: $(Build.SourcesDirectory)\Localize\loc\zh-Hans + policheckChtScanFolder: $(Build.SourcesDirectory)\Localize\loc\zh-Hant + policheckCsyScanFolder: $(Build.SourcesDirectory)\Localize\loc\cs + policheckDeuScanFolder: $(Build.SourcesDirectory)\Localize\loc\de + policheckEsnScanFolder: $(Build.SourcesDirectory)\Localize\loc\es + policheckFraScanFolder: $(Build.SourcesDirectory)\Localize\loc\fr + policheckItaScanFolder: $(Build.SourcesDirectory)\Localize\loc\it + policheckJpnScanFolder: $(Build.SourcesDirectory)\Localize\loc\ja + policheckKorScanFolder: $(Build.SourcesDirectory)\Localize\loc\ko + policheckPlkScanFolder: $(Build.SourcesDirectory)\Localize\loc\pl + policheckPtbScanFolder: $(Build.SourcesDirectory)\Localize\loc\pt-BR + policheckRusScanFolder: $(Build.SourcesDirectory)\Localize\loc\ru + policheckTrkScanFolder: $(Build.SourcesDirectory)\Localize\loc\tr diff --git a/build-tools/automation/guardian/CHT.gdnsuppress b/build-tools/automation/guardian/CHT.gdnsuppress new file mode 100644 index 00000000000..4396a9a378a --- /dev/null +++ b/build-tools/automation/guardian/CHT.gdnsuppress @@ -0,0 +1,26 @@ +{ + "version": "latest", + "suppressionSets": { + "default": { + "name": "default", + "createdDate": "2023-02-24 00:05:39Z", + "lastUpdatedDate": "2023-02-24 00:05:39Z" + } + }, + "results": { + "04910d714a13bf4523ffa77350f654f52114fa4fa3d760c9f63186d41716c019": { + "signature": "04910d714a13bf4523ffa77350f654f52114fa4fa3d760c9f63186d41716c019", + "alternativeSignatures": [], + "target": "Localize/loc/zh-Hant/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl", + "memberOf": [ + "default" + ], + "tool": "policheck", + "ruleId": "64550", + "justification": "Reference to the Android package format APK.", + "createdDate": "2023-02-24 00:05:39Z", + "expirationDate": null, + "type": null + } + } +} diff --git a/build-tools/automation/CredScanSuppressions.json b/build-tools/automation/guardian/CredScanSuppressions.json similarity index 100% rename from build-tools/automation/CredScanSuppressions.json rename to build-tools/automation/guardian/CredScanSuppressions.json diff --git a/build-tools/automation/PoliCheckExclusions.xml b/build-tools/automation/guardian/PoliCheck.Exclusions.xml similarity index 51% rename from build-tools/automation/PoliCheckExclusions.xml rename to build-tools/automation/guardian/PoliCheck.Exclusions.xml index 4ec72dc9b23..3df47bb4a1a 100644 --- a/build-tools/automation/PoliCheckExclusions.xml +++ b/build-tools/automation/guardian/PoliCheck.Exclusions.xml @@ -1,10 +1,13 @@ - NREFACTORY + LICENSE-DATA|NREFACTORY|LOCALIZE - REMAINING-INT-CONSTS.TXT|TAIWANCALENDAR.XML|XAMARIN-ANDROID-SDK-9.XML|SQLITE3.C|MAP.CSV + REMAINING-INT-CONSTS.TXT|TAIWANCALENDAR.XML|XAMARIN-ANDROID-SDK-9.XML|SQLITE3.C|MAP.CSV|METHODMAP.EXT.CSV|EXTERNALWHITELIST.CSV|SYMBOLARCHIVEWHITELIST.CSV|POLICHECK.EXCLUSIONS.xml +|API-10.PARAMS.TXT|API-15.PARAMS.TXT|API-16.PARAMS.TXT|API-17.PARAMS.TXT|API-18.PARAMS.TXT|API-19.PARAMS.TXT|API-20.PARAMS.TXT|API-21.PARAMS.TXT|API-22.PARAMS.TXT|API-23.PARAMS.TXT|API-24.PARAMS.TXT +|API-25.PARAMS.TXT|API-26.PARAMS.TXT|API-27.PARAMS.TXT|API-28.PARAMS.TXT|API-29.PARAMS.TXT|API-30.PARAMS.TXT|API-31.PARAMS.TXT|API-32.PARAMS.TXT|API-33.PARAMS.TXT + diff --git a/build-tools/automation/guardian/source.gdnsuppress b/build-tools/automation/guardian/source.gdnsuppress new file mode 100644 index 00000000000..98123d3e81c --- /dev/null +++ b/build-tools/automation/guardian/source.gdnsuppress @@ -0,0 +1,236 @@ +{ + "version": "latest", + "suppressionSets": { + "default": { + "name": "default", + "createdDate": "2023-02-22 23:55:29Z", + "lastUpdatedDate": "2023-02-22 23:55:29Z" + } + }, + "results": { + "5a0a8690d8a06dfdbf6002c67fa64a60a94f3fc77a594034cce20382e88002aa": { + "signature": "5a0a8690d8a06dfdbf6002c67fa64a60a94f3fc77a594034cce20382e88002aa", + "alternativeSignatures": [], + "target": "src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj", + "memberOf": [ + "default" + ], + "tool": "policheck", + "ruleId": "79459", + "justification": "Reference to an external source file.", + "createdDate": "2023-02-22 23:55:29Z", + "expirationDate": null, + "type": null + }, + "1b319055b8e507b220d0dab341e67e20f49632fd1844a08a4fcc6d4493930ac5": { + "signature": "1b319055b8e507b220d0dab341e67e20f49632fd1844a08a4fcc6d4493930ac5", + "alternativeSignatures": [], + "target": "src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj", + "memberOf": [ + "default" + ], + "tool": "policheck", + "ruleId": "79459", + "justification": "Reference to an external source file.", + "createdDate": "2023-02-22 23:55:29Z", + "expirationDate": null, + "type": null + }, + "6789cab1bdc97b0cc3ad057b7fdd21d63cdf8bc2679391923803fa240ef81292": { + "signature": "6789cab1bdc97b0cc3ad057b7fdd21d63cdf8bc2679391923803fa240ef81292", + "alternativeSignatures": [], + "target": "Documentation/guides/building-apps/build-properties.md", + "memberOf": [ + "default" + ], + "tool": "policheck", + "ruleId": "185843", + "justification": "Reference to an ISCII term.", + "createdDate": "2023-02-22 23:55:29Z", + "expirationDate": null, + "type": null + }, + "bbaf5f946cb72748567e41f0df5f1bae05550f4ba7381e21ec6b26d6c3ecec9f": { + "signature": "bbaf5f946cb72748567e41f0df5f1bae05550f4ba7381e21ec6b26d6c3ecec9f", + "alternativeSignatures": [], + "target": "Documentation/guides/building-apps/build-properties.md", + "memberOf": [ + "default" + ], + "tool": "policheck", + "ruleId": "185837", + "justification": "Reference to an ISCII term.", + "createdDate": "2023-02-22 23:55:29Z", + "expirationDate": null, + "type": null + }, + "db8916a0f0cdca4082c540921dd362e09a9ff413862ab826308411b76ee35789": { + "signature": "db8916a0f0cdca4082c540921dd362e09a9ff413862ab826308411b76ee35789", + "alternativeSignatures": [], + "target": "src/Mono.Android/Android.Util/Log.cs", + "memberOf": [ + "default" + ], + "tool": "policheck", + "ruleId": "80418", + "justification": "Reference to an Android logging function.", + "createdDate": "2023-02-22 23:55:29Z", + "expirationDate": null, + "type": null + }, + "58fab4dfef38677720e955e546a6af108332c65daafb0d043ad9d93442300a30": { + "signature": "58fab4dfef38677720e955e546a6af108332c65daafb0d043ad9d93442300a30", + "alternativeSignatures": [], + "target": "src/Mono.Android/Android.Util/Log.cs", + "memberOf": [ + "default" + ], + "tool": "policheck", + "ruleId": "80418", + "justification": "Reference to an Android logging function.", + "createdDate": "2023-02-22 23:55:29Z", + "expirationDate": null, + "type": null + }, + "b07e75fc8a506b94690dbd06877da06c1228e40e7deda3967f6b882b842f726d": { + "signature": "b07e75fc8a506b94690dbd06877da06c1228e40e7deda3967f6b882b842f726d", + "alternativeSignatures": [], + "target": "src/Mono.Android/Android.Util/Log.cs", + "memberOf": [ + "default" + ], + "tool": "policheck", + "ruleId": "80418", + "justification": "Reference to an Android logging function.", + "createdDate": "2023-02-22 23:55:29Z", + "expirationDate": null, + "type": null + }, + "87d8313310c2dd42021844b95bdcb9121bf10036fea5b212b945e0732a456e5a": { + "signature": "87d8313310c2dd42021844b95bdcb9121bf10036fea5b212b945e0732a456e5a", + "alternativeSignatures": [], + "target": "src/Mono.Android/Android.Util/Log.cs", + "memberOf": [ + "default" + ], + "tool": "policheck", + "ruleId": "80418", + "justification": "Reference to an Android logging function.", + "createdDate": "2023-02-22 23:55:29Z", + "expirationDate": null, + "type": null + }, + "8e5400e0233c8d887ad48bd8a48e8a7be5a579f9eefad521419b6df0828bbfac": { + "signature": "8e5400e0233c8d887ad48bd8a48e8a7be5a579f9eefad521419b6df0828bbfac", + "alternativeSignatures": [], + "target": "src/Mono.Android/Android.Util/Log.cs", + "memberOf": [ + "default" + ], + "tool": "policheck", + "ruleId": "80418", + "justification": "Reference to an Android logging function.", + "createdDate": "2023-02-22 23:55:29Z", + "expirationDate": null, + "type": null + }, + "06af52be6b6f87455b1db2eb6e631e783f1dacaf607c9b5f34cdee669992c8b5": { + "signature": "06af52be6b6f87455b1db2eb6e631e783f1dacaf607c9b5f34cdee669992c8b5", + "alternativeSignatures": [], + "target": "src/Mono.Android/Android.Util/Log.cs", + "memberOf": [ + "default" + ], + "tool": "policheck", + "ruleId": "80418", + "justification": "Reference to an Android logging function.", + "createdDate": "2023-02-22 23:55:29Z", + "expirationDate": null, + "type": null + }, + "a2b4d032c59a9d1211d218c3cd550cf8febb369941d70284d07d03ebee855bc0": { + "signature": "a2b4d032c59a9d1211d218c3cd550cf8febb369941d70284d07d03ebee855bc0", + "alternativeSignatures": [], + "target": "src/monodroid/jni/logger.cc", + "memberOf": [ + "default" + ], + "tool": "policheck", + "ruleId": "79668", + "justification": "Reference to find first set bit function.", + "createdDate": "2023-02-22 23:55:29Z", + "expirationDate": null, + "type": null + }, + "1c87b45a6044d205dc3f3562f349c238f7cabe22b4609da762df9dc44151e9fb": { + "signature": "1c87b45a6044d205dc3f3562f349c238f7cabe22b4609da762df9dc44151e9fb", + "alternativeSignatures": [], + "target": "src/monodroid/jni/logger.cc", + "memberOf": [ + "default" + ], + "tool": "policheck", + "ruleId": "79668", + "justification": "Reference to find first set bit function.", + "createdDate": "2023-02-22 23:55:29Z", + "expirationDate": null, + "type": null + }, + "a6639098c4785509a4215c9e2fc10f82c06fce461915dc11a00227ddec558845": { + "signature": "a6639098c4785509a4215c9e2fc10f82c06fce461915dc11a00227ddec558845", + "alternativeSignatures": [], + "target": "src/monodroid/jni/logger.cc", + "memberOf": [ + "default" + ], + "tool": "policheck", + "ruleId": "79668", + "justification": "Reference to find first set bit function.", + "createdDate": "2023-02-22 23:55:29Z", + "expirationDate": null, + "type": null + }, + "d6b3df0b1d35cb4acec6a954acc145c9ec22041cd463b94ff080682c65a9bd62": { + "signature": "d6b3df0b1d35cb4acec6a954acc145c9ec22041cd463b94ff080682c65a9bd62", + "alternativeSignatures": [], + "target": "src/monodroid/jni/logger.cc", + "memberOf": [ + "default" + ], + "tool": "policheck", + "ruleId": "79668", + "justification": "Reference to find first set bit function.", + "createdDate": "2023-02-22 23:55:29Z", + "expirationDate": null, + "type": null + }, + "b34b42aa41018376a31460c142f2ae910704725d9e9a4470f92b587df682369b": { + "signature": "b34b42aa41018376a31460c142f2ae910704725d9e9a4470f92b587df682369b", + "alternativeSignatures": [], + "target": "src/Xamarin.Android.Build.Tasks/Tasks/Aapt2.cs", + "memberOf": [ + "default" + ], + "tool": "policheck", + "ruleId": "80411", + "justification": "Reference to output from an external tool.", + "createdDate": "2023-02-22 23:55:29Z", + "expirationDate": null, + "type": null + }, + "75474fa652dbbf8f96826100a5fe37ba686a032ca07d61ef68a79c8e4412c150": { + "signature": "75474fa652dbbf8f96826100a5fe37ba686a032ca07d61ef68a79c8e4412c150", + "alternativeSignatures": [], + "target": "src/Xamarin.Android.Build.Tasks/Linker/MonoDroid.Tuner/Linker.cs", + "memberOf": [ + "default" + ], + "tool": "policheck", + "ruleId": "79459", + "justification": "Reference to an external source file.", + "createdDate": "2023-02-22 23:55:29Z", + "expirationDate": null, + "type": null + } + } +} diff --git a/build-tools/automation/guardian/tsaoptions-v2.json b/build-tools/automation/guardian/tsaoptions-v2.json new file mode 100644 index 00000000000..21ad8c31a7d --- /dev/null +++ b/build-tools/automation/guardian/tsaoptions-v2.json @@ -0,0 +1,11 @@ +{ + "codebaseName": "xamarin.android_main", + "notificationAliases": [ + "dotnet-android-eng@microsoft.com" + ], + "instanceUrl": "https://devdiv.visualstudio.com/", + "projectName": "DevDiv", + "areaPath": "DevDiv\\VS Client - Runtime SDKs\\Android", + "iterationPath": "DevDiv", + "allTools": true +} diff --git a/build-tools/automation/policheck-rules-db.mdb b/build-tools/automation/policheck-rules-db.mdb deleted file mode 100644 index 02956d95da1c30db3126364b14f92131cffa60d2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 393216 zcmeI531D1Rz5m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(n2F=R!DL=e{ytRk4>EC_(y)T@DXf`^RylenjvvXgQ7!F%l$9PVXRXII ziUlN;sg`KXb7>tVq;b0R0H!*#HPwfuCIb*j#6{{m_3TV({~xUr!KM8#?SD>)PnA3< c?SE nsmap; Dictionary regs; - List asses = new List (); + List assems = new List (); public BindingDatabase (IEnumerable assemblies, Func resolveAssembly) { - foreach (var assfile in assemblies) { - var ass = resolveAssembly (assfile); - if (ass == null) + foreach (var assemfile in assemblies) { + var assem = resolveAssembly (assemfile); + if (assem == null) throw new InvalidOperationException ("Failed to resolve specified assembly"); - asses.Add (ass); + assems.Add (assem); } Initialize (assemblies, resolveAssembly); } - public BindingDatabase (IEnumerable asses) + public BindingDatabase (IEnumerable assems) { - this.asses.AddRange (asses); + this.assems.AddRange (assems); Initialize (null, null); } @@ -43,17 +43,17 @@ void Initialize (IEnumerable assemblies, Func var r = new Dictionary (); regs = r; - foreach (var ass in asses) { - if (!ass.CustomAttributes.Any (a => a.AttributeType.FullName != "Android.Runtime.NamespaceMappingAttribute")) + foreach (var assem in assems) { + if (!assem.CustomAttributes.Any (a => a.AttributeType.FullName != "Android.Runtime.NamespaceMappingAttribute")) continue; // irrelevant assembly. - foreach (var att in ass.CustomAttributes) { + foreach (var att in assem.CustomAttributes) { if (att.AttributeType.FullName != "Android.Runtime.NamespaceMappingAttribute") continue; string java = (string) att.Properties.First (p => p.Name == "Java").Argument.Value; string cs = (string) att.Properties.First (p => p.Name == "Managed").Argument.Value; d [java] = cs; } - foreach (var md in ass.Modules) + foreach (var md in assem.Modules) foreach (var td in md.Types.Where (t => t.IsPublic || t.IsNestedPublic)) foreach (var att in td.CustomAttributes.Where (a => a.AttributeType.FullName == "Android.Runtime.RegisterAttribute")) r [((string) att.ConstructorArguments [0].Value).Replace ('/', '.').Replace ('$', '.')] = td.FullName; From 6e1e6124117ba219c8738043b4e5463fefd6d108 Mon Sep 17 00:00:00 2001 From: VS MobileTools Engineering Service 2 Date: Wed, 1 Mar 2023 22:29:18 -0500 Subject: [PATCH 14/22] Localized file check-in by OneLocBuild Task (#7842) Context: https://aka.ms/onelocbuild Context: https://aka.ms/AllAboutLoc Build definition ID 17928: Build ID 7401514 --- src/Xamarin.Android.Build.Tasks/Properties/Resources.cs.resx | 4 ++++ src/Xamarin.Android.Build.Tasks/Properties/Resources.de.resx | 4 ++++ src/Xamarin.Android.Build.Tasks/Properties/Resources.es.resx | 4 ++++ src/Xamarin.Android.Build.Tasks/Properties/Resources.fr.resx | 4 ++++ src/Xamarin.Android.Build.Tasks/Properties/Resources.it.resx | 4 ++++ src/Xamarin.Android.Build.Tasks/Properties/Resources.ja.resx | 4 ++++ src/Xamarin.Android.Build.Tasks/Properties/Resources.ko.resx | 4 ++++ src/Xamarin.Android.Build.Tasks/Properties/Resources.pl.resx | 4 ++++ .../Properties/Resources.pt-BR.resx | 4 ++++ src/Xamarin.Android.Build.Tasks/Properties/Resources.ru.resx | 4 ++++ src/Xamarin.Android.Build.Tasks/Properties/Resources.tr.resx | 4 ++++ .../Properties/Resources.zh-Hans.resx | 4 ++++ .../Properties/Resources.zh-Hant.resx | 4 ++++ 13 files changed, 52 insertions(+) diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.cs.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.cs.resx index 8d44a930d84..fa055e228e5 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.cs.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.cs.resx @@ -493,6 +493,10 @@ Změňte hodnotu na název typu kvalifikovaného sestavení, který dědí z: {1 The following are literal names and should not be translated: '_Microsoft.Android.Resource.Desinger', 'AndroidUseDesignerAssembly', 'true' {0} - The name of the assembly + + The 'BundleAssemblies' property is deprecated and it has no effect on the application build. Equivalent functionality is implemented by the 'AndroidUseAssemblyStore' and 'AndroidEnableAssemblyCompression' properties. + The following are literal names and should not be translated: 'BundleAssemblies', 'AndroidUseAssemblyStore', 'AndroidEnableAssemblyCompression' + Použití funkce AppDomain.CreateDomain() zjištěné v sestavení: {0}. .NET 6 a vyšší bude podporovat jenom jednu doménu AppDomain, takže toto rozhraní API už nebude dostupné v Xamarin.Android po vydání .NET 6. The following are literal names and should not be translated: AppDomain.CreateDomain(), AppDomain diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.de.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.de.resx index e6fba0d9357..9c6d1d8ac53 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.de.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.de.resx @@ -493,6 +493,10 @@ Bitte ändern Sie den Wert in einen Assembly-basierten Typnamen, der von „{1} The following are literal names and should not be translated: '_Microsoft.Android.Resource.Desinger', 'AndroidUseDesignerAssembly', 'true' {0} - The name of the assembly + + The 'BundleAssemblies' property is deprecated and it has no effect on the application build. Equivalent functionality is implemented by the 'AndroidUseAssemblyStore' and 'AndroidEnableAssemblyCompression' properties. + The following are literal names and should not be translated: 'BundleAssemblies', 'AndroidUseAssemblyStore', 'AndroidEnableAssemblyCompression' + In der Assembly "{0}" wurde die Verwendung von "AppDomain.CreateDomain()" festgestellt. .NET 6 und höher unterstützt nur eine einzelne AppDomain, sodass diese API nach dem Release von .NET 6 nicht mehr in Xamarin.Android verfügbar ist. The following are literal names and should not be translated: AppDomain.CreateDomain(), AppDomain diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.es.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.es.resx index d8bf1e7ac06..ff46919289d 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.es.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.es.resx @@ -493,6 +493,10 @@ Cambie el valor a un nombre de tipo de ensamblado que herede de "{1}" o quite la The following are literal names and should not be translated: '_Microsoft.Android.Resource.Desinger', 'AndroidUseDesignerAssembly', 'true' {0} - The name of the assembly + + The 'BundleAssemblies' property is deprecated and it has no effect on the application build. Equivalent functionality is implemented by the 'AndroidUseAssemblyStore' and 'AndroidEnableAssemblyCompression' properties. + The following are literal names and should not be translated: 'BundleAssemblies', 'AndroidUseAssemblyStore', 'AndroidEnableAssemblyCompression' + Se detectó el uso de AppDomain.CreateDomain() en el ensamblado: {0}. En .NET 6 y versiones posteriores solo se admitirá una instancia de AppDomain, por lo que esta API ya no estará disponible en Xamarin.Android una vez que se haya lanzado .NET 6. The following are literal names and should not be translated: AppDomain.CreateDomain(), AppDomain diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.fr.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.fr.resx index 29f009959e9..183fbf61e95 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.fr.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.fr.resx @@ -493,6 +493,10 @@ Veuillez remplacer la valeur par un nom de type qualifié par l’assembly qui h The following are literal names and should not be translated: '_Microsoft.Android.Resource.Desinger', 'AndroidUseDesignerAssembly', 'true' {0} - The name of the assembly + + The 'BundleAssemblies' property is deprecated and it has no effect on the application build. Equivalent functionality is implemented by the 'AndroidUseAssemblyStore' and 'AndroidEnableAssemblyCompression' properties. + The following are literal names and should not be translated: 'BundleAssemblies', 'AndroidUseAssemblyStore', 'AndroidEnableAssemblyCompression' + Utilisation de AppDomain.CreateDomain() détectée dans l'assembly : {0}. .NET 6 et les versions ultérieures prend uniquement en charge un seul AppDomain. Cette API ne sera donc plus disponible dans Xamarin.Android après la publication de .NET 6. The following are literal names and should not be translated: AppDomain.CreateDomain(), AppDomain diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.it.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.it.resx index ea308e8cacf..e74b91a1880 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.it.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.it.resx @@ -493,6 +493,10 @@ Modificare il valore in un nome di tipo con qualifica assembly che eredita da '{ The following are literal names and should not be translated: '_Microsoft.Android.Resource.Desinger', 'AndroidUseDesignerAssembly', 'true' {0} - The name of the assembly + + The 'BundleAssemblies' property is deprecated and it has no effect on the application build. Equivalent functionality is implemented by the 'AndroidUseAssemblyStore' and 'AndroidEnableAssemblyCompression' properties. + The following are literal names and should not be translated: 'BundleAssemblies', 'AndroidUseAssemblyStore', 'AndroidEnableAssemblyCompression' + È stato rilevato l'uso di AppDomain.CreateDomain() nell'assembly: {0}. .NET 6 e versioni successive supporteranno solo un singolo AppDomain, quindi questa API non sarà più disponibile in Xamarin.Android dopo il rilascio di .NET 6. The following are literal names and should not be translated: AppDomain.CreateDomain(), AppDomain diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.ja.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.ja.resx index 193acff865b..e2607384e49 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.ja.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.ja.resx @@ -493,6 +493,10 @@ In this message, the term "binding" means a piece of generated code that makes i The following are literal names and should not be translated: '_Microsoft.Android.Resource.Desinger', 'AndroidUseDesignerAssembly', 'true' {0} - The name of the assembly + + The 'BundleAssemblies' property is deprecated and it has no effect on the application build. Equivalent functionality is implemented by the 'AndroidUseAssemblyStore' and 'AndroidEnableAssemblyCompression' properties. + The following are literal names and should not be translated: 'BundleAssemblies', 'AndroidUseAssemblyStore', 'AndroidEnableAssemblyCompression' + アセンブリ {0} で AppDomain.CreateDomain() が使用されていることが検出されました。.NET 6 以降では単一の AppDomain のみがサポートされる予定のため、.NET 6 がリリースされるとこの API は Xamarin.Android では使用できなくなります。 The following are literal names and should not be translated: AppDomain.CreateDomain(), AppDomain diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.ko.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.ko.resx index 281f217c284..8c291f0b9cd 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.ko.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.ko.resx @@ -493,6 +493,10 @@ In this message, the term "binding" means a piece of generated code that makes i The following are literal names and should not be translated: '_Microsoft.Android.Resource.Desinger', 'AndroidUseDesignerAssembly', 'true' {0} - The name of the assembly + + The 'BundleAssemblies' property is deprecated and it has no effect on the application build. Equivalent functionality is implemented by the 'AndroidUseAssemblyStore' and 'AndroidEnableAssemblyCompression' properties. + The following are literal names and should not be translated: 'BundleAssemblies', 'AndroidUseAssemblyStore', 'AndroidEnableAssemblyCompression' + 어셈블리에서 AppDomain.CreateDomain()의 사용이 검색되었습니다. {0}. .NET 6 이상에서는 단일 AppDomain만 지원하므로 .NET 6이 릴리스된 후에는 이 API를 Xamarin.Android에서 더 이상 사용할 수 없습니다. The following are literal names and should not be translated: AppDomain.CreateDomain(), AppDomain diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.pl.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.pl.resx index a2952077e45..dc7fe4bdcb5 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.pl.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.pl.resx @@ -493,6 +493,10 @@ Zmień wartość na nazwę typu kwalifikowalnego zestawu, która dziedziczy po The following are literal names and should not be translated: '_Microsoft.Android.Resource.Desinger', 'AndroidUseDesignerAssembly', 'true' {0} - The name of the assembly + + The 'BundleAssemblies' property is deprecated and it has no effect on the application build. Equivalent functionality is implemented by the 'AndroidUseAssemblyStore' and 'AndroidEnableAssemblyCompression' properties. + The following are literal names and should not be translated: 'BundleAssemblies', 'AndroidUseAssemblyStore', 'AndroidEnableAssemblyCompression' + Wykryto użycie metody AppDomain.CreateDomain() w zestawie: {0}. Platforma .NET 6 lub nowsza wersja obsługuje tylko jedną domenę aplikacji, dlatego ten interfejs API nie będzie już dostępny w rozszerzeniu Xamarin.Android po wydaniu platformy .NET 6. The following are literal names and should not be translated: AppDomain.CreateDomain(), AppDomain diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.pt-BR.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.pt-BR.resx index b08ac3ff3bf..4dcb7a2b9dc 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.pt-BR.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.pt-BR.resx @@ -493,6 +493,10 @@ Altere o valor para um nome de tipo qualificado por assembly que herda de "{1}" The following are literal names and should not be translated: '_Microsoft.Android.Resource.Desinger', 'AndroidUseDesignerAssembly', 'true' {0} - The name of the assembly + + The 'BundleAssemblies' property is deprecated and it has no effect on the application build. Equivalent functionality is implemented by the 'AndroidUseAssemblyStore' and 'AndroidEnableAssemblyCompression' properties. + The following are literal names and should not be translated: 'BundleAssemblies', 'AndroidUseAssemblyStore', 'AndroidEnableAssemblyCompression' + O uso de AppDomain.CreateDomain() foi detectado no assembly: {0}. O .NET 6 e superior dará suporte apenas a um único AppDomain, portanto, esta API não estará mais disponível no Xamarin.Android quando o .NET 6 for lançado. The following are literal names and should not be translated: AppDomain.CreateDomain(), AppDomain diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.ru.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.ru.resx index 520db7fa520..5a807faa40c 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.ru.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.ru.resx @@ -493,6 +493,10 @@ In this message, the term "binding" means a piece of generated code that makes i The following are literal names and should not be translated: '_Microsoft.Android.Resource.Desinger', 'AndroidUseDesignerAssembly', 'true' {0} - The name of the assembly + + The 'BundleAssemblies' property is deprecated and it has no effect on the application build. Equivalent functionality is implemented by the 'AndroidUseAssemblyStore' and 'AndroidEnableAssemblyCompression' properties. + The following are literal names and should not be translated: 'BundleAssemblies', 'AndroidUseAssemblyStore', 'AndroidEnableAssemblyCompression' + В сборке обнаружено использование AppDomain.CreateDomain(): {0}. .NET 6 и более поздние версии будут поддерживать только один домен AppDomain, поэтому этот API больше не будет доступен в Xamarin.Android после выпуска .NET 6. The following are literal names and should not be translated: AppDomain.CreateDomain(), AppDomain diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.tr.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.tr.resx index 420735cefdc..a013f7e6b8b 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.tr.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.tr.resx @@ -493,6 +493,10 @@ Lütfen değeri '{1}' türünden devralan derlemeye uygun bir tür adına dönü The following are literal names and should not be translated: '_Microsoft.Android.Resource.Desinger', 'AndroidUseDesignerAssembly', 'true' {0} - The name of the assembly + + The 'BundleAssemblies' property is deprecated and it has no effect on the application build. Equivalent functionality is implemented by the 'AndroidUseAssemblyStore' and 'AndroidEnableAssemblyCompression' properties. + The following are literal names and should not be translated: 'BundleAssemblies', 'AndroidUseAssemblyStore', 'AndroidEnableAssemblyCompression' + {0} bütünleştirilmiş kodunda AppDomain.CreateDomain() metodunun kullanıldığı saptandı. .NET 6 üstünde yalnızca tek bir AppDomain destekleneceğinden bu API, .NET 6 yayımlandıktan sonra artık Xamarin.Android içinde bulunmayacaktır. The following are literal names and should not be translated: AppDomain.CreateDomain(), AppDomain diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.zh-Hans.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.zh-Hans.resx index 4d30aab35a2..283b26a8591 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.zh-Hans.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.zh-Hans.resx @@ -493,6 +493,10 @@ In this message, the term "binding" means a piece of generated code that makes i The following are literal names and should not be translated: '_Microsoft.Android.Resource.Desinger', 'AndroidUseDesignerAssembly', 'true' {0} - The name of the assembly + + The 'BundleAssemblies' property is deprecated and it has no effect on the application build. Equivalent functionality is implemented by the 'AndroidUseAssemblyStore' and 'AndroidEnableAssemblyCompression' properties. + The following are literal names and should not be translated: 'BundleAssemblies', 'AndroidUseAssemblyStore', 'AndroidEnableAssemblyCompression' + 在程序集 {0} 中检测到使用了 AppDomain.CreateDomain()。.NET 6 及更高版本将仅支持一个 AppDomain,因此 .NET 6 发布后,将无法再在 Xamarin.Android 中使用此 API。 The following are literal names and should not be translated: AppDomain.CreateDomain(), AppDomain diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.zh-Hant.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.zh-Hant.resx index 44d27e2135c..cffa2c82349 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.zh-Hant.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.zh-Hant.resx @@ -493,6 +493,10 @@ In this message, the term "binding" means a piece of generated code that makes i The following are literal names and should not be translated: '_Microsoft.Android.Resource.Desinger', 'AndroidUseDesignerAssembly', 'true' {0} - The name of the assembly + + The 'BundleAssemblies' property is deprecated and it has no effect on the application build. Equivalent functionality is implemented by the 'AndroidUseAssemblyStore' and 'AndroidEnableAssemblyCompression' properties. + The following are literal names and should not be translated: 'BundleAssemblies', 'AndroidUseAssemblyStore', 'AndroidEnableAssemblyCompression' + 在下列組件中偵測到使用 AppDomain.CreateDomain(): {0}。.NET 6 及更新版本只支援單一 AppDomain,因此在 .NET 6 發行之後,此 API 就無法再於 Xamarin.Android 中使用。 The following are literal names and should not be translated: AppDomain.CreateDomain(), AppDomain From f007593864da0579ff251a745b01b929f59fb043 Mon Sep 17 00:00:00 2001 From: Alex Hsu Date: Thu, 2 Mar 2023 03:40:30 -0800 Subject: [PATCH 15/22] LEGO: Merge pull request 7845 LEGO: Merge pull request 7845 --- .../Properties/Resources.resx.lcl | 9 +++++++++ .../Properties/Resources.resx.lcl | 9 +++++++++ .../Properties/Resources.resx.lcl | 9 +++++++++ .../Properties/Resources.resx.lcl | 9 +++++++++ .../Properties/Resources.resx.lcl | 9 +++++++++ .../Properties/Resources.resx.lcl | 9 +++++++++ .../Properties/Resources.resx.lcl | 9 +++++++++ .../Properties/Resources.resx.lcl | 9 +++++++++ 8 files changed, 72 insertions(+) diff --git a/Localize/loc/cs/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl b/Localize/loc/cs/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl index 5d4023d2cbe..387730c8967 100644 --- a/Localize/loc/cs/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl +++ b/Localize/loc/cs/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl @@ -711,6 +711,15 @@ + + + + + + + + + diff --git a/Localize/loc/de/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl b/Localize/loc/de/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl index 21b333ab44d..84ec2c4135d 100644 --- a/Localize/loc/de/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl +++ b/Localize/loc/de/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl @@ -711,6 +711,15 @@ + + + + + + + + + diff --git a/Localize/loc/es/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl b/Localize/loc/es/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl index 4d7b9a4e632..e699ec01daf 100644 --- a/Localize/loc/es/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl +++ b/Localize/loc/es/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl @@ -711,6 +711,15 @@ + + + + + + + + + diff --git a/Localize/loc/fr/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl b/Localize/loc/fr/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl index 5deff29a644..75ec6dd8de9 100644 --- a/Localize/loc/fr/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl +++ b/Localize/loc/fr/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl @@ -711,6 +711,15 @@ + + + + + + + + + diff --git a/Localize/loc/it/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl b/Localize/loc/it/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl index 36d61e30342..6bba044e0d6 100644 --- a/Localize/loc/it/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl +++ b/Localize/loc/it/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl @@ -711,6 +711,15 @@ + + + + + + + + + diff --git a/Localize/loc/ja/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl b/Localize/loc/ja/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl index 19223b02cf7..51901028043 100644 --- a/Localize/loc/ja/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl +++ b/Localize/loc/ja/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl @@ -711,6 +711,15 @@ + + + + + + + + + diff --git a/Localize/loc/pt-BR/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl b/Localize/loc/pt-BR/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl index e80554b73f6..3586cfb703a 100644 --- a/Localize/loc/pt-BR/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl +++ b/Localize/loc/pt-BR/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl @@ -711,6 +711,15 @@ + + + + + + + + + diff --git a/Localize/loc/zh-Hans/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl b/Localize/loc/zh-Hans/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl index f62e2475b96..3af991ada7d 100644 --- a/Localize/loc/zh-Hans/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl +++ b/Localize/loc/zh-Hans/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl @@ -711,6 +711,15 @@ + + + + + + + + + From 5d4668505038901f93ae4663f0c74ce110a0a50b Mon Sep 17 00:00:00 2001 From: Marek Habersack Date: Thu, 2 Mar 2023 13:44:06 +0100 Subject: [PATCH 16/22] [Mono.Android] Tweak AndroidMessageHandler behavior for WCF support (#7785) Context: https://github.com/xamarin/xamarin-android/issues/7230 Context: https://github.com/dotnet/runtime/issues/80935 When a WCF application invokes an endpoint which returns compressed content, and `AndroidMessageHandler` is doing the network requests ([the default when `$(UseNativeHttpHandler)`=True][0]): var soapClient = new WebServiceSoapClient(WebServiceSoapClient.EndpointConfiguration.WebServiceSoap); //Async test var helloResponse = await soapClient.HelloWorldAsync(); then the method will throw: The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:HelloWorldResponse. ---> There was an error deserializing the object of type ServiceReference1.HelloWorldResponseBody. Unexpected end of file. Following elements are not closed: HelloWorldResult, HelloWorldResponse, Body, Envelope. Line 1, position 298. at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver) at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName) at System.Runtime.Serialization.DataContractSerializer.ReadObject(XmlDictionaryReader reader, Boolean verifyObjectName) at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.PartInfo.ReadObject(XmlDictionaryReader reader, XmlObjectSerializer serializer) in /_/src/System.Private.ServiceModel/src/System/ServiceModel/Dispatcher/DataContractSerializerOperationFormatter.cs:line 657 at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.PartInfo.ReadObject(XmlDictionaryReader reader) in /_/src/System.Private.ServiceModel/src/System/ServiceModel/Dispatcher/DataContractSerializerOperationFormatter.cs:line 652 at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.DeserializeParameterPart(XmlDictionaryReader reader, PartInfo part, Boolean isRequest) in /_/src/System.Private.ServiceModel/src/System/ServiceModel/Dispatcher/DataContractSerializerOperationFormatter.cs:line 521 The reason for this is that when `AndroidMessageHandler` creates a wrapping decompression stream, it does not update `Content-Length` to match the length of the decoded content, because it doesn't have a way to know what the length is without first reading the stream to the end, and that might prevent the end user to read the content. (Additionally, I think the `Content-Length` header should reflect the *original* content length, for the end user to be able to interpret the response as it was sent.) WCF, on the other hand, looks at the `Content-Length` header and, if found, takes the value and reads only that many bytes from the content stream and no more, which will almost always result in short reads and failure to correctly interpret the response. Workaround this issue by making `AndroidMessageHandler` behave the same way as other handlers implemented in the BCL. What they do in this situation is remove the `Content-Length` header, making WCF read the stream to the end. Additionally, the clients remove the compressed content encoding identifier from the `Content-Encoding` header. var handler = new AndroidMessageHandler { AutomaticDecompression = DecompressionMethods.All }; var client = new HttpClient (handler); var response = await client.GetAsync ("https://httpbin.org/gzip"); // response.Content.Headers won't contain Content-Length, // and response.Content.Headers.ContentEncoding won't contain `gzip`. As a bonus, also adds support for decompression of responses compressed with the `Brotli` compression which use the `br` encoding ID in the `Content-Encoding` header. [0]: https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/trimming-options?pivots=dotnet-7-0 --- .../AndroidMessageHandler.cs | 154 ++++++++++++++---- .../BuildReleaseArm64XFormsDotNet.apkdesc | 23 +-- .../AndroidMessageHandlerTests.cs | 68 ++++++++ 3 files changed, 203 insertions(+), 42 deletions(-) diff --git a/src/Mono.Android/Xamarin.Android.Net/AndroidMessageHandler.cs b/src/Mono.Android/Xamarin.Android.Net/AndroidMessageHandler.cs index 8971220b68b..7d42441c66e 100644 --- a/src/Mono.Android/Xamarin.Android.Net/AndroidMessageHandler.cs +++ b/src/Mono.Android/Xamarin.Android.Net/AndroidMessageHandler.cs @@ -69,11 +69,46 @@ sealed class RequestRedirectionState public bool MethodChanged; } + /// + /// Some requests require modification to the set of headers returned from the native client. + /// However, the headers collection in it is immutable, so we need to perform the adjustments + /// in CopyHeaders. This class describes the necessary operations. + /// + sealed class ContentState + { + public bool? RemoveContentLengthHeader; + + /// + /// If this is `true`, then `NewContentEncodingHeaderValue` is entirely ignored + /// + public bool? RemoveContentEncodingHeader; + + /// + /// New 'Content-Encoding' header value. Ignored if not null and empty. + /// + public List? NewContentEncodingHeaderValue; + + /// + /// Reset the class to values that indicate there's no action to take. MUST be + /// called BEFORE any of the class members are assigned values and AFTER the state + /// modification is applied + /// + public void Reset () + { + RemoveContentEncodingHeader = null; + RemoveContentLengthHeader = null; + NewContentEncodingHeaderValue = null; + } + } + internal const string LOG_APP = "monodroid-net"; const string GZIP_ENCODING = "gzip"; const string DEFLATE_ENCODING = "deflate"; + const string BROTLI_ENCODING = "br"; const string IDENTITY_ENCODING = "identity"; + const string ContentEncodingHeaderName = "Content-Encoding"; + const string ContentLengthHeaderName = "Content-Length"; static readonly IDictionary headerSeparators = new Dictionary { ["User-Agent"] = " ", @@ -82,9 +117,9 @@ sealed class RequestRedirectionState static readonly HashSet known_content_headers = new HashSet (StringComparer.OrdinalIgnoreCase) { "Allow", "Content-Disposition", - "Content-Encoding", + ContentEncodingHeaderName, "Content-Language", - "Content-Length", + ContentLengthHeaderName, "Content-Location", "Content-MD5", "Content-Range", @@ -571,6 +606,7 @@ internal Task WriteRequestContentToOutputInternal (HttpRequestMessage request, H CancellationTokenRegistration cancelRegistration = default (CancellationTokenRegistration); HttpStatusCode statusCode = HttpStatusCode.OK; Uri? connectionUri = null; + var contentState = new ContentState (); try { cancelRegistration = cancellationToken.Register (() => { @@ -608,13 +644,13 @@ internal Task WriteRequestContentToOutputInternal (HttpRequestMessage request, H if (!IsErrorStatusCode (statusCode)) { if (Logger.LogNet) Logger.Log (LogLevel.Info, LOG_APP, $"Reading..."); - ret.Content = GetContent (httpConnection, httpConnection.InputStream!); + ret.Content = GetContent (httpConnection, httpConnection.InputStream!, contentState); } else { if (Logger.LogNet) Logger.Log (LogLevel.Info, LOG_APP, $"Status code is {statusCode}, reading..."); // For 400 >= response code <= 599 the Java client throws the FileNotFound exception when attempting to read from the input stream. // Instead we try to read the error stream and return an empty string if the error stream isn't readable. - ret.Content = GetErrorContent (httpConnection, new StringContent (String.Empty, Encoding.ASCII)); + ret.Content = GetErrorContent (httpConnection, new StringContent (String.Empty, Encoding.ASCII), contentState); } bool disposeRet; @@ -633,7 +669,7 @@ internal Task WriteRequestContentToOutputInternal (HttpRequestMessage request, H } } - CopyHeaders (httpConnection, ret); + CopyHeaders (httpConnection, ret, contentState); ParseCookies (ret, connectionUri); if (disposeRet) { @@ -661,8 +697,8 @@ internal Task WriteRequestContentToOutputInternal (HttpRequestMessage request, H // We return the body of the response too, but the Java client will throw // a FileNotFound exception if we attempt to access the input stream. // Instead we try to read the error stream and return an default message if the error stream isn't readable. - ret.Content = GetErrorContent (httpConnection, new StringContent ("Unauthorized", Encoding.ASCII)); - CopyHeaders (httpConnection, ret); + ret.Content = GetErrorContent (httpConnection, new StringContent ("Unauthorized", Encoding.ASCII), contentState); + CopyHeaders (httpConnection, ret, contentState); if (ret.Headers.WwwAuthenticate != null) { ProxyAuthenticationRequested = false; @@ -676,7 +712,7 @@ internal Task WriteRequestContentToOutputInternal (HttpRequestMessage request, H return ret; } - CopyHeaders (httpConnection, ret); + CopyHeaders (httpConnection, ret, contentState); ParseCookies (ret, connectionUri); if (Logger.LogNet) @@ -684,29 +720,57 @@ internal Task WriteRequestContentToOutputInternal (HttpRequestMessage request, H return ret; } - HttpContent GetErrorContent (HttpURLConnection httpConnection, HttpContent fallbackContent) + HttpContent GetErrorContent (HttpURLConnection httpConnection, HttpContent fallbackContent, ContentState contentState) { var contentStream = httpConnection.ErrorStream; if (contentStream != null) { - return GetContent (httpConnection, contentStream); + return GetContent (httpConnection, contentStream, contentState); } return fallbackContent; } - HttpContent GetContent (URLConnection httpConnection, Stream contentStream) + Stream GetDecompressionWrapper (URLConnection httpConnection, Stream inputStream, ContentState contentState) { - Stream inputStream = new BufferedStream (contentStream); - if (decompress_here) { - var encodings = httpConnection.ContentEncoding?.Split (','); - if (encodings != null) { - if (encodings.Contains (GZIP_ENCODING, StringComparer.OrdinalIgnoreCase)) - inputStream = new GZipStream (inputStream, CompressionMode.Decompress); - else if (encodings.Contains (DEFLATE_ENCODING, StringComparer.OrdinalIgnoreCase)) - inputStream = new DeflateStream (inputStream, CompressionMode.Decompress); + contentState.Reset (); + if (!decompress_here || String.IsNullOrEmpty (httpConnection.ContentEncoding)) { + return inputStream; + } + + var encodings = new HashSet (httpConnection.ContentEncoding?.Split (','), StringComparer.OrdinalIgnoreCase); + Stream? ret = null; + string? supportedEncoding = null; + if (encodings.Contains (GZIP_ENCODING)) { + supportedEncoding = GZIP_ENCODING; + ret = new GZipStream (inputStream, CompressionMode.Decompress); + } else if (encodings.Contains (DEFLATE_ENCODING)) { + supportedEncoding = DEFLATE_ENCODING; + ret = new DeflateStream (inputStream, CompressionMode.Decompress); + } +#if NETCOREAPP + else if (encodings.Contains (BROTLI_ENCODING)) { + supportedEncoding = BROTLI_ENCODING; + ret = new BrotliStream (inputStream, CompressionMode.Decompress); + } +#endif + if (!String.IsNullOrEmpty (supportedEncoding)) { + contentState.RemoveContentLengthHeader = true; + + encodings.Remove (supportedEncoding!); + if (encodings.Count == 0) { + contentState.RemoveContentEncodingHeader = true; + } else { + contentState.NewContentEncodingHeaderValue = new List (encodings); } } + + return ret ?? inputStream; + } + + HttpContent GetContent (URLConnection httpConnection, Stream contentStream, ContentState contentState) + { + Stream inputStream = GetDecompressionWrapper (httpConnection, new BufferedStream (contentStream), contentState); return new StreamContent (inputStream); } @@ -881,9 +945,13 @@ void ParseCookies (AndroidHttpResponseMessage ret, Uri connectionUri) } } - void CopyHeaders (HttpURLConnection httpConnection, HttpResponseMessage response) + void CopyHeaders (HttpURLConnection httpConnection, HttpResponseMessage response, ContentState contentState) { var headers = httpConnection.HeaderFields; + bool removeContentLength = contentState.RemoveContentLengthHeader ?? false; + bool removeContentEncoding = contentState.RemoveContentEncodingHeader ?? false; + bool setNewContentEncodingValue = !removeContentEncoding && contentState.NewContentEncodingHeaderValue != null && contentState.NewContentEncodingHeaderValue.Count > 0; + foreach (var key in headers!.Keys) { if (key == null) // First header entry has null key, it corresponds to the response message continue; @@ -895,8 +963,25 @@ void CopyHeaders (HttpURLConnection httpConnection, HttpResponseMessage response } else { item_headers = response.Headers; } - item_headers.TryAddWithoutValidation (key, headers [key]); + + IEnumerable values = headers [key]; + if (removeContentLength && String.Compare (ContentLengthHeaderName, key, StringComparison.OrdinalIgnoreCase) == 0) { + removeContentLength = false; + continue; + } + + if ((removeContentEncoding || setNewContentEncodingValue) && String.Compare (ContentEncodingHeaderName, key, StringComparison.OrdinalIgnoreCase) == 0) { + if (removeContentEncoding) { + removeContentEncoding = false; + continue; + } + + setNewContentEncodingValue = false; + values = contentState.NewContentEncodingHeaderValue!; + } + item_headers.TryAddWithoutValidation (key, values); } + contentState.Reset (); } /// @@ -1006,19 +1091,24 @@ void AppendEncoding (string encoding, ref List ? list) List ? accept_encoding = null; decompress_here = false; - if ((AutomaticDecompression & DecompressionMethods.GZip) != 0) { - AppendEncoding (GZIP_ENCODING, ref accept_encoding); - decompress_here = true; - } - - if ((AutomaticDecompression & DecompressionMethods.Deflate) != 0) { - AppendEncoding (DEFLATE_ENCODING, ref accept_encoding); - decompress_here = true; - } - if (AutomaticDecompression == DecompressionMethods.None) { - accept_encoding?.Clear (); AppendEncoding (IDENTITY_ENCODING, ref accept_encoding); // Turns off compression for the Java client + } else { + if ((AutomaticDecompression & DecompressionMethods.GZip) != 0) { + AppendEncoding (GZIP_ENCODING, ref accept_encoding); + decompress_here = true; + } + + if ((AutomaticDecompression & DecompressionMethods.Deflate) != 0) { + AppendEncoding (DEFLATE_ENCODING, ref accept_encoding); + decompress_here = true; + } +#if NETCOREAPP + if ((AutomaticDecompression & DecompressionMethods.Brotli) != 0) { + AppendEncoding (BROTLI_ENCODING, ref accept_encoding); + decompress_here = true; + } +#endif } if (accept_encoding?.Count > 0) diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Resources/Base/BuildReleaseArm64XFormsDotNet.apkdesc b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Resources/Base/BuildReleaseArm64XFormsDotNet.apkdesc index b3fc11fd0e4..6902b06169c 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Resources/Base/BuildReleaseArm64XFormsDotNet.apkdesc +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Resources/Base/BuildReleaseArm64XFormsDotNet.apkdesc @@ -11,13 +11,13 @@ "Size": 7313 }, "assemblies/Java.Interop.dll": { - "Size": 66563 + "Size": 66562 }, "assemblies/Mono.Android.dll": { - "Size": 444617 + "Size": 444972 }, "assemblies/Mono.Android.Runtime.dll": { - "Size": 5897 + "Size": 5822 }, "assemblies/mscorlib.dll": { "Size": 3866 @@ -64,6 +64,9 @@ "assemblies/System.Drawing.Primitives.dll": { "Size": 12010 }, + "assemblies/System.IO.Compression.Brotli.dll": { + "Size": 11871 + }, "assemblies/System.IO.Compression.dll": { "Size": 16858 }, @@ -89,7 +92,7 @@ "Size": 8154 }, "assemblies/System.Private.CoreLib.dll": { - "Size": 814216 + "Size": 814322 }, "assemblies/System.Private.DataContractSerialization.dll": { "Size": 192370 @@ -131,7 +134,7 @@ "Size": 1864 }, "assemblies/UnnamedProject.dll": { - "Size": 5294 + "Size": 5286 }, "assemblies/Xamarin.AndroidX.Activity.dll": { "Size": 5867 @@ -206,7 +209,7 @@ "Size": 93552 }, "lib/arm64-v8a/libmonodroid.so": { - "Size": 379152 + "Size": 380656 }, "lib/arm64-v8a/libmonosgen-2.0.so": { "Size": 3106808 @@ -221,7 +224,7 @@ "Size": 154904 }, "lib/arm64-v8a/libxamarin-app.so": { - "Size": 333760 + "Size": 333840 }, "META-INF/android.support.design_material.version": { "Size": 12 @@ -335,13 +338,13 @@ "Size": 1213 }, "META-INF/BNDLTOOL.SF": { - "Size": 79326 + "Size": 79441 }, "META-INF/com.google.android.material_material.version": { "Size": 10 }, "META-INF/MANIFEST.MF": { - "Size": 79199 + "Size": 79314 }, "META-INF/proguard/androidx-annotations.pro": { "Size": 339 @@ -1976,5 +1979,5 @@ "Size": 341228 } }, - "PackageSize": 7820036 + "PackageSize": 7832413 } \ No newline at end of file diff --git a/tests/Mono.Android-Tests/Xamarin.Android.Net/AndroidMessageHandlerTests.cs b/tests/Mono.Android-Tests/Xamarin.Android.Net/AndroidMessageHandlerTests.cs index c15b8292c36..c240ac94ccb 100644 --- a/tests/Mono.Android-Tests/Xamarin.Android.Net/AndroidMessageHandlerTests.cs +++ b/tests/Mono.Android-Tests/Xamarin.Android.Net/AndroidMessageHandlerTests.cs @@ -1,4 +1,5 @@ using System; +using System.Net; using System.Net.Http; using System.Net.Security; using System.Security.Cryptography.X509Certificates; @@ -19,6 +20,73 @@ protected override HttpMessageHandler CreateHandler () return new AndroidMessageHandler (); } + // We can't test `deflate` for now because it's broken in the BCL for https://httpbin.org/deflate (S.I.Compression.DeflateStream doesn't recognize the compression + // method used by the server) + static readonly object[] DecompressionSource = new object[] { + new object[] { + "gzip", // urlPath + "gzip", // encoding + "gzipped", // jsonFieldName + }, + + new object[] { + "brotli", // urlPath + "br", // encoding + "brotli", // jsonFieldName + }, + }; + +#if NET + [Test] + [TestCaseSource (nameof (DecompressionSource))] + [Retry (5)] + public async Task Decompression (string urlPath, string encoding, string jsonFieldName) + { + // Catch all the exceptions and warn about them or otherwise [Retry] above won't work + try { + DoDecompression (urlPath, encoding, jsonFieldName); + } catch (Exception ex) { + Assert.Warn ("Unexpected exception thrown"); + Assert.Warn (ex.ToString ()); + Assert.Fail ("Exception should have not been thrown"); + } + } + + void DoDecompression (string urlPath, string encoding, string jsonFieldName) + { + var handler = new AndroidMessageHandler { + AutomaticDecompression = DecompressionMethods.All + }; + + var client = new HttpClient (handler); + HttpResponseMessage response = await client.GetAsync ($"https://httpbin.org/{urlPath}"); + + // Failing on error codes other than 2xx will make NUnit retry the test up to the number of times specified in the + // [Retry] attribute above. This may or may not the desired effect if httpbin.org is throttling the requests, thus + // we will sleep a short while before failing the test + if (!response.IsSuccessStatusCode) { + System.Threading.Thread.Sleep (1000); + Assert.Fail ($"Request ended with a failure error code: {response.StatusCode}"); + } + + foreach (string enc in response.Content.Headers.ContentEncoding) { + if (String.Compare (enc, encoding, StringComparison.Ordinal) == 0) { + Assert.Fail ($"Encoding '{encoding}' should have been removed from the Content-Encoding header"); + } + } + + string responseBody = await response.Content.ReadAsStringAsync (); + + Assert.Warn ("-- Retrieved JSON start"); + Assert.Warn (responseBody); + Assert.Warn ("-- Retrieved JSON end"); + + Assert.IsTrue (responseBody.Length > 0, "Response was empty"); + Assert.AreEqual (response.Content.Headers.ContentLength, responseBody.Length, "Retrieved data length is different than the one specified in the Content-Length header"); + Assert.IsTrue (responseBody.Contains ($"\"{jsonFieldName}\"", StringComparison.OrdinalIgnoreCase), $"\"{jsonFieldName}\" should have been in the response JSON"); + } +#endif + [Test] public async Task ServerCertificateCustomValidationCallback_ApproveRequest () { From a983fbb9760cf8d7f14f447324eed5142a211020 Mon Sep 17 00:00:00 2001 From: Jonathan Pryor Date: Thu, 2 Mar 2023 09:40:30 -0500 Subject: [PATCH 17/22] [Mono.Android] Print type & member remapping info (#7844) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Context: f6f11a5a797cd8602854942dccb0f2b1db57c473 Context: f99fc814b0dcc021a441e70bb5a487b2034f6760 How do we diagnose type & member remapping issues? If (when) things don't work as anticipated, what do we do? If a method is remapped *and* the remapped-to method cannot be found, then [Java.Interop will write a message to stderr][0]: warning: For declared method `java/lang/Object.remappedToToString.()Ljava/lang/String;`, could not find requested method `java/lang/Object.toString.()Ljava/lang/String;`! which is a scenario we think/assume Shouldn't Happen™. If it *does* happen, we believe that the above message will be sufficient to fix the problem. However, in the "happy" path in which the replacement method is found *or* the "less-happy" path in which *nothing happens*, how do we get insight to check or verify what's going on? Update `AndroidTypeManager.GetStaticMethodFallbackTypesCore()` and `AndroidTypeManager.GetReplacementMethodInfoCore()` so that they print out *successful* type & member remapping when the "assembly" log category is enabled: adb shell setprop debug.mono.log default,assembly When the assembly log category is enabled, invocations of `AndroidTypeManager.GetStaticMethodFallbackTypesCore()` will print messages such as the following to `adb logcat`: D monodroid-assembly : Remapping type `com/xamarin/interop/RenameClassBase1` to one of { `com/xamarin/interop/DesugarRenameClassBase1`, `com/xamarin/interop/RenameClassBase1$-CC` } When the assembly log category is enabled, invocations of `AndroidTypeManager.GetReplacementMethodInfoCore()` will print messages such as the following to `adb logcat` *when a replacement method will be attempted*: D monodroid-assembly : Remapping method `java/lang/Object.remappedToToString()Ljava/lang/String;` to `java/lang/Object.toString.()Ljava/lang/String;`; param-count: 0; instance-to-static? false This will hopefully provide enough information to reason through type and member remapping behavior. [0]: https://github.com/xamarin/java.interop/blob/77800dda83c2db4d90b501c00069abc9880caaeb/src/Java.Interop/Java.Interop/JniPeerMembers.JniInstanceMethods.cs#L123 --- .../Android.Runtime/AndroidRuntime.cs | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/Mono.Android/Android.Runtime/AndroidRuntime.cs b/src/Mono.Android/Android.Runtime/AndroidRuntime.cs index e819369fef9..b2436fb01b6 100644 --- a/src/Mono.Android/Android.Runtime/AndroidRuntime.cs +++ b/src/Mono.Android/Android.Runtime/AndroidRuntime.cs @@ -317,10 +317,16 @@ protected override IEnumerable GetSimpleReferences (Type type) var typeWithPrefix = desugarType.ToString (); var typeWithSuffix = $"{jniSimpleReference}$-CC"; - return new[]{ + var replacements = new[]{ GetReplacementTypeCore (typeWithPrefix) ?? typeWithPrefix, GetReplacementTypeCore (typeWithSuffix) ?? typeWithSuffix, }; + + if (Logger.LogAssembly) { + var message = $"Remapping type `{jniSimpleReference}` to one one of {{ `{replacements[0]}`, `{replacements[1]}` }}"; + Logger.Log (LogLevel.Debug, "monodroid-assembly", message); + } + return replacements; } protected override string? GetReplacementTypeCore (string jniSimpleReference) @@ -350,11 +356,19 @@ protected override IEnumerable GetSimpleReferences (Type type) var method = new JniRemappingReplacementMethod (); method = Marshal.PtrToStructure(retInfo); + var newSignature = jniMethodSignature; int? paramCount = null; if (method.is_static) { paramCount = JniMemberSignature.GetParameterCountFromMethodSignature (jniMethodSignature) + 1; - jniMethodSignature = $"(L{jniSourceType};" + jniMethodSignature.Substring ("(".Length); + newSignature = $"(L{jniSourceType};" + jniMethodSignature.Substring ("(".Length); + } + + if (Logger.LogAssembly) { + var message = $"Remapping method `{jniSourceType}.{jniMethodName}{jniMethodSignature}` to " + + $"`{method.target_type}.{method.target_name}{newSignature}`; " + + $"param-count: {paramCount}; instance-to-static? {method.is_static}"; + Logger.Log (LogLevel.Debug, "monodroid-assembly", message); } return new JniRuntime.ReplacementMethodInfo { @@ -363,7 +377,7 @@ protected override IEnumerable GetSimpleReferences (Type type) SourceJniMethodSignature = jniMethodSignature, TargetJniType = method.target_type, TargetJniMethodName = method.target_name, - TargetJniMethodSignature = jniMethodSignature, + TargetJniMethodSignature = newSignature, TargetJniMethodParameterCount = paramCount, TargetJniMethodInstanceToStatic = method.is_static, }; From c75bbfc102a2dc0c65462fca053d76ff327049cd Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Thu, 2 Mar 2023 12:23:51 -0600 Subject: [PATCH 18/22] [Xamarin.Android.Build.Tasks] guard `AutoImport.props` against empty values (#7837) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is an email thread about ASP.NET projects in VS, and something is potentially slowing down builds when optional workloads are installed. One concern is our `AutoImport.props`. Consider this example `foo.targets` file: In this example `$(MonoAndroidResourcePrefix)` and `$(MonoAndroidAssetsPrefix)` will be blank, so when we build: > msbuild foo.targets -bl … MSBUILD : warning MSB5029: The value "\**\.*\**" of the "Exclude" attribute in element in file "foo.targets (13,61)" is a wildcard that results in enumerating all files on the drive, which was likely not intended. Check that referenced properties are always defined. 1 Warning(s) 0 Error(s) Time Elapsed 00:02:45.14 I'm not sure if this is causing an actual problem, but I think it's a good idea to add some safety here. Update `AutoImport.props` to avoid including item groups when `$(MonoAndroidResourcePrefix)` and `$(MonoAndroidAssetsPrefix)` are not set/empty. --- .../Microsoft.Android.Sdk/Sdk/AutoImport.props | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/Sdk/AutoImport.props b/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/Sdk/AutoImport.props index 6d9352695f6..7bde84e8ee2 100644 --- a/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/Sdk/AutoImport.props +++ b/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/Sdk/AutoImport.props @@ -22,7 +22,9 @@ https://github.com/dotnet/designs/blob/4703666296f5e59964961464c25807c727282cae/ - + @@ -35,8 +37,17 @@ https://github.com/dotnet/designs/blob/4703666296f5e59964961464c25807c727282cae/ + + + + + + From 1ca7ac79207b7cf6f217545d58db3334c27c047c Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Thu, 2 Mar 2023 15:36:25 -0500 Subject: [PATCH 19/22] [ci] Allow dynamic`$(NuGetArtifactName)` values (#7848) We want to be able to override the values of `$(NuGetArtifactName)` and `$(LinuxNuGetArtifactName)` in the megapipeline so that artifact names don't overlap. We shouldn't use these variables to determine where local build artifacts are being output to. --- build-tools/automation/yaml-templates/build-linux.yaml | 4 ++-- build-tools/automation/yaml-templates/commercial-build.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build-tools/automation/yaml-templates/build-linux.yaml b/build-tools/automation/yaml-templates/build-linux.yaml index 9da25139e91..92426376649 100644 --- a/build-tools/automation/yaml-templates/build-linux.yaml +++ b/build-tools/automation/yaml-templates/build-linux.yaml @@ -69,9 +69,9 @@ stages: - script: > df -h && mkdir -p $(System.DefaultWorkingDirectory)/xamarin-android/bin/Build$(XA.Build.Configuration)/nuget-linux && - ln $(System.DefaultWorkingDirectory)/xamarin-android/bin/Build$(XA.Build.Configuration)/$(NuGetArtifactName)/Microsoft.Android.Sdk.Linux*.nupkg + ln $(System.DefaultWorkingDirectory)/xamarin-android/bin/Build$(XA.Build.Configuration)/nuget-unsigned/Microsoft.Android.Sdk.Linux*.nupkg $(System.DefaultWorkingDirectory)/xamarin-android/bin/Build$(XA.Build.Configuration)/nuget-linux && - ln $(System.DefaultWorkingDirectory)/xamarin-android/bin/Build$(XA.Build.Configuration)/$(NuGetArtifactName)/SignList.xml + ln $(System.DefaultWorkingDirectory)/xamarin-android/bin/Build$(XA.Build.Configuration)/nuget-unsigned/SignList.xml $(System.DefaultWorkingDirectory)/xamarin-android/bin/Build$(XA.Build.Configuration)/nuget-linux workingDirectory: $(System.DefaultWorkingDirectory)/xamarin-android displayName: copy linux sdk diff --git a/build-tools/automation/yaml-templates/commercial-build.yaml b/build-tools/automation/yaml-templates/commercial-build.yaml index f5512bdb4a6..41c375d245a 100644 --- a/build-tools/automation/yaml-templates/commercial-build.yaml +++ b/build-tools/automation/yaml-templates/commercial-build.yaml @@ -130,7 +130,7 @@ steps: displayName: upload nupkgs inputs: artifactName: ${{ parameters.nugetArtifactName }} - targetPath: ${{ parameters.xaSourcePath }}/bin/Build$(XA.Build.Configuration)/$(NuGetArtifactName) + targetPath: ${{ parameters.xaSourcePath }}/bin/Build$(XA.Build.Configuration)/nuget-unsigned - script: > mkdir -p bin/Build$(XA.Build.Configuration)/$(InstallerArtifactName) && From 6fec1942fbfafa580239727696dd011e98daf21a Mon Sep 17 00:00:00 2001 From: Jonathan Pobst Date: Thu, 2 Mar 2023 16:30:14 -0600 Subject: [PATCH 20/22] [ci] Reduce overhead for MSBuildIntegration unit test jobs. (#7832) There are 2 opportunities for speeding up the `MSBuildIntegration` unit test stage: removing `SmokeTests` that we also run in a different stage, and opting out of installing dependencies that these jobs do not need. * Don't run `SmokeTests` in this stage, as they are run in the dedicated `Smoke Tests` stage. * Refactor `start emulator` and `stop emulator` into reusable templates, and update them to use `dotnet build` instead of `mono`. * Opt out of installing unneeded dependencies: * nunit-console * .NET 6 * apkdiff * Unneeded Android SDK Platforms: 19,21,26,32 * Mono: theoretically this stage isn't using Mono anymore. Regardless, [Mono is now included in the default Mac VM image](https://github.com/actions/runner-images/pull/6799) (it's a newer version (`6.12.0.188`) than we are installing (`6.12.0.145`)), so we don't need this unless we decide in the future we need a newer version than the default. * By updating our required Mono version to `6.12.0.188`, `xaprepare` will not need to downgrade it anymore on the current Mac images, saving time for *all* jobs that install Mono. --- Configuration.props | 4 +- .../setup-test-environment.yaml | 51 ++++++++------ .../stage-msbuild-emulator-tests.yaml | 67 ++++++++++--------- .../yaml-templates/start-stop-emulator.yaml | 31 +++++++++ .../Emulator.csproj | 4 +- 5 files changed, 101 insertions(+), 56 deletions(-) create mode 100644 build-tools/automation/yaml-templates/start-stop-emulator.yaml diff --git a/Configuration.props b/Configuration.props index c0845f0c472..356f1224664 100644 --- a/Configuration.props +++ b/Configuration.props @@ -109,8 +109,8 @@ armeabi-v7a:arm64-v8a:x86:x86_64 $(MSBuildThisFileDirectory)external\Java.Interop $(MSBuildThisFileDirectory)external\mono - https://xamjenkinsartifact.azureedge.net/build-package-osx-mono/2020-02/151/c633fe923832f0c3db3c4e6aa98e5592bf5a06e7/MonoFramework-MDK-6.12.0.145.macos10.xamarin.universal.pkg - 6.12.0.145 + https://download.mono-project.com/archive/6.12.0/macos-10-universal/MonoFramework-MDK-6.12.0.188.macos10.xamarin.universal.pkg + 6.12.0.188 $(MonoRequiredMinimumVersion) False True diff --git a/build-tools/automation/yaml-templates/setup-test-environment.yaml b/build-tools/automation/yaml-templates/setup-test-environment.yaml index 63dbd94e598..42c113deec0 100644 --- a/build-tools/automation/yaml-templates/setup-test-environment.yaml +++ b/build-tools/automation/yaml-templates/setup-test-environment.yaml @@ -8,6 +8,11 @@ parameters: jdkTestFolder: $(JAVA_HOME_11_X64) remove_dotnet: false installTestSlicer: false + installApkDiff: true + installLegacyDotNet: true + restoreNUnitConsole: true + updateMono: true + androidSdkPlatforms: 19,21,26,32,33 steps: - checkout: self @@ -40,11 +45,12 @@ steps: condition: and(succeeded(), eq(variables['agent.os'], 'Windows_NT')) # Install .NET 6 for legacy tests -- template: use-dot-net.yaml - parameters: - version: 6.0 - quality: GA - remove_dotnet: ${{ parameters.remove_dotnet }} +- ${{ if eq(parameters.installLegacyDotNet, true) }}: + - template: use-dot-net.yaml + parameters: + version: 6.0 + quality: GA + remove_dotnet: ${{ parameters.remove_dotnet }} # Install latest .NET - template: use-dot-net.yaml @@ -56,26 +62,28 @@ steps: custom: build-server arguments: shutdown -- template: run-xaprepare.yaml - parameters: - displayName: run xaprepare-UpdateMono - arguments: --s=UpdateMono --auto-provision=yes --auto-provision-uses-sudo=yes - condition: and(succeeded(), eq(variables['agent.os'], 'Darwin')) - xaSourcePath: ${{ parameters.xaSourcePath }} +- ${{ if eq(parameters.updateMono, true) }}: + - template: run-xaprepare.yaml + parameters: + displayName: run xaprepare-UpdateMono + arguments: --s=UpdateMono --auto-provision=yes --auto-provision-uses-sudo=yes + condition: and(succeeded(), eq(variables['agent.os'], 'Darwin')) + xaSourcePath: ${{ parameters.xaSourcePath }} - template: run-xaprepare.yaml parameters: - arguments: --s=AndroidTestDependencies --android-sdk-platforms="19,21,26,32,33" + arguments: --s=AndroidTestDependencies --android-sdk-platforms="${{ parameters.androidSdkPlatforms }}" xaSourcePath: ${{ parameters.xaSourcePath }} -- task: DotNetCoreCLI@2 - displayName: restore NUnit.Console - inputs: - command: restore - projects: ${{ parameters.xaSourcePath }}/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Xamarin.ProjectTools.csproj - restoreArguments: -bl:${{ parameters.xaSourcePath }}/bin/Test${{ parameters.configuration }}/restore-Xamarin.ProjectTools.binlog - nugetConfigPath: ${{ parameters.xaSourcePath }}/NuGet.config - feedsToUse: config +- ${{ if eq(parameters.restoreNUnitConsole, true) }}: + - task: DotNetCoreCLI@2 + displayName: restore NUnit.Console + inputs: + command: restore + projects: ${{ parameters.xaSourcePath }}/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Xamarin.ProjectTools.csproj + restoreArguments: -bl:${{ parameters.xaSourcePath }}/bin/Test${{ parameters.configuration }}/restore-Xamarin.ProjectTools.binlog + nugetConfigPath: ${{ parameters.xaSourcePath }}/NuGet.config + feedsToUse: config - task: DotNetCoreCLI@2 displayName: build Xamarin.Android.Tools.BootstrapTasks.csproj @@ -101,7 +109,8 @@ steps: projects: ${{ parameters.xaSourcePath }}/build-tools/create-packs/Microsoft.Android.Sdk.proj arguments: -t:ExtractWorkloadPacks -c ${{ parameters.configuration }} -v:n -bl:${{ parameters.xaSourcePath }}/bin/Test${{ parameters.configuration }}/extract-workloads.binlog -- template: install-apkdiff.yaml +- ${{ if eq(parameters.installApkDiff, true) }}: + - template: install-apkdiff.yaml - ${{ if eq(parameters.installTestSlicer, true) }}: - template: install-dotnet-test-slicer.yaml diff --git a/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml b/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml index 2438d9af305..35dfd624638 100644 --- a/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml +++ b/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml @@ -26,17 +26,24 @@ stages: cancelTimeoutInMinutes: 5 workspace: clean: all + variables: + androidSdkPlatforms: 33 steps: - template: setup-test-environment.yaml parameters: provisionClassic: false provisionatorChannel: ${{ parameters.provisionatorChannel }} installTestSlicer: true + installApkDiff: false + installLegacyDotNet: false + restoreNUnitConsole: false + updateMono: false + androidSdkPlatforms: $(androidSdkPlatforms) - template: run-xaprepare.yaml parameters: displayName: install emulator - arguments: --s=EmulatorTestDependencies --android-sdk-platforms="19,21,26,32,33" + arguments: --s=EmulatorTestDependencies --android-sdk-platforms="$(androidSdkPlatforms)" - task: DownloadPipelineArtifact@2 inputs: @@ -46,18 +53,13 @@ stages: - pwsh: | dotnet-test-slicer ` --test-assembly="$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/MSBuildDeviceIntegration/${{ parameters.target_framework }}/MSBuildDeviceIntegration.dll" ` - --test-filter="cat != TimeZoneInfo & cat != Localization ${{ parameters.nunit_categories }}" ` + --test-filter="cat != TimeZoneInfo & cat != Localization & cat != SmokeTests ${{ parameters.nunit_categories }}" ` --slice-number=$(System.JobPositionInPhase) ` --total-slices=$(System.TotalJobsInPhase) ` --outfile="$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/MSBuildDeviceIntegration/${{ parameters.target_framework }}/MSBuildDeviceIntegration.runsettings" displayName: Slice unit tests - - task: MSBuild@1 - displayName: start emulator - inputs: - solution: tests/Mono.Android-Tests/Mono.Android-Tests.csproj - configuration: $(XA.Build.Configuration) - msbuildArguments: /t:AcquireAndroidTarget /bl:$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/start-emulator.binlog + - template: start-stop-emulator.yaml - template: run-nunit-tests.yaml parameters: @@ -67,15 +69,9 @@ stages: dotNetTestExtraArgs: --settings "$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/MSBuildDeviceIntegration/${{ parameters.target_framework }}/MSBuildDeviceIntegration.runsettings" testResultsFile: TestResult-MSBuildDeviceIntegration-${{ parameters.job_name }}-$(System.JobPositionInPhase)-$(XA.Build.Configuration).xml - - task: MSBuild@1 - displayName: shut down emulator - inputs: - solution: tests/Mono.Android-Tests/Mono.Android-Tests.csproj - configuration: $(XA.Build.Configuration) - msbuildArguments: >- - /t:AcquireAndroidTarget,ReleaseAndroidTarget - /bl:$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/shutdown-emulator.binlog - condition: always() + - template: start-stop-emulator.yaml + parameters: + command: stop - template: upload-results.yaml parameters: @@ -94,6 +90,7 @@ stages: avdAbi: x86 avdType: android-wear deviceName: wear_square + androidSdkPlatforms: 33 pool: vmImage: $(HostedMacImage) workspace: @@ -101,7 +98,13 @@ stages: steps: - template: setup-test-environment.yaml parameters: + provisionClassic: false + provisionatorChannel: ${{ parameters.provisionatorChannel }} configuration: $(XA.Build.Configuration) + installApkDiff: false + installLegacyDotNet: false + restoreNUnitConsole: false + androidSdkPlatforms: $(androidSdkPlatforms) - template: run-xaprepare.yaml parameters: @@ -111,7 +114,7 @@ stages: - template: run-xaprepare.yaml parameters: displayName: install emulator - arguments: --s=EmulatorTestDependencies + arguments: --s=EmulatorTestDependencies --android-sdk-platforms="$(androidSdkPlatforms)" - script: echo "##vso[task.setvariable variable=Java8SdkDirectory]$JAVA_HOME_8_X64" displayName: set Java8SdkDirectory @@ -121,12 +124,13 @@ stages: artifactName: $(TestAssembliesArtifactName) downloadPath: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration) - - task: MSBuild@1 - displayName: install and launch emulator - inputs: - solution: tests/Mono.Android-Tests/Mono.Android-Tests.csproj - configuration: $(XA.Build.Configuration) - msbuildArguments: /t:InstallAvdImage;AcquireAndroidTarget /p:TestDeviceName=$(deviceName) /p:TestAvdApiLevel=$(avdApiLevel) /p:TestAvdAbi=$(avdAbi) /p:TestAvdType=$(avdType) /bl:$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/install-emulator-$(avdApiLevel).binlog + - template: start-stop-emulator.yaml + parameters: + specificImage: true + deviceName: $(deviceName) + avdApiLevel: $(avdApiLevel) + avdAbi: $(avdAbi) + avdType: $(avdType) - template: run-nunit-tests.yaml parameters: @@ -135,13 +139,14 @@ stages: dotNetTestExtraArgs: --filter "TestCategory = WearOS" testResultsFile: TestResult-WearOS--$(XA.Build.Configuration).xml - - task: MSBuild@1 - displayName: shut down emulator - inputs: - solution: tests/Mono.Android-Tests/Mono.Android-Tests.csproj - configuration: $(XA.Build.Configuration) - msbuildArguments: /t:AcquireAndroidTarget,ReleaseAndroidTarget /p:TestDeviceName=$(deviceName) /p:TestAvdApiLevel=$(avdApiLevel) /p:TestAvdAbi=$(avdAbi) /p:TestAvdType=$(avdType) /bl:$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/shutdown-emulator.binlog - condition: always() + - template: start-stop-emulator.yaml + parameters: + command: stop + specificImage: true + deviceName: $(deviceName) + avdApiLevel: $(avdApiLevel) + avdAbi: $(avdAbi) + avdType: $(avdType) - template: upload-results.yaml parameters: diff --git a/build-tools/automation/yaml-templates/start-stop-emulator.yaml b/build-tools/automation/yaml-templates/start-stop-emulator.yaml new file mode 100644 index 00000000000..200637f1b51 --- /dev/null +++ b/build-tools/automation/yaml-templates/start-stop-emulator.yaml @@ -0,0 +1,31 @@ +parameters: + command: start # 'start' or 'stop' + specificImage: false # 'true' to use a specific emulator AVD image + deviceName: # Device name, like 'wear_square', required if 'specificImage' is 'true' + avdApiLevel: # Device API level, like '30', required if 'specificImage' is 'true' + avdAbi: # Device ABI, like 'x86', required if 'specificImage' is 'true' + avdType: # Device AVD, like 'android-wear', required if 'specificImage' is 'true' + +steps: +- ${{ if eq(parameters.command, 'start') }}: + - task: DotNetCoreCLI@2 + displayName: Start emulator + continueOnError: false + inputs: + projects: src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Emulator.csproj + ${{ if eq(parameters.specificImage, true) }}: + arguments: -c $(XA.Build.Configuration) -t:"InstallAvdImage;AcquireAndroidTarget" -p:TestDeviceName=${{ parameters.deviceName }} -p:TestAvdApiLevel=${{ parameters.avdApiLevel }} -p:TestAvdAbi=${{ parameters.avdAbi }} -p:TestAvdType=${{ parameters.avdType }} -bl:$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/install-emulator-${{ parameters.avdApiLevel }}.binlog + ${{ else }}: + arguments: -c $(XA.Build.Configuration) -t:AcquireAndroidTarget -bl:$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/start-emulator.binlog + +- ${{ if eq(parameters.command, 'stop') }}: + - task: DotNetCoreCLI@2 + displayName: Stop emulator + condition: always() + continueOnError: true + inputs: + projects: src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Emulator.csproj + ${{ if eq(parameters.specificImage, true) }}: + arguments: -c $(XA.Build.Configuration) -t:"AcquireAndroidTarget,ReleaseAndroidTarget" -p:TestDeviceName=${{ parameters.deviceName }} -p:TestAvdApiLevel=${{ parameters.avdApiLevel }} -p:TestAvdAbi=${{ parameters.avdAbi }} -p:TestAvdType=${{ parameters.avdType }} -bl:$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/shutdown-emulator.binlog + ${{ else }}: + arguments: -c $(XA.Build.Configuration) -t:"AcquireAndroidTarget,ReleaseAndroidTarget" -bl:$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/shutdown-emulator.binlog diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Emulator.csproj b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Emulator.csproj index 2d8b1d786a5..1962bfdcd1a 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Emulator.csproj +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Emulator.csproj @@ -3,6 +3,6 @@ netstandard2.0 false - - + + \ No newline at end of file From 2363e5c4089a144fa49ccc13c275b49eb86cdfc5 Mon Sep 17 00:00:00 2001 From: Alex Hsu Date: Fri, 3 Mar 2023 03:37:20 -0800 Subject: [PATCH 21/22] LEGO: Merge pull request 7852 LEGO: Merge pull request 7852 --- .../Properties/Resources.resx.lcl | 9 +++++++++ .../Properties/Resources.resx.lcl | 9 +++++++++ .../Properties/Resources.resx.lcl | 9 +++++++++ .../Properties/Resources.resx.lcl | 9 +++++++++ .../Properties/Resources.resx.lcl | 9 +++++++++ 5 files changed, 45 insertions(+) diff --git a/Localize/loc/ko/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl b/Localize/loc/ko/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl index 1443f892c48..9339042aef5 100644 --- a/Localize/loc/ko/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl +++ b/Localize/loc/ko/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl @@ -711,6 +711,15 @@ + + + + + + + + + diff --git a/Localize/loc/pl/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl b/Localize/loc/pl/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl index 79e14419ac6..c753eb4ab7a 100644 --- a/Localize/loc/pl/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl +++ b/Localize/loc/pl/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl @@ -711,6 +711,15 @@ + + + + + + + + + diff --git a/Localize/loc/ru/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl b/Localize/loc/ru/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl index 0c0b9892df9..da4a7ce0ca0 100644 --- a/Localize/loc/ru/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl +++ b/Localize/loc/ru/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl @@ -711,6 +711,15 @@ + + + + + + + + + diff --git a/Localize/loc/tr/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl b/Localize/loc/tr/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl index dfd24cad1bf..d189a40c3c1 100644 --- a/Localize/loc/tr/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl +++ b/Localize/loc/tr/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl @@ -711,6 +711,15 @@ + + + + + + + + + diff --git a/Localize/loc/zh-Hant/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl b/Localize/loc/zh-Hant/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl index 9d5d8eacbfa..7283f5b62f9 100644 --- a/Localize/loc/zh-Hant/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl +++ b/Localize/loc/zh-Hant/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl @@ -711,6 +711,15 @@ + + + + + + + + + From e7db44ebcbd50fd3bebbc0776c4e9e466658dfc8 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 3 Mar 2023 21:36:21 -0600 Subject: [PATCH 22/22] Bump to dotnet/installer/main@632ddca 8.0.100-preview.3.23128.1 (#7836) Changes: https://github.com/dotnet/installer/compare/e3ab0b5...632ddca Changes: https://github.com/dotnet/runtime/compare/ff7c19f...2bdc3cb Updates: * Microsoft.Dotnet.Sdk.Internal: from 8.0.100-preview.2.23123.10 to 8.0.100-preview.3.23128.1 * Microsoft.NET.ILLink.Tasks: from 8.0.0-preview.2.23123.4 to 8.0.0-preview.2.23127.4 * Microsoft.NETCore.App.Ref: from 8.0.0-preview.2.23123.4 to 8.0.0-preview.2.23127.4 ~~ Other changes ~~ * Keep `$(DotNetMonoManifestVersionBand)` on preview.2 * Keep `$(DotNetEmscriptenManifestVersionBand)` on preview.2 * Changes for the linker's new dependency: `Microsoft.DotNet.Cecil` * Update `BuildReleaseArm64XFormsDotNet.apkdesc` apkdiff: File 'assemblies/System.IO.Compression.dll' has changed by -875 bytes (-5.47 %). This exceeds the threshold of 5.00 %. * Update to MSBuild.StructuredLogger 2.1.787 System.NotSupportedException : Unsupported log file format. Latest supported version is 15, the log file has version 16. Co-authored-by: Jonathan Peppers --- NuGet.config | 1 + eng/Version.Details.xml | 16 ++-- eng/Versions.props | 11 +-- .../Microsoft.Android.Sdk.ILLink.csproj | 1 - .../BuildReleaseArm64XFormsDotNet.apkdesc | 82 +++++++++---------- .../MSBuildDeviceIntegration.csproj | 2 +- 6 files changed, 59 insertions(+), 54 deletions(-) diff --git a/NuGet.config b/NuGet.config index 1e45ad9f6d6..5e5f9f5e6a7 100644 --- a/NuGet.config +++ b/NuGet.config @@ -7,6 +7,7 @@ + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 8cde5bb99d6..d439cfbac5a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,21 +1,25 @@ - + https://github.com/dotnet/installer - e3ab0b5b8c29d8d882ab1bfe6a5a99a703622c7e + 632ddca23b8ec1393a1ec26607650236290276f1 - + https://github.com/dotnet/runtime - ff7c19f266c835e3694a088c4a9e4e5a1ffb1b74 + 2bdc3cb8dd3500aa2b3a51b558782560b26b5973 - + https://github.com/dotnet/runtime - ff7c19f266c835e3694a088c4a9e4e5a1ffb1b74 + 2bdc3cb8dd3500aa2b3a51b558782560b26b5973 https://github.com/dotnet/emsdk d7ff0aa47c680be543905cc1410e2f62b54dfefe + + https://github.com/dotnet/cecil + 68e0c35d0b4b6651b9a062a52e7dd694d7a43927 + https://github.com/dotnet/runtime 9529803ae29c2804880c6bd8ca710b8c037cb498 diff --git a/eng/Versions.props b/eng/Versions.props index 0a14f1f09ab..27ee25f6445 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -1,14 +1,15 @@ - 8.0.100-preview.2.23123.10 - 8.0.0-preview.2.23123.4 - 8.0.0-preview.2.23123.4 + 8.0.100-preview.3.23128.1 + 8.0.0-preview.2.23127.4 + 8.0.0-preview.2.23127.4 7.0.0-beta.22103.1 7.0.0-beta.22103.1 8.0.0-preview.2.23113.1 $(MicrosoftNETWorkloadEmscriptenCurrentManifest80100preview2Version) 7.0.100-rc.1.22410.7 + 0.11.4-alpha.23113.1 8.0.0-alpha.1.23080.2 @@ -18,7 +19,7 @@ $(DotNetPreviewVersionBand) $(DotNetPreviewVersionBand) - $(DotNetPreviewVersionBand) - $(DotNetPreviewVersionBand) + 8.0.100-preview.2 + 8.0.100-preview.2 diff --git a/src/Microsoft.Android.Sdk.ILLink/Microsoft.Android.Sdk.ILLink.csproj b/src/Microsoft.Android.Sdk.ILLink/Microsoft.Android.Sdk.ILLink.csproj index fcb1091f3da..aa8694c7a3c 100644 --- a/src/Microsoft.Android.Sdk.ILLink/Microsoft.Android.Sdk.ILLink.csproj +++ b/src/Microsoft.Android.Sdk.ILLink/Microsoft.Android.Sdk.ILLink.csproj @@ -7,7 +7,6 @@ $(MicrosoftAndroidSdkOutDir) - diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Resources/Base/BuildReleaseArm64XFormsDotNet.apkdesc b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Resources/Base/BuildReleaseArm64XFormsDotNet.apkdesc index 6902b06169c..eb2fe1d1bbf 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Resources/Base/BuildReleaseArm64XFormsDotNet.apkdesc +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Resources/Base/BuildReleaseArm64XFormsDotNet.apkdesc @@ -11,19 +11,19 @@ "Size": 7313 }, "assemblies/Java.Interop.dll": { - "Size": 66562 + "Size": 66563 }, "assemblies/Mono.Android.dll": { - "Size": 444972 + "Size": 445325 }, "assemblies/Mono.Android.Runtime.dll": { - "Size": 5822 + "Size": 5895 }, "assemblies/mscorlib.dll": { - "Size": 3866 + "Size": 3868 }, "assemblies/netstandard.dll": { - "Size": 5579 + "Size": 5580 }, "assemblies/rc.bin": { "Size": 1182 @@ -32,109 +32,109 @@ "Size": 11561 }, "assemblies/System.Collections.dll": { - "Size": 15271 + "Size": 15405 }, "assemblies/System.Collections.NonGeneric.dll": { - "Size": 7499 + "Size": 7501 }, "assemblies/System.ComponentModel.dll": { "Size": 1973 }, "assemblies/System.ComponentModel.Primitives.dll": { - "Size": 2595 + "Size": 2596 }, "assemblies/System.ComponentModel.TypeConverter.dll": { - "Size": 6081 + "Size": 6083 }, "assemblies/System.Console.dll": { "Size": 6623 }, "assemblies/System.Core.dll": { - "Size": 1992 + "Size": 1994 }, "assemblies/System.Diagnostics.TraceSource.dll": { - "Size": 6591 + "Size": 6590 }, "assemblies/System.dll": { - "Size": 2347 + "Size": 2349 }, "assemblies/System.Drawing.dll": { - "Size": 2032 + "Size": 2034 }, "assemblies/System.Drawing.Primitives.dll": { - "Size": 12010 + "Size": 12011 }, "assemblies/System.IO.Compression.Brotli.dll": { - "Size": 11871 + "Size": 11031 }, "assemblies/System.IO.Compression.dll": { - "Size": 16858 + "Size": 15983 }, "assemblies/System.IO.IsolatedStorage.dll": { - "Size": 10011 + "Size": 10013 }, "assemblies/System.Linq.dll": { - "Size": 19453 + "Size": 19455 }, "assemblies/System.Linq.Expressions.dll": { - "Size": 164141 + "Size": 164140 }, "assemblies/System.Net.Http.dll": { - "Size": 66153 + "Size": 65497 }, "assemblies/System.Net.Primitives.dll": { - "Size": 22487 + "Size": 22480 }, "assemblies/System.Net.Requests.dll": { - "Size": 3630 + "Size": 3632 }, "assemblies/System.ObjectModel.dll": { - "Size": 8154 + "Size": 8155 }, "assemblies/System.Private.CoreLib.dll": { - "Size": 814322 + "Size": 814504 }, "assemblies/System.Private.DataContractSerialization.dll": { - "Size": 192370 + "Size": 192382 }, "assemblies/System.Private.Uri.dll": { - "Size": 42897 + "Size": 42896 }, "assemblies/System.Private.Xml.dll": { - "Size": 216180 + "Size": 216178 }, "assemblies/System.Private.Xml.Linq.dll": { - "Size": 16673 + "Size": 16674 }, "assemblies/System.Runtime.dll": { - "Size": 2774 + "Size": 2776 }, "assemblies/System.Runtime.InteropServices.dll": { - "Size": 3760 + "Size": 3762 }, "assemblies/System.Runtime.Serialization.dll": { - "Size": 1950 + "Size": 1952 }, "assemblies/System.Runtime.Serialization.Formatters.dll": { - "Size": 2517 + "Size": 2518 }, "assemblies/System.Runtime.Serialization.Primitives.dll": { - "Size": 3802 + "Size": 3804 }, "assemblies/System.Security.Cryptography.dll": { - "Size": 7781 + "Size": 7776 }, "assemblies/System.Text.RegularExpressions.dll": { - "Size": 157123 + "Size": 157124 }, "assemblies/System.Xml.dll": { - "Size": 1839 + "Size": 1841 }, "assemblies/System.Xml.Linq.dll": { - "Size": 1864 + "Size": 1866 }, "assemblies/UnnamedProject.dll": { - "Size": 5286 + "Size": 5294 }, "assemblies/Xamarin.AndroidX.Activity.dll": { "Size": 5867 @@ -209,10 +209,10 @@ "Size": 93552 }, "lib/arm64-v8a/libmonodroid.so": { - "Size": 380656 + "Size": 380736 }, "lib/arm64-v8a/libmonosgen-2.0.so": { - "Size": 3106808 + "Size": 3107296 }, "lib/arm64-v8a/libSystem.IO.Compression.Native.so": { "Size": 723840 @@ -224,7 +224,7 @@ "Size": 154904 }, "lib/arm64-v8a/libxamarin-app.so": { - "Size": 333840 + "Size": 333880 }, "META-INF/android.support.design_material.version": { "Size": 12 diff --git a/tests/MSBuildDeviceIntegration/MSBuildDeviceIntegration.csproj b/tests/MSBuildDeviceIntegration/MSBuildDeviceIntegration.csproj index cf067e4e5b5..a9f9b4d3621 100644 --- a/tests/MSBuildDeviceIntegration/MSBuildDeviceIntegration.csproj +++ b/tests/MSBuildDeviceIntegration/MSBuildDeviceIntegration.csproj @@ -38,7 +38,7 @@ - +