From 7c42c60d587ad4544a5ee326adfa8b1d23f72204 Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Mon, 13 Feb 2023 15:50:41 -0500 Subject: [PATCH 01/12] [ci] Report issues in the API docs build log (#7784) Context: https://github.com/xamarin/java.interop/issues/1071 Adds a step to the API docs build that will fail the job if any problematic JavadocInfo messages are found in the log. --- .../automation/azure-pipelines-apidocs.yaml | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/build-tools/automation/azure-pipelines-apidocs.yaml b/build-tools/automation/azure-pipelines-apidocs.yaml index bc6eb50c329..72b1e9b3ab4 100644 --- a/build-tools/automation/azure-pipelines-apidocs.yaml +++ b/build-tools/automation/azure-pipelines-apidocs.yaml @@ -117,3 +117,25 @@ stages: inputs: artifactName: Api Docs Diff targetPath: $(Build.StagingDirectory)/api-doc-diff + + - powershell: | + $docsUpdateBinlog = Get-ChildItem -Path "$(Build.SourcesDirectory)/bin/Build$(XA.Build.Configuration)" -Filter *UpdateApiDocs-*.binlog | Select-Object -First 1 + $buildLog = "$(Build.SourcesDirectory)/bin/Build$(XA.Build.Configuration)/temp-build.log" + & "$(Build.SourcesDirectory)/bin/$(XA.Build.Configuration)/dotnet/dotnet" build $docsUpdateBinlog > $buildLog + + $issueContent = & { + Get-Content -Path $buildLog | Select-String "## Exception translating remarks" + Get-Content -Path $buildLog | Select-String "## Unable to translate remarks" + Get-Content -Path $buildLog | Select-String "JavadocImport-" + } + + if ($issueContent) { + Write-Host "The following issues were found, review the build log for more details:" + Write-Host "" + foreach ($line in $issueContent) { + Write-Host $line + Write-Host "" + } + exit 1 + } + displayName: Report issues in docs generation From aa54ed3d57d7c54095b869c1c0c3a7d7e4761d85 Mon Sep 17 00:00:00 2001 From: Marek Habersack Date: Tue, 14 Feb 2023 14:08:29 +0100 Subject: [PATCH 02/12] [lgtm] Fix LGTM-reported issues (#1074) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remember CodeQL (acfc1efe)? CodeQL basically runs [GitHub LGTM][0] on source code, looking for possible security issues. Now that CodeQL is running, we can begin addressing reported issues. Add a `.lgtm.yml` file to exclude `cs/campaign/constantine`; this is a campaign asking for contact regarding certain constructs, and is just noise in the LGTM reporting page. Problems found include: * HttpClient created with CheckCertificateRevocationList disabled * Wrong type of arguments to formatting function * Weak cryptography * Possible information leakage from uninitialized padding bytes * ML Training and Serialization Files Referenced ~~ HttpClient created with CheckCertificateRevocationList disabled ~~ Apparently the `HttpClient` default constructor is "bad"; we should instead use the [`HttpClient(HttpMessageHandler)` constructor][1], provide our own `HttpClientHandler`, and ensure that [`HttpClientHandler.CheckCertificateRevocationList`][2] is True. ~~ Wrong type of arguments to formatting function ~~ Apparently LGTM doesn't realize that in C++ `long int` is synonymous with `long`, and thus warns that they're not the same. 🤦 Remove a cast to `long int`. ~~ Weak cryptography ~~ This is in `AuthDigestSession.cs`. Unfortunately, RFC2617 requires MD5, so we kinda need to use MD5. Add a `// lgtm [cs/weak-crypto]` comment to disable the warning. ~~ Possible information leakage from uninitialized padding bytes ~~ This is in `cpp-util.hh`, and it seems that LGTM doesn't appreciate our use of template metaprogramming to construct a `char_array` wherein `Len` is computed at compile time with no wasted padding. ~~ ML Training and Serialization Files Referenced ~~ LGTM apparently assumes that mentions of `.pb` are mentions of ML data training files. In our case, these were part of error messages from `aapt2` that we were attempting to translate. Add a `//lgtm [csharp/responsible-ai/ml-training-and-serialization-files-referenced]` comment to disable this warning. Co-authored-by: Alex Hsu [0]: https://github.com/marketplace/lgtm [1]: https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient.-ctor?view=netstandard-2.0#system-net-http-httpclient-ctor(system-net-http-httpmessagehandler) [2]: https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclienthandler.checkcertificaterevocationlist?view=net-7.0 --- .lgtm.yml | 2 + .../DownloadUri.cs | 12 +- .../xaprepare/Application/Utilities.cs | 15 +- .../Steps/Step_Get_Windows_Binutils.cs | 2 +- .../BinarySerializableConstraint.cs | 104 -- .../Constraints/ConstraintExpression.cs | 14 - .../Constraints/ConstraintFactory.cs | 14 - src-ThirdParty/NUnitLite/Is.cs | 14 - .../Xamarin.Android.Net/AuthDigestSession.cs | 22 +- .../Tasks/Aapt2.cs | 4 +- .../BuildReleaseArm64XFormsLegacy.apkdesc | 934 +++++++++--------- src/monodroid/jni/basic-utilities.cc | 4 + src/monodroid/jni/cpp-util.hh | 2 +- src/monodroid/jni/monodroid-glue.cc | 30 +- 14 files changed, 537 insertions(+), 636 deletions(-) create mode 100644 .lgtm.yml delete mode 100644 src-ThirdParty/NUnitLite/Constraints/BinarySerializableConstraint.cs diff --git a/.lgtm.yml b/.lgtm.yml new file mode 100644 index 00000000000..24f5c49c270 --- /dev/null +++ b/.lgtm.yml @@ -0,0 +1,2 @@ +queries: + - exclude: cs/campaign/constantine diff --git a/build-tools/xa-prep-tasks/Xamarin.Android.BuildTools.PrepTasks/DownloadUri.cs b/build-tools/xa-prep-tasks/Xamarin.Android.BuildTools.PrepTasks/DownloadUri.cs index 8dad2077019..aaa3698f0e9 100644 --- a/build-tools/xa-prep-tasks/Xamarin.Android.BuildTools.PrepTasks/DownloadUri.cs +++ b/build-tools/xa-prep-tasks/Xamarin.Android.BuildTools.PrepTasks/DownloadUri.cs @@ -43,7 +43,17 @@ public override bool Execute () var source = cancellationTokenSource = new CancellationTokenSource (); var tasks = new Task [SourceUris.Length]; - using (var client = new HttpClient ()) { + + // LGTM recommendation + // + // Using HttpClient without providing a platform specific handler (WinHttpHandler or CurlHandler) where the CheckCertificateRevocationList property is set + // to true, will allow revoked certificates to be accepted by the HttpClient as valid. + // + var handler = new HttpClientHandler { + CheckCertificateRevocationList = true, + }; + + using (var client = new HttpClient (handler)) { client.Timeout = TimeSpan.FromHours (3); for (int i = 0; i < SourceUris.Length; ++i) { tasks [i] = DownloadFile (client, source, SourceUris [i], DestinationFiles [i]); diff --git a/build-tools/xaprepare/xaprepare/Application/Utilities.cs b/build-tools/xaprepare/xaprepare/Application/Utilities.cs index 835f68be5c3..53462f44d2c 100644 --- a/build-tools/xaprepare/xaprepare/Application/Utilities.cs +++ b/build-tools/xaprepare/xaprepare/Application/Utilities.cs @@ -471,12 +471,21 @@ static decimal SignificantDigits (decimal number, int maxDigitCount) return (success, size); } + public static HttpClient CreateHttpClient () + { + var handler = new HttpClientHandler { + CheckCertificateRevocationList = true, + }; + + return new HttpClient (handler); + } + public static async Task<(bool success, ulong size, HttpStatusCode status)> GetDownloadSizeWithStatus (Uri url) { TimeSpan delay = ExceptionRetryInitialDelay; for (int i = 0; i < ExceptionRetries; i++) { try { - using (var httpClient = new HttpClient ()) { + using (HttpClient httpClient = CreateHttpClient ()) { httpClient.Timeout = WebRequestTimeout; var req = new HttpRequestMessage (HttpMethod.Head, url); req.Headers.ConnectionClose = true; @@ -524,7 +533,7 @@ public static async Task Download (Uri url, string targetFile, DownloadSta static async Task DoDownload (Uri url, string targetFile, DownloadStatus status) { - using (var httpClient = new HttpClient ()) { + using (HttpClient httpClient = CreateHttpClient ()) { httpClient.Timeout = WebRequestTimeout; Log.DebugLine ("Calling GetAsync"); HttpResponseMessage resp = await httpClient.GetAsync (url, HttpCompletionOption.ResponseHeadersRead); @@ -820,7 +829,7 @@ public static string GetStringFromStdout (ProcessRunner runner, bool throwOnErro LogError ($"failed with exit code {runner.ExitCode}"); return String.Empty; } - + string ret = sw.ToString (); if (trimTrailingWhitespace) return ret.TrimEnd (); diff --git a/build-tools/xaprepare/xaprepare/Steps/Step_Get_Windows_Binutils.cs b/build-tools/xaprepare/xaprepare/Steps/Step_Get_Windows_Binutils.cs index 9d4825d0f1c..a5457b27d46 100644 --- a/build-tools/xaprepare/xaprepare/Steps/Step_Get_Windows_Binutils.cs +++ b/build-tools/xaprepare/xaprepare/Steps/Step_Get_Windows_Binutils.cs @@ -157,7 +157,7 @@ string GetStampFile (string file, string destinationDirectory, string ndkVersion async Task FetchFiles (Dictionary neededFiles, string destinationDirectory, Uri url) { Utilities.CreateDirectory (destinationDirectory); - using (var httpClient = new HttpClient ()) { + using (HttpClient httpClient = Utilities.CreateHttpClient ()) { bool success; long size; diff --git a/src-ThirdParty/NUnitLite/Constraints/BinarySerializableConstraint.cs b/src-ThirdParty/NUnitLite/Constraints/BinarySerializableConstraint.cs deleted file mode 100644 index c6d5a52bd34..00000000000 --- a/src-ThirdParty/NUnitLite/Constraints/BinarySerializableConstraint.cs +++ /dev/null @@ -1,104 +0,0 @@ -// *********************************************************************** -// Copyright (c) 2008 Charlie Poole -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// *********************************************************************** - -#if !NETCF && !SILVERLIGHT -using System; -using System.IO; -using System.Runtime.Serialization; -using System.Runtime.Serialization.Formatters.Binary; - -namespace NUnit.Framework.Constraints -{ - /// - /// BinarySerializableConstraint tests whether - /// an object is serializable in binary format. - /// - public class BinarySerializableConstraint : Constraint - { - readonly BinaryFormatter serializer = new BinaryFormatter(); - - /// - /// Test whether the constraint is satisfied by a given value - /// - /// The value to be tested - /// True for success, false for failure - [System.Diagnostics.CodeAnalysis.SuppressMessage ("Security", "CA2302: Ensure BinaryFormatter.Binder is set before calling BinaryFormatter.Deserialize", Justification = "Data to be deserialized is trusted, as we create it in this same method.")] -#if NET - [Obsolete("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0011", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] -#endif - public override bool Matches(object actual) - { - this.actual = actual; - - if (actual == null) - throw new ArgumentException(); - - MemoryStream stream = new MemoryStream(); - - try - { - serializer.Serialize(stream, actual); - - stream.Seek(0, SeekOrigin.Begin); - - object value = serializer.Deserialize(stream); - - return value != null; - } - catch (SerializationException) - { - return false; - } - } - - /// - /// Write the constraint description to a MessageWriter - /// - /// The writer on which the description is displayed - public override void WriteDescriptionTo(MessageWriter writer) - { - writer.Write("binary serializable"); - } - - /// - /// Write the actual value for a failing constraint test to a - /// MessageWriter. The default implementation simply writes - /// the raw value of actual, leaving it to the writer to - /// perform any formatting. - /// - /// The writer on which the actual value is displayed - public override void WriteActualValueTo(MessageWriter writer) - { - writer.Write("<{0}>", actual.GetType().Name); - } - - /// - /// Returns the string representation - /// - protected override string GetStringRepresentation() - { - return ""; - } - } -} -#endif diff --git a/src-ThirdParty/NUnitLite/Constraints/ConstraintExpression.cs b/src-ThirdParty/NUnitLite/Constraints/ConstraintExpression.cs index 46fc7d85796..d5e6347475c 100644 --- a/src-ThirdParty/NUnitLite/Constraints/ConstraintExpression.cs +++ b/src-ThirdParty/NUnitLite/Constraints/ConstraintExpression.cs @@ -350,20 +350,6 @@ public UniqueItemsConstraint Unique #endregion - #region BinarySerializable - -#if !NETCF && !SILVERLIGHT - /// - /// Returns a constraint that tests whether an object graph is serializable in binary format. - /// - public BinarySerializableConstraint BinarySerializable - { - get { return (BinarySerializableConstraint)this.Append(new BinarySerializableConstraint()); } - } -#endif - - #endregion - #region XmlSerializable #if !SILVERLIGHT diff --git a/src-ThirdParty/NUnitLite/Constraints/ConstraintFactory.cs b/src-ThirdParty/NUnitLite/Constraints/ConstraintFactory.cs index f0737fb6946..7e46af3c3de 100644 --- a/src-ThirdParty/NUnitLite/Constraints/ConstraintFactory.cs +++ b/src-ThirdParty/NUnitLite/Constraints/ConstraintFactory.cs @@ -297,20 +297,6 @@ public UniqueItemsConstraint Unique #endregion - #region BinarySerializable - -#if !NETCF && !SILVERLIGHT - /// - /// Returns a constraint that tests whether an object graph is serializable in binary format. - /// - public BinarySerializableConstraint BinarySerializable - { - get { return new BinarySerializableConstraint(); } - } -#endif - - #endregion - #region XmlSerializable #if !SILVERLIGHT diff --git a/src-ThirdParty/NUnitLite/Is.cs b/src-ThirdParty/NUnitLite/Is.cs index 55b61603310..1af0b4966f2 100644 --- a/src-ThirdParty/NUnitLite/Is.cs +++ b/src-ThirdParty/NUnitLite/Is.cs @@ -157,20 +157,6 @@ public static UniqueItemsConstraint Unique #endregion - #region BinarySerializable - -#if !NETCF && !SILVERLIGHT - /// - /// Returns a constraint that tests whether an object graph is serializable in binary format. - /// - public static BinarySerializableConstraint BinarySerializable - { - get { return new BinarySerializableConstraint(); } - } -#endif - - #endregion - #region XmlSerializable #if !SILVERLIGHT diff --git a/src/Mono.Android/Xamarin.Android.Net/AuthDigestSession.cs b/src/Mono.Android/Xamarin.Android.Net/AuthDigestSession.cs index 561c17b755c..967a94b2bcb 100644 --- a/src/Mono.Android/Xamarin.Android.Net/AuthDigestSession.cs +++ b/src/Mono.Android/Xamarin.Android.Net/AuthDigestSession.cs @@ -2,7 +2,7 @@ // Adapted from: // // System.Net.DigestClient.cs -// +// // Authors: // Greg Reinacker (gregr@rassoc.com) // Sebastien Pouliot (spouliot@motus.com) @@ -55,7 +55,7 @@ public string? QOP { } public string CNonce { - get { + get { if (_cnonce == null) { // 15 is a multiple of 3 which is better for base64 because it // wont end with '=' and risk messing up the server parsing @@ -73,7 +73,7 @@ public DateTime LastUse { } [System.Diagnostics.CodeAnalysis.SuppressMessage ("Security", "CA5351:Do Not Use Broken Cryptographic Algorithms", Justification = "Only supported algorithm by RFC2617.")] - public bool Parse (string challenge) + public bool Parse (string challenge) { parser = new AuthDigestHeaderParser (challenge); if (!parser.Parse ()) @@ -81,12 +81,12 @@ public bool Parse (string challenge) // build the hash object (only MD5 is defined in RFC2617) if ((parser.Algorithm == null) || (parser.Algorithm.StartsWith ("MD5", StringComparison.OrdinalIgnoreCase))) - hash = MD5.Create (); + hash = MD5.Create (); // lgtm [cs/weak-crypto] This is part of RFC2617 and we cannot change the algorithm here. return true; } - string? HashToHexString (string toBeHashed) + string? HashToHexString (string toBeHashed) { if (hash == null) return null; @@ -100,7 +100,7 @@ public bool Parse (string challenge) return sb.ToString (); } - string? HA1 (string username, string password) + string? HA1 (string username, string password) { string ha1 = $"{username}:{Realm}:{password}"; if (String.Compare (Algorithm, "md5-sess", StringComparison.OrdinalIgnoreCase) == 0) @@ -108,18 +108,18 @@ public bool Parse (string challenge) return HashToHexString (ha1); } - string? HA2 (HttpURLConnection webRequest) + string? HA2 (HttpURLConnection webRequest) { var uri = new Uri (webRequest.URL?.ToString ()!); string ha2 = $"{webRequest.RequestMethod}:{uri.PathAndQuery}"; if (QOP == "auth-int") { // TODO // ha2 += String.Format (":{0}", hentity); - } + } return HashToHexString (ha2); } - string? Response (string username, string password, HttpURLConnection webRequest) + string? Response (string username, string password, HttpURLConnection webRequest) { string response = $"{HA1 (username, password)}:{Nonce}:"; if (QOP != null) @@ -128,13 +128,13 @@ public bool Parse (string challenge) return HashToHexString (response); } - public Authorization? Authenticate (HttpURLConnection request, ICredentials credentials) + public Authorization? Authenticate (HttpURLConnection request, ICredentials credentials) { if (parser == null) throw new InvalidOperationException (); if (request == null) return null; - + lastUse = DateTime.Now; var uri = new Uri (request.URL?.ToString ()!); NetworkCredential cred = credentials.GetCredential (uri, "digest"); diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/Aapt2.cs b/src/Xamarin.Android.Build.Tasks/Tasks/Aapt2.cs index 084fd24d9ec..961005e362a 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/Aapt2.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/Aapt2.cs @@ -314,7 +314,7 @@ static string GetErrorCode (string message) Tuple.Create ("APT2097", "failed to open directory"), Tuple.Create ("APT2098", "failed to open file"), Tuple.Create ("APT2099", "failed to open resources.arsc"), - Tuple.Create ("APT2100", "failed to open resources.pb"), + Tuple.Create ("APT2100", "failed to open resources.pb"), // lgtm [csharp/responsible-ai/ml-training-and-serialization-files-referenced] These are not the droids you are looking for. Not ML data training files. Tuple.Create ("APT2101", "failed to open"), Tuple.Create ("APT2102", "failed to parse binary XML"), Tuple.Create ("APT2103", "failed to parse binary"), @@ -367,7 +367,7 @@ static string GetErrorCode (string message) Tuple.Create ("APT2150", "invalid preferred density"), Tuple.Create ("APT2151", "invalid resource ID"), Tuple.Create ("APT2152", "invalid resource name"), - Tuple.Create ("APT2153", "invalid resources.pb"), + Tuple.Create ("APT2153", "invalid resources.pb"), // lgtm [csharp/responsible-ai/ml-training-and-serialization-files-referenced] These are not the droids you are looking for. Not ML data training files. Tuple.Create ("APT2154", "invalid split name"), Tuple.Create ("APT2155", "invalid split parameter"), Tuple.Create ("APT2156", "invalid static library"), diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Resources/Base/BuildReleaseArm64XFormsLegacy.apkdesc b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Resources/Base/BuildReleaseArm64XFormsLegacy.apkdesc index e1f72ba5de2..3ecdb2d3c42 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Resources/Base/BuildReleaseArm64XFormsLegacy.apkdesc +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Resources/Base/BuildReleaseArm64XFormsLegacy.apkdesc @@ -5,125 +5,125 @@ "Size": 3140 }, "assemblies/FormsViewGroup.dll": { - "Size": 7215 + "Size": 7207 }, "assemblies/Java.Interop.dll": { - "Size": 69955 + "Size": 69944 }, "assemblies/Mono.Android.dll": { - "Size": 572710 + "Size": 571969 }, "assemblies/Mono.Security.dll": { - "Size": 68432 + "Size": 68430 }, "assemblies/mscorlib.dll": { - "Size": 915407 + "Size": 915393 }, "assemblies/System.Core.dll": { - "Size": 164046 + "Size": 164045 }, "assemblies/System.dll": { - "Size": 388865 + "Size": 388862 }, "assemblies/System.Drawing.Common.dll": { - "Size": 12365 + "Size": 12356 }, "assemblies/System.Net.Http.dll": { "Size": 110693 }, "assemblies/System.Numerics.dll": { - "Size": 15683 + "Size": 15680 }, "assemblies/System.Runtime.Serialization.dll": { - "Size": 186660 + "Size": 186653 }, "assemblies/System.ServiceModel.Internals.dll": { - "Size": 26593 + "Size": 26585 }, "assemblies/System.Xml.dll": { - "Size": 395657 + "Size": 395652 }, "assemblies/UnnamedProject.dll": { - "Size": 116986 + "Size": 116978 }, "assemblies/Xamarin.AndroidX.Activity.dll": { - "Size": 7697 + "Size": 7689 }, "assemblies/Xamarin.AndroidX.AppCompat.AppCompatResources.dll": { - "Size": 6648 + "Size": 6640 }, "assemblies/Xamarin.AndroidX.AppCompat.dll": { - "Size": 125328 + "Size": 125325 }, "assemblies/Xamarin.AndroidX.CardView.dll": { - "Size": 7366 + "Size": 7357 }, "assemblies/Xamarin.AndroidX.CoordinatorLayout.dll": { - "Size": 18272 + "Size": 18264 }, "assemblies/Xamarin.AndroidX.Core.dll": { - "Size": 131930 + "Size": 131924 }, "assemblies/Xamarin.AndroidX.DrawerLayout.dll": { - "Size": 15426 + "Size": 15422 }, "assemblies/Xamarin.AndroidX.Fragment.dll": { - "Size": 43135 + "Size": 43130 }, "assemblies/Xamarin.AndroidX.Legacy.Support.Core.UI.dll": { - "Size": 6715 + "Size": 6707 }, "assemblies/Xamarin.AndroidX.Lifecycle.Common.dll": { - "Size": 7062 + "Size": 7054 }, "assemblies/Xamarin.AndroidX.Lifecycle.LiveData.Core.dll": { - "Size": 7194 + "Size": 7186 }, "assemblies/Xamarin.AndroidX.Lifecycle.ViewModel.dll": { - "Size": 4873 + "Size": 4862 }, "assemblies/Xamarin.AndroidX.Loader.dll": { - "Size": 13585 + "Size": 13578 }, "assemblies/Xamarin.AndroidX.RecyclerView.dll": { - "Size": 102326 + "Size": 102322 }, "assemblies/Xamarin.AndroidX.SavedState.dll": { - "Size": 6268 + "Size": 6265 }, "assemblies/Xamarin.AndroidX.SwipeRefreshLayout.dll": { - "Size": 11272 + "Size": 11261 }, "assemblies/Xamarin.AndroidX.ViewPager.dll": { - "Size": 19424 + "Size": 19416 }, "assemblies/Xamarin.Forms.Core.dll": { - "Size": 524736 + "Size": 524728 }, "assemblies/Xamarin.Forms.Platform.Android.dll": { - "Size": 384872 + "Size": 384861 }, "assemblies/Xamarin.Forms.Platform.dll": { "Size": 56878 }, "assemblies/Xamarin.Forms.Xaml.dll": { - "Size": 55801 + "Size": 55795 }, "assemblies/Xamarin.Google.Android.Material.dll": { - "Size": 43497 + "Size": 43489 }, "classes.dex": { - "Size": 3533252 + "Size": 3518696 }, "lib/arm64-v8a/libmono-btls-shared.so": { "Size": 1613872 }, + "lib/arm64-v8a/libmonodroid.so": { + "Size": 277472 + }, "lib/arm64-v8a/libmono-native.so": { "Size": 750976 }, - "lib/arm64-v8a/libmonodroid.so": { - "Size": 277744 - }, "lib/arm64-v8a/libmonosgen-2.0.so": { "Size": 4039176 }, @@ -145,10 +145,10 @@ "META-INF/androidx.activity_activity.version": { "Size": 6 }, - "META-INF/androidx.appcompat_appcompat-resources.version": { + "META-INF/androidx.appcompat_appcompat.version": { "Size": 6 }, - "META-INF/androidx.appcompat_appcompat.version": { + "META-INF/androidx.appcompat_appcompat-resources.version": { "Size": 6 }, "META-INF/androidx.arch.core_core-runtime.version": { @@ -196,10 +196,10 @@ "META-INF/androidx.legacy_legacy-support-v4.version": { "Size": 6 }, - "META-INF/androidx.lifecycle_lifecycle-livedata-core.version": { + "META-INF/androidx.lifecycle_lifecycle-livedata.version": { "Size": 6 }, - "META-INF/androidx.lifecycle_lifecycle-livedata.version": { + "META-INF/androidx.lifecycle_lifecycle-livedata-core.version": { "Size": 6 }, "META-INF/androidx.lifecycle_lifecycle-runtime.version": { @@ -235,10 +235,10 @@ "META-INF/androidx.transition_transition.version": { "Size": 6 }, - "META-INF/androidx.vectordrawable_vectordrawable-animated.version": { + "META-INF/androidx.vectordrawable_vectordrawable.version": { "Size": 6 }, - "META-INF/androidx.vectordrawable_vectordrawable.version": { + "META-INF/androidx.vectordrawable_vectordrawable-animated.version": { "Size": 6 }, "META-INF/androidx.versionedparcelable_versionedparcelable.version": { @@ -256,12 +256,6 @@ "META-INF/proguard/androidx-annotations.pro": { "Size": 339 }, - "res/anim-v21/design_bottom_sheet_slide_in.xml": { - "Size": 616 - }, - "res/anim-v21/design_bottom_sheet_slide_out.xml": { - "Size": 616 - }, "res/anim/abc_fade_in.xml": { "Size": 388 }, @@ -358,9 +352,6 @@ "res/anim/exittoright.xml": { "Size": 468 }, - "res/animator-v21/design_appbar_state_list_animator.xml": { - "Size": 1216 - }, "res/animator/design_fab_hide_motion_spec.xml": { "Size": 796 }, @@ -388,38 +379,14 @@ "res/animator/mtrl_fab_transformation_sheet_expand_spec.xml": { "Size": 1888 }, - "res/color-v21/abc_btn_colored_borderless_text_material.xml": { - "Size": 464 - }, - "res/color-v23/abc_btn_colored_borderless_text_material.xml": { - "Size": 500 - }, - "res/color-v23/abc_btn_colored_text_material.xml": { - "Size": 500 - }, - "res/color-v23/abc_color_highlight_material.xml": { - "Size": 544 - }, - "res/color-v23/abc_tint_btn_checkable.xml": { - "Size": 624 - }, - "res/color-v23/abc_tint_default.xml": { - "Size": 1120 - }, - "res/color-v23/abc_tint_edittext.xml": { - "Size": 668 - }, - "res/color-v23/abc_tint_seek_thumb.xml": { - "Size": 500 - }, - "res/color-v23/abc_tint_spinner.xml": { - "Size": 668 + "res/animator-v21/design_appbar_state_list_animator.xml": { + "Size": 1216 }, - "res/color-v23/abc_tint_switch_track.xml": { - "Size": 664 + "res/anim-v21/design_bottom_sheet_slide_in.xml": { + "Size": 616 }, - "res/color-v23/design_tint_password_toggle.xml": { - "Size": 376 + "res/anim-v21/design_bottom_sheet_slide_out.xml": { + "Size": 616 }, "res/color/abc_background_cache_hint_selector_material_dark.xml": { "Size": 468 @@ -523,10 +490,10 @@ "res/color/mtrl_tabs_colored_ripple_color.xml": { "Size": 948 }, - "res/color/mtrl_tabs_icon_color_selector_colored.xml": { + "res/color/mtrl_tabs_icon_color_selector.xml": { "Size": 464 }, - "res/color/mtrl_tabs_icon_color_selector.xml": { + "res/color/mtrl_tabs_icon_color_selector_colored.xml": { "Size": 464 }, "res/color/mtrl_tabs_legacy_text_color_selector.xml": { @@ -544,159 +511,375 @@ "res/color/switch_thumb_material_light.xml": { "Size": 464 }, - "res/drawable-anydpi-v21/design_ic_visibility_off.xml": { - "Size": 1144 - }, - "res/drawable-anydpi-v21/design_ic_visibility.xml": { - "Size": 540 + "res/color-v21/abc_btn_colored_borderless_text_material.xml": { + "Size": 464 }, - "res/drawable-hdpi-v4/abc_ab_share_pack_mtrl_alpha.9.png": { - "Size": 272 + "res/color-v23/abc_btn_colored_borderless_text_material.xml": { + "Size": 500 }, - "res/drawable-hdpi-v4/abc_btn_check_to_on_mtrl_000.png": { - "Size": 227 + "res/color-v23/abc_btn_colored_text_material.xml": { + "Size": 500 }, - "res/drawable-hdpi-v4/abc_btn_check_to_on_mtrl_015.png": { - "Size": 404 + "res/color-v23/abc_color_highlight_material.xml": { + "Size": 544 }, - "res/drawable-hdpi-v4/abc_btn_radio_to_on_mtrl_000.png": { - "Size": 464 + "res/color-v23/abc_tint_btn_checkable.xml": { + "Size": 624 }, - "res/drawable-hdpi-v4/abc_btn_radio_to_on_mtrl_015.png": { - "Size": 563 + "res/color-v23/abc_tint_default.xml": { + "Size": 1120 }, - "res/drawable-hdpi-v4/abc_btn_switch_to_on_mtrl_00001.9.png": { - "Size": 1096 + "res/color-v23/abc_tint_edittext.xml": { + "Size": 668 }, - "res/drawable-hdpi-v4/abc_btn_switch_to_on_mtrl_00012.9.png": { - "Size": 1243 + "res/color-v23/abc_tint_seek_thumb.xml": { + "Size": 500 }, - "res/drawable-hdpi-v4/abc_cab_background_top_mtrl_alpha.9.png": { - "Size": 226 + "res/color-v23/abc_tint_spinner.xml": { + "Size": 668 }, - "res/drawable-hdpi-v4/abc_ic_commit_search_api_mtrl_alpha.png": { - "Size": 171 + "res/color-v23/abc_tint_switch_track.xml": { + "Size": 664 }, - "res/drawable-hdpi-v4/abc_ic_menu_copy_mtrl_am_alpha.png": { - "Size": 202 + "res/color-v23/design_tint_password_toggle.xml": { + "Size": 376 }, - "res/drawable-hdpi-v4/abc_ic_menu_cut_mtrl_alpha.png": { - "Size": 404 + "res/drawable/abc_btn_borderless_material.xml": { + "Size": 588 }, - "res/drawable-hdpi-v4/abc_ic_menu_paste_mtrl_am_alpha.png": { - "Size": 226 + "res/drawable/abc_btn_check_material.xml": { + "Size": 464 }, - "res/drawable-hdpi-v4/abc_ic_menu_selectall_mtrl_alpha.png": { - "Size": 215 + "res/drawable/abc_btn_check_material_anim.xml": { + "Size": 816 }, - "res/drawable-hdpi-v4/abc_ic_menu_share_mtrl_alpha.png": { - "Size": 389 + "res/drawable/abc_btn_colored_material.xml": { + "Size": 344 }, - "res/drawable-hdpi-v4/abc_ic_star_black_16dp.png": { - "Size": 263 + "res/drawable/abc_btn_default_mtrl_shape.xml": { + "Size": 932 }, - "res/drawable-hdpi-v4/abc_ic_star_black_36dp.png": { - "Size": 522 + "res/drawable/abc_btn_radio_material.xml": { + "Size": 464 }, - "res/drawable-hdpi-v4/abc_ic_star_black_48dp.png": { - "Size": 668 + "res/drawable/abc_btn_radio_material_anim.xml": { + "Size": 816 }, - "res/drawable-hdpi-v4/abc_ic_star_half_black_16dp.png": { - "Size": 197 + "res/drawable/abc_cab_background_internal_bg.xml": { + "Size": 372 }, - "res/drawable-hdpi-v4/abc_ic_star_half_black_36dp.png": { - "Size": 328 + "res/drawable/abc_cab_background_top_material.xml": { + "Size": 336 }, - "res/drawable-hdpi-v4/abc_ic_star_half_black_48dp.png": { - "Size": 431 + "res/drawable/abc_dialog_material_background.xml": { + "Size": 716 }, - "res/drawable-hdpi-v4/abc_list_divider_mtrl_alpha.9.png": { - "Size": 167 + "res/drawable/abc_edit_text_material.xml": { + "Size": 868 }, - "res/drawable-hdpi-v4/abc_list_focused_holo.9.png": { - "Size": 244 + "res/drawable/abc_ic_ab_back_material.xml": { + "Size": 692 }, - "res/drawable-hdpi-v4/abc_list_longpressed_holo.9.png": { - "Size": 212 + "res/drawable/abc_ic_arrow_drop_right_black_24dp.xml": { + "Size": 1000 }, - "res/drawable-hdpi-v4/abc_list_pressed_holo_dark.9.png": { - "Size": 208 + "res/drawable/abc_ic_clear_material.xml": { + "Size": 684 }, - "res/drawable-hdpi-v4/abc_list_pressed_holo_light.9.png": { - "Size": 208 + "res/drawable/abc_ic_go_search_api_material.xml": { + "Size": 640 }, - "res/drawable-hdpi-v4/abc_list_selector_disabled_holo_dark.9.png": { - "Size": 228 + "res/drawable/abc_ic_menu_overflow_material.xml": { + "Size": 792 }, - "res/drawable-hdpi-v4/abc_list_selector_disabled_holo_light.9.png": { - "Size": 229 + "res/drawable/abc_ic_search_api_material.xml": { + "Size": 812 }, - "res/drawable-hdpi-v4/abc_menu_hardkey_panel_mtrl_mult.9.png": { - "Size": 738 + "res/drawable/abc_ic_voice_search_api_material.xml": { + "Size": 828 }, - "res/drawable-hdpi-v4/abc_popup_background_mtrl_mult.9.png": { - "Size": 1098 + "res/drawable/abc_item_background_holo_dark.xml": { + "Size": 1012 }, - "res/drawable-hdpi-v4/abc_scrubber_control_off_mtrl_alpha.png": { - "Size": 201 + "res/drawable/abc_item_background_holo_light.xml": { + "Size": 1012 }, - "res/drawable-hdpi-v4/abc_scrubber_control_to_pressed_mtrl_000.png": { - "Size": 196 + "res/drawable/abc_list_divider_material.xml": { + "Size": 480 }, - "res/drawable-hdpi-v4/abc_scrubber_control_to_pressed_mtrl_005.png": { - "Size": 272 + "res/drawable/abc_list_selector_background_transition_holo_dark.xml": { + "Size": 424 }, - "res/drawable-hdpi-v4/abc_scrubber_primary_mtrl_alpha.9.png": { - "Size": 205 + "res/drawable/abc_list_selector_background_transition_holo_light.xml": { + "Size": 424 }, - "res/drawable-hdpi-v4/abc_scrubber_track_mtrl_alpha.9.png": { - "Size": 196 + "res/drawable/abc_list_selector_holo_dark.xml": { + "Size": 1064 }, - "res/drawable-hdpi-v4/abc_spinner_mtrl_am_alpha.9.png": { - "Size": 345 + "res/drawable/abc_list_selector_holo_light.xml": { + "Size": 1064 }, - "res/drawable-hdpi-v4/abc_switch_track_mtrl_alpha.9.png": { - "Size": 484 + "res/drawable/abc_ratingbar_indicator_material.xml": { + "Size": 664 }, - "res/drawable-hdpi-v4/abc_tab_indicator_mtrl_alpha.9.png": { - "Size": 190 + "res/drawable/abc_ratingbar_material.xml": { + "Size": 664 }, - "res/drawable-hdpi-v4/abc_text_select_handle_left_mtrl_dark.png": { - "Size": 278 + "res/drawable/abc_ratingbar_small_material.xml": { + "Size": 664 }, - "res/drawable-hdpi-v4/abc_text_select_handle_left_mtrl_light.png": { - "Size": 278 + "res/drawable/abc_seekbar_thumb_material.xml": { + "Size": 1100 }, - "res/drawable-hdpi-v4/abc_text_select_handle_middle_mtrl_dark.png": { - "Size": 398 + "res/drawable/abc_seekbar_tick_mark_material.xml": { + "Size": 516 }, - "res/drawable-hdpi-v4/abc_text_select_handle_middle_mtrl_light.png": { - "Size": 396 + "res/drawable/abc_seekbar_track_material.xml": { + "Size": 1408 }, - "res/drawable-hdpi-v4/abc_text_select_handle_right_mtrl_dark.png": { - "Size": 263 + "res/drawable/abc_spinner_textfield_background_material.xml": { + "Size": 1160 }, - "res/drawable-hdpi-v4/abc_text_select_handle_right_mtrl_light.png": { - "Size": 262 + "res/drawable/abc_switch_thumb_material.xml": { + "Size": 464 }, - "res/drawable-hdpi-v4/abc_textfield_activated_mtrl_alpha.9.png": { - "Size": 186 + "res/drawable/abc_tab_indicator_material.xml": { + "Size": 468 }, - "res/drawable-hdpi-v4/abc_textfield_default_mtrl_alpha.9.png": { - "Size": 192 + "res/drawable/abc_text_cursor_material.xml": { + "Size": 516 }, - "res/drawable-hdpi-v4/abc_textfield_search_activated_mtrl_alpha.9.png": { - "Size": 178 + "res/drawable/abc_textfield_search_material.xml": { + "Size": 756 }, - "res/drawable-hdpi-v4/abc_textfield_search_default_mtrl_alpha.9.png": { + "res/drawable/abc_vector_test.xml": { + "Size": 612 + }, + "res/drawable/btn_checkbox_checked_mtrl.xml": { + "Size": 2688 + }, + "res/drawable/btn_checkbox_checked_to_unchecked_mtrl_animation.xml": { + "Size": 688 + }, + "res/drawable/btn_checkbox_unchecked_mtrl.xml": { + "Size": 2660 + }, + "res/drawable/btn_checkbox_unchecked_to_checked_mtrl_animation.xml": { + "Size": 688 + }, + "res/drawable/btn_radio_off_mtrl.xml": { + "Size": 1728 + }, + "res/drawable/btn_radio_off_to_on_mtrl_animation.xml": { + "Size": 680 + }, + "res/drawable/btn_radio_on_mtrl.xml": { + "Size": 1656 + }, + "res/drawable/btn_radio_on_to_off_mtrl_animation.xml": { + "Size": 680 + }, + "res/drawable/design_bottom_navigation_item_background.xml": { + "Size": 784 + }, + "res/drawable/design_fab_background.xml": { + "Size": 372 + }, + "res/drawable/design_password_eye.xml": { + "Size": 464 + }, + "res/drawable/design_snackbar_background.xml": { + "Size": 484 + }, + "res/drawable/ic_mtrl_chip_checked_black.xml": { + "Size": 600 + }, + "res/drawable/ic_mtrl_chip_checked_circle.xml": { + "Size": 940 + }, + "res/drawable/ic_mtrl_chip_close_circle.xml": { + "Size": 808 + }, + "res/drawable/mtrl_snackbar_background.xml": { + "Size": 484 + }, + "res/drawable/mtrl_tabs_default_indicator.xml": { + "Size": 628 + }, + "res/drawable/navigation_empty_icon.xml": { + "Size": 516 + }, + "res/drawable/notification_bg.xml": { + "Size": 532 + }, + "res/drawable/notification_bg_low.xml": { + "Size": 532 + }, + "res/drawable/notification_icon_background.xml": { + "Size": 372 + }, + "res/drawable/notification_tile_bg.xml": { + "Size": 304 + }, + "res/drawable/tooltip_frame_dark.xml": { + "Size": 484 + }, + "res/drawable/tooltip_frame_light.xml": { + "Size": 484 + }, + "res/drawable-anydpi-v21/design_ic_visibility.xml": { + "Size": 540 + }, + "res/drawable-anydpi-v21/design_ic_visibility_off.xml": { + "Size": 1144 + }, + "res/drawable-hdpi-v4/abc_ab_share_pack_mtrl_alpha.9.png": { + "Size": 272 + }, + "res/drawable-hdpi-v4/abc_btn_check_to_on_mtrl_000.png": { + "Size": 227 + }, + "res/drawable-hdpi-v4/abc_btn_check_to_on_mtrl_015.png": { + "Size": 404 + }, + "res/drawable-hdpi-v4/abc_btn_radio_to_on_mtrl_000.png": { + "Size": 464 + }, + "res/drawable-hdpi-v4/abc_btn_radio_to_on_mtrl_015.png": { + "Size": 563 + }, + "res/drawable-hdpi-v4/abc_btn_switch_to_on_mtrl_00001.9.png": { + "Size": 1096 + }, + "res/drawable-hdpi-v4/abc_btn_switch_to_on_mtrl_00012.9.png": { + "Size": 1243 + }, + "res/drawable-hdpi-v4/abc_cab_background_top_mtrl_alpha.9.png": { + "Size": 226 + }, + "res/drawable-hdpi-v4/abc_ic_commit_search_api_mtrl_alpha.png": { + "Size": 171 + }, + "res/drawable-hdpi-v4/abc_ic_menu_copy_mtrl_am_alpha.png": { + "Size": 202 + }, + "res/drawable-hdpi-v4/abc_ic_menu_cut_mtrl_alpha.png": { + "Size": 404 + }, + "res/drawable-hdpi-v4/abc_ic_menu_paste_mtrl_am_alpha.png": { + "Size": 226 + }, + "res/drawable-hdpi-v4/abc_ic_menu_selectall_mtrl_alpha.png": { + "Size": 215 + }, + "res/drawable-hdpi-v4/abc_ic_menu_share_mtrl_alpha.png": { + "Size": 389 + }, + "res/drawable-hdpi-v4/abc_ic_star_black_16dp.png": { + "Size": 263 + }, + "res/drawable-hdpi-v4/abc_ic_star_black_36dp.png": { + "Size": 522 + }, + "res/drawable-hdpi-v4/abc_ic_star_black_48dp.png": { + "Size": 668 + }, + "res/drawable-hdpi-v4/abc_ic_star_half_black_16dp.png": { + "Size": 197 + }, + "res/drawable-hdpi-v4/abc_ic_star_half_black_36dp.png": { + "Size": 328 + }, + "res/drawable-hdpi-v4/abc_ic_star_half_black_48dp.png": { + "Size": 431 + }, + "res/drawable-hdpi-v4/abc_list_divider_mtrl_alpha.9.png": { + "Size": 167 + }, + "res/drawable-hdpi-v4/abc_list_focused_holo.9.png": { + "Size": 244 + }, + "res/drawable-hdpi-v4/abc_list_longpressed_holo.9.png": { + "Size": 212 + }, + "res/drawable-hdpi-v4/abc_list_pressed_holo_dark.9.png": { + "Size": 208 + }, + "res/drawable-hdpi-v4/abc_list_pressed_holo_light.9.png": { + "Size": 208 + }, + "res/drawable-hdpi-v4/abc_list_selector_disabled_holo_dark.9.png": { + "Size": 228 + }, + "res/drawable-hdpi-v4/abc_list_selector_disabled_holo_light.9.png": { + "Size": 229 + }, + "res/drawable-hdpi-v4/abc_menu_hardkey_panel_mtrl_mult.9.png": { + "Size": 738 + }, + "res/drawable-hdpi-v4/abc_popup_background_mtrl_mult.9.png": { + "Size": 1098 + }, + "res/drawable-hdpi-v4/abc_scrubber_control_off_mtrl_alpha.png": { + "Size": 201 + }, + "res/drawable-hdpi-v4/abc_scrubber_control_to_pressed_mtrl_000.png": { + "Size": 196 + }, + "res/drawable-hdpi-v4/abc_scrubber_control_to_pressed_mtrl_005.png": { + "Size": 272 + }, + "res/drawable-hdpi-v4/abc_scrubber_primary_mtrl_alpha.9.png": { + "Size": 205 + }, + "res/drawable-hdpi-v4/abc_scrubber_track_mtrl_alpha.9.png": { + "Size": 196 + }, + "res/drawable-hdpi-v4/abc_spinner_mtrl_am_alpha.9.png": { + "Size": 345 + }, + "res/drawable-hdpi-v4/abc_switch_track_mtrl_alpha.9.png": { + "Size": 484 + }, + "res/drawable-hdpi-v4/abc_tab_indicator_mtrl_alpha.9.png": { + "Size": 190 + }, + "res/drawable-hdpi-v4/abc_text_select_handle_left_mtrl_dark.png": { + "Size": 278 + }, + "res/drawable-hdpi-v4/abc_text_select_handle_left_mtrl_light.png": { + "Size": 278 + }, + "res/drawable-hdpi-v4/abc_text_select_handle_middle_mtrl_dark.png": { + "Size": 398 + }, + "res/drawable-hdpi-v4/abc_text_select_handle_middle_mtrl_light.png": { + "Size": 396 + }, + "res/drawable-hdpi-v4/abc_text_select_handle_right_mtrl_dark.png": { + "Size": 263 + }, + "res/drawable-hdpi-v4/abc_text_select_handle_right_mtrl_light.png": { + "Size": 262 + }, + "res/drawable-hdpi-v4/abc_textfield_activated_mtrl_alpha.9.png": { + "Size": 186 + }, + "res/drawable-hdpi-v4/abc_textfield_default_mtrl_alpha.9.png": { + "Size": 192 + }, + "res/drawable-hdpi-v4/abc_textfield_search_activated_mtrl_alpha.9.png": { "Size": 178 }, - "res/drawable-hdpi-v4/design_ic_visibility_off.png": { - "Size": 507 + "res/drawable-hdpi-v4/abc_textfield_search_default_mtrl_alpha.9.png": { + "Size": 178 }, "res/drawable-hdpi-v4/design_ic_visibility.png": { "Size": 470 }, + "res/drawable-hdpi-v4/design_ic_visibility_off.png": { + "Size": 507 + }, "res/drawable-hdpi-v4/icon.png": { "Size": 2178 }, @@ -706,12 +889,12 @@ "res/drawable-hdpi-v4/notification_bg_low_pressed.9.png": { "Size": 225 }, - "res/drawable-hdpi-v4/notification_bg_normal_pressed.9.png": { - "Size": 225 - }, "res/drawable-hdpi-v4/notification_bg_normal.9.png": { "Size": 212 }, + "res/drawable-hdpi-v4/notification_bg_normal_pressed.9.png": { + "Size": 225 + }, "res/drawable-hdpi-v4/notify_panel_notification_icon_bg.png": { "Size": 107 }, @@ -901,12 +1084,12 @@ "res/drawable-mdpi-v4/abc_textfield_search_default_mtrl_alpha.9.png": { "Size": 178 }, - "res/drawable-mdpi-v4/design_ic_visibility_off.png": { - "Size": 351 - }, "res/drawable-mdpi-v4/design_ic_visibility.png": { "Size": 309 }, + "res/drawable-mdpi-v4/design_ic_visibility_off.png": { + "Size": 351 + }, "res/drawable-mdpi-v4/icon.png": { "Size": 1490 }, @@ -916,12 +1099,12 @@ "res/drawable-mdpi-v4/notification_bg_low_pressed.9.png": { "Size": 223 }, - "res/drawable-mdpi-v4/notification_bg_normal_pressed.9.png": { - "Size": 223 - }, "res/drawable-mdpi-v4/notification_bg_normal.9.png": { "Size": 215 }, + "res/drawable-mdpi-v4/notification_bg_normal_pressed.9.png": { + "Size": 223 + }, "res/drawable-mdpi-v4/notify_panel_notification_icon_bg.png": { "Size": 98 }, @@ -1129,12 +1312,12 @@ "res/drawable-xhdpi-v4/abc_textfield_search_default_mtrl_alpha.9.png": { "Size": 182 }, - "res/drawable-xhdpi-v4/design_ic_visibility_off.png": { - "Size": 629 - }, "res/drawable-xhdpi-v4/design_ic_visibility.png": { "Size": 593 }, + "res/drawable-xhdpi-v4/design_ic_visibility_off.png": { + "Size": 629 + }, "res/drawable-xhdpi-v4/icon.png": { "Size": 3098 }, @@ -1144,12 +1327,12 @@ "res/drawable-xhdpi-v4/notification_bg_low_pressed.9.png": { "Size": 252 }, - "res/drawable-xhdpi-v4/notification_bg_normal_pressed.9.png": { - "Size": 247 - }, "res/drawable-xhdpi-v4/notification_bg_normal.9.png": { "Size": 221 }, + "res/drawable-xhdpi-v4/notification_bg_normal_pressed.9.png": { + "Size": 247 + }, "res/drawable-xhdpi-v4/notify_panel_notification_icon_bg.png": { "Size": 138 }, @@ -1294,12 +1477,12 @@ "res/drawable-xxhdpi-v4/abc_textfield_search_default_mtrl_alpha.9.png": { "Size": 186 }, - "res/drawable-xxhdpi-v4/design_ic_visibility_off.png": { - "Size": 884 - }, "res/drawable-xxhdpi-v4/design_ic_visibility.png": { "Size": 868 }, + "res/drawable-xxhdpi-v4/design_ic_visibility_off.png": { + "Size": 884 + }, "res/drawable-xxhdpi-v4/icon.png": { "Size": 4674 }, @@ -1381,207 +1564,15 @@ "res/drawable-xxxhdpi-v4/abc_text_select_handle_right_mtrl_light.png": { "Size": 513 }, - "res/drawable-xxxhdpi-v4/design_ic_visibility_off.png": { - "Size": 1201 - }, "res/drawable-xxxhdpi-v4/design_ic_visibility.png": { "Size": 1155 }, + "res/drawable-xxxhdpi-v4/design_ic_visibility_off.png": { + "Size": 1201 + }, "res/drawable-xxxhdpi-v4/icon.png": { "Size": 6832 }, - "res/drawable/abc_btn_borderless_material.xml": { - "Size": 588 - }, - "res/drawable/abc_btn_check_material_anim.xml": { - "Size": 816 - }, - "res/drawable/abc_btn_check_material.xml": { - "Size": 464 - }, - "res/drawable/abc_btn_colored_material.xml": { - "Size": 344 - }, - "res/drawable/abc_btn_default_mtrl_shape.xml": { - "Size": 932 - }, - "res/drawable/abc_btn_radio_material_anim.xml": { - "Size": 816 - }, - "res/drawable/abc_btn_radio_material.xml": { - "Size": 464 - }, - "res/drawable/abc_cab_background_internal_bg.xml": { - "Size": 372 - }, - "res/drawable/abc_cab_background_top_material.xml": { - "Size": 336 - }, - "res/drawable/abc_dialog_material_background.xml": { - "Size": 716 - }, - "res/drawable/abc_edit_text_material.xml": { - "Size": 868 - }, - "res/drawable/abc_ic_ab_back_material.xml": { - "Size": 692 - }, - "res/drawable/abc_ic_arrow_drop_right_black_24dp.xml": { - "Size": 1000 - }, - "res/drawable/abc_ic_clear_material.xml": { - "Size": 684 - }, - "res/drawable/abc_ic_go_search_api_material.xml": { - "Size": 640 - }, - "res/drawable/abc_ic_menu_overflow_material.xml": { - "Size": 792 - }, - "res/drawable/abc_ic_search_api_material.xml": { - "Size": 812 - }, - "res/drawable/abc_ic_voice_search_api_material.xml": { - "Size": 828 - }, - "res/drawable/abc_item_background_holo_dark.xml": { - "Size": 1012 - }, - "res/drawable/abc_item_background_holo_light.xml": { - "Size": 1012 - }, - "res/drawable/abc_list_divider_material.xml": { - "Size": 480 - }, - "res/drawable/abc_list_selector_background_transition_holo_dark.xml": { - "Size": 424 - }, - "res/drawable/abc_list_selector_background_transition_holo_light.xml": { - "Size": 424 - }, - "res/drawable/abc_list_selector_holo_dark.xml": { - "Size": 1064 - }, - "res/drawable/abc_list_selector_holo_light.xml": { - "Size": 1064 - }, - "res/drawable/abc_ratingbar_indicator_material.xml": { - "Size": 664 - }, - "res/drawable/abc_ratingbar_material.xml": { - "Size": 664 - }, - "res/drawable/abc_ratingbar_small_material.xml": { - "Size": 664 - }, - "res/drawable/abc_seekbar_thumb_material.xml": { - "Size": 1100 - }, - "res/drawable/abc_seekbar_tick_mark_material.xml": { - "Size": 516 - }, - "res/drawable/abc_seekbar_track_material.xml": { - "Size": 1408 - }, - "res/drawable/abc_spinner_textfield_background_material.xml": { - "Size": 1160 - }, - "res/drawable/abc_switch_thumb_material.xml": { - "Size": 464 - }, - "res/drawable/abc_tab_indicator_material.xml": { - "Size": 468 - }, - "res/drawable/abc_text_cursor_material.xml": { - "Size": 516 - }, - "res/drawable/abc_textfield_search_material.xml": { - "Size": 756 - }, - "res/drawable/abc_vector_test.xml": { - "Size": 612 - }, - "res/drawable/btn_checkbox_checked_mtrl.xml": { - "Size": 2688 - }, - "res/drawable/btn_checkbox_checked_to_unchecked_mtrl_animation.xml": { - "Size": 688 - }, - "res/drawable/btn_checkbox_unchecked_mtrl.xml": { - "Size": 2660 - }, - "res/drawable/btn_checkbox_unchecked_to_checked_mtrl_animation.xml": { - "Size": 688 - }, - "res/drawable/btn_radio_off_mtrl.xml": { - "Size": 1728 - }, - "res/drawable/btn_radio_off_to_on_mtrl_animation.xml": { - "Size": 680 - }, - "res/drawable/btn_radio_on_mtrl.xml": { - "Size": 1656 - }, - "res/drawable/btn_radio_on_to_off_mtrl_animation.xml": { - "Size": 680 - }, - "res/drawable/design_bottom_navigation_item_background.xml": { - "Size": 784 - }, - "res/drawable/design_fab_background.xml": { - "Size": 372 - }, - "res/drawable/design_password_eye.xml": { - "Size": 464 - }, - "res/drawable/design_snackbar_background.xml": { - "Size": 484 - }, - "res/drawable/ic_mtrl_chip_checked_black.xml": { - "Size": 600 - }, - "res/drawable/ic_mtrl_chip_checked_circle.xml": { - "Size": 940 - }, - "res/drawable/ic_mtrl_chip_close_circle.xml": { - "Size": 808 - }, - "res/drawable/mtrl_snackbar_background.xml": { - "Size": 484 - }, - "res/drawable/mtrl_tabs_default_indicator.xml": { - "Size": 628 - }, - "res/drawable/navigation_empty_icon.xml": { - "Size": 516 - }, - "res/drawable/notification_bg_low.xml": { - "Size": 532 - }, - "res/drawable/notification_bg.xml": { - "Size": 532 - }, - "res/drawable/notification_icon_background.xml": { - "Size": 372 - }, - "res/drawable/notification_tile_bg.xml": { - "Size": 304 - }, - "res/drawable/tooltip_frame_dark.xml": { - "Size": 484 - }, - "res/drawable/tooltip_frame_light.xml": { - "Size": 484 - }, - "res/interpolator-v21/mtrl_fast_out_linear_in.xml": { - "Size": 400 - }, - "res/interpolator-v21/mtrl_fast_out_slow_in.xml": { - "Size": 400 - }, - "res/interpolator-v21/mtrl_linear_out_slow_in.xml": { - "Size": 400 - }, "res/interpolator/btn_checkbox_checked_mtrl_animation_interpolator_0.xml": { "Size": 316 }, @@ -1609,53 +1600,20 @@ "res/interpolator/mtrl_fast_out_slow_in.xml": { "Size": 144 }, - "res/interpolator/mtrl_linear_out_slow_in.xml": { - "Size": 136 - }, "res/interpolator/mtrl_linear.xml": { "Size": 132 }, - "res/layout-sw600dp-v13/design_layout_snackbar.xml": { - "Size": 528 - }, - "res/layout-sw600dp-v13/mtrl_layout_snackbar.xml": { - "Size": 528 - }, - "res/layout-v16/notification_template_custom_big.xml": { - "Size": 3208 - }, - "res/layout-v21/abc_screen_toolbar.xml": { - "Size": 1504 - }, - "res/layout-v21/fallbacktoolbardonotuse.xml": { - "Size": 496 - }, - "res/layout-v21/notification_action_tombstone.xml": { - "Size": 1228 - }, - "res/layout-v21/notification_action.xml": { - "Size": 1052 - }, - "res/layout-v21/notification_template_custom_big.xml": { - "Size": 2456 - }, - "res/layout-v21/notification_template_icon_group.xml": { - "Size": 988 - }, - "res/layout-v21/toolbar.xml": { - "Size": 496 - }, - "res/layout-v22/abc_alert_dialog_button_bar_material.xml": { - "Size": 1584 + "res/interpolator/mtrl_linear_out_slow_in.xml": { + "Size": 136 }, - "res/layout-v26/abc_screen_toolbar.xml": { - "Size": 1560 + "res/interpolator-v21/mtrl_fast_out_linear_in.xml": { + "Size": 400 }, - "res/layout-watch-v20/abc_alert_dialog_button_bar_material.xml": { - "Size": 1208 + "res/interpolator-v21/mtrl_fast_out_slow_in.xml": { + "Size": 400 }, - "res/layout-watch-v20/abc_alert_dialog_title_material.xml": { - "Size": 1352 + "res/interpolator-v21/mtrl_linear_out_slow_in.xml": { + "Size": 400 }, "res/layout/abc_action_bar_title_item.xml": { "Size": 872 @@ -1675,12 +1633,12 @@ "res/layout/abc_action_mode_close_item_material.xml": { "Size": 840 }, - "res/layout/abc_activity_chooser_view_list_item.xml": { - "Size": 1304 - }, "res/layout/abc_activity_chooser_view.xml": { "Size": 1684 }, + "res/layout/abc_activity_chooser_view_list_item.xml": { + "Size": 1304 + }, "res/layout/abc_alert_dialog_button_bar_material.xml": { "Size": 1536 }, @@ -1720,12 +1678,12 @@ "res/layout/abc_screen_content_include.xml": { "Size": 548 }, - "res/layout/abc_screen_simple_overlay_action_mode.xml": { - "Size": 792 - }, "res/layout/abc_screen_simple.xml": { "Size": 832 }, + "res/layout/abc_screen_simple_overlay_action_mode.xml": { + "Size": 792 + }, "res/layout/abc_screen_toolbar.xml": { "Size": 1452 }, @@ -1759,12 +1717,12 @@ "res/layout/design_bottom_sheet_dialog.xml": { "Size": 1184 }, - "res/layout/design_layout_snackbar_include.xml": { - "Size": 1444 - }, "res/layout/design_layout_snackbar.xml": { "Size": 528 }, + "res/layout/design_layout_snackbar_include.xml": { + "Size": 1444 + }, "res/layout/design_layout_tab_icon.xml": { "Size": 408 }, @@ -1774,6 +1732,9 @@ "res/layout/design_menu_item_action_area.xml": { "Size": 320 }, + "res/layout/design_navigation_item.xml": { + "Size": 536 + }, "res/layout/design_navigation_item_header.xml": { "Size": 440 }, @@ -1783,15 +1744,12 @@ "res/layout/design_navigation_item_subheader.xml": { "Size": 564 }, - "res/layout/design_navigation_item.xml": { - "Size": 536 + "res/layout/design_navigation_menu.xml": { + "Size": 528 }, "res/layout/design_navigation_menu_item.xml": { "Size": 856 }, - "res/layout/design_navigation_menu.xml": { - "Size": 528 - }, "res/layout/design_text_input_password_icon.xml": { "Size": 564 }, @@ -1807,35 +1765,35 @@ "res/layout/main.xml": { "Size": 544 }, - "res/layout/mtrl_layout_snackbar_include.xml": { - "Size": 1404 - }, "res/layout/mtrl_layout_snackbar.xml": { "Size": 528 }, - "res/layout/notification_action_tombstone.xml": { - "Size": 1332 + "res/layout/mtrl_layout_snackbar_include.xml": { + "Size": 1404 }, "res/layout/notification_action.xml": { "Size": 1156 }, + "res/layout/notification_action_tombstone.xml": { + "Size": 1332 + }, "res/layout/notification_media_action.xml": { "Size": 564 }, "res/layout/notification_media_cancel_action.xml": { "Size": 744 }, + "res/layout/notification_template_big_media.xml": { + "Size": 1696 + }, "res/layout/notification_template_big_media_custom.xml": { "Size": 3044 }, - "res/layout/notification_template_big_media_narrow_custom.xml": { - "Size": 3216 - }, "res/layout/notification_template_big_media_narrow.xml": { "Size": 1824 }, - "res/layout/notification_template_big_media.xml": { - "Size": 1696 + "res/layout/notification_template_big_media_narrow_custom.xml": { + "Size": 3216 }, "res/layout/notification_template_icon_group.xml": { "Size": 392 @@ -1843,12 +1801,12 @@ "res/layout/notification_template_lines_media.xml": { "Size": 2872 }, - "res/layout/notification_template_media_custom.xml": { - "Size": 2756 - }, "res/layout/notification_template_media.xml": { "Size": 1292 }, + "res/layout/notification_template_media_custom.xml": { + "Size": 2756 + }, "res/layout/notification_template_part_chronometer.xml": { "Size": 440 }, @@ -1879,9 +1837,51 @@ "res/layout/toolbar.xml": { "Size": 452 }, + "res/layout-sw600dp-v13/design_layout_snackbar.xml": { + "Size": 528 + }, + "res/layout-sw600dp-v13/mtrl_layout_snackbar.xml": { + "Size": 528 + }, + "res/layout-v16/notification_template_custom_big.xml": { + "Size": 3208 + }, + "res/layout-v21/abc_screen_toolbar.xml": { + "Size": 1504 + }, + "res/layout-v21/fallbacktoolbardonotuse.xml": { + "Size": 496 + }, + "res/layout-v21/notification_action.xml": { + "Size": 1052 + }, + "res/layout-v21/notification_action_tombstone.xml": { + "Size": 1228 + }, + "res/layout-v21/notification_template_custom_big.xml": { + "Size": 2456 + }, + "res/layout-v21/notification_template_icon_group.xml": { + "Size": 988 + }, + "res/layout-v21/toolbar.xml": { + "Size": 496 + }, + "res/layout-v22/abc_alert_dialog_button_bar_material.xml": { + "Size": 1584 + }, + "res/layout-v26/abc_screen_toolbar.xml": { + "Size": 1560 + }, + "res/layout-watch-v20/abc_alert_dialog_button_bar_material.xml": { + "Size": 1208 + }, + "res/layout-watch-v20/abc_alert_dialog_title_material.xml": { + "Size": 1352 + }, "resources.arsc": { "Size": 341040 } }, - "PackageSize": 9521310 + "PackageSize": 9513118 } \ No newline at end of file diff --git a/src/monodroid/jni/basic-utilities.cc b/src/monodroid/jni/basic-utilities.cc index 8d17bf12e17..adf67f7a9c1 100644 --- a/src/monodroid/jni/basic-utilities.cc +++ b/src/monodroid/jni/basic-utilities.cc @@ -128,6 +128,10 @@ BasicUtilities::file_exists (const char *file) bool BasicUtilities::directory_exists (const char *directory) { + if (directory == nullptr) { + return false; + } + monodroid_stat_t s; if (monodroid_stat (directory, &s) == 0 && (s.st_mode & S_IFMT) == S_IFDIR) return true; diff --git a/src/monodroid/jni/cpp-util.hh b/src/monodroid/jni/cpp-util.hh index 641e506d256..eac76f0625e 100644 --- a/src/monodroid/jni/cpp-util.hh +++ b/src/monodroid/jni/cpp-util.hh @@ -112,7 +112,7 @@ namespace xamarin::android // `sizeof... (Length)` part which subtracts the number of template parameters - the amount of NUL bytes so that // we don't waste space. constexpr size_t total_length = (... + Length) - sizeof... (Length); - char_array ret; + char_array ret; // lgtm [cpp/paddingbyteinformationdisclosure] the buffer is filled in the loop below ret[total_length] = 0; size_t i = 0; diff --git a/src/monodroid/jni/monodroid-glue.cc b/src/monodroid/jni/monodroid-glue.cc index 18e13c1a016..d50c2c73d3a 100644 --- a/src/monodroid/jni/monodroid-glue.cc +++ b/src/monodroid/jni/monodroid-glue.cc @@ -157,6 +157,10 @@ get_xamarin_android_msbuild_path (void) // Compute the final path base_path = utils.utf16_to_utf8 (buffer); + if (base_path == nullptr) { + log_fatal (LOG_DEFAULT, "Failed to convert UTF-16 to UTF-8 in %s", __PRETTY_FUNCTION__); + Helpers::abort_application (); + } CoTaskMemFree (buffer); msbuild_folder_path = utils.path_combine (base_path, suffix); free (base_path); @@ -266,7 +270,7 @@ MonodroidRuntime::log_jit_event (MonoMethod *method, const char *event_name) char* name = mono_method_full_name (method, 1); timing_diff diff (jit_time); - fprintf (jit_log, "JIT method %6s: %s elapsed: %lis:%u::%u\n", event_name, name, static_cast(diff.sec), diff.ms, diff.ns); + fprintf (jit_log, "JIT method %6s: %s elapsed: %lis:%u::%u\n", event_name, name, static_cast(diff.sec), diff.ms, diff.ns); free (name); } @@ -409,7 +413,7 @@ MonodroidRuntime::gather_bundled_assemblies (jstring_array_wrapper &runtimeApks, if (application_config.instant_run_enabled) { for (size_t i = 0; i < AndroidSystem::MAX_OVERRIDES; ++i) { const char *p = androidSystem.get_override_dir (i); - if (!utils.directory_exists (p)) + if (p == nullptr || !utils.directory_exists (p)) continue; log_info (LOG_ASSEMBLY, "Loading TypeMaps from %s", p); embeddedAssemblies.try_load_typemaps_from_directory (p); @@ -1488,6 +1492,10 @@ MonodroidRuntime::monodroid_dlopen (const char *name, int flags, char **err, [[m const char *last_sep = strrchr (the_path, MONODROID_PATH_SEPARATOR_CHAR); if (last_sep != nullptr) { char *dir = utils.strdup_new (the_path, last_sep - the_path); + if (dir == nullptr) { + return false; + } + tmp_name = utils.string_concat (dir, MONODROID_PATH_SEPARATOR, API_DSO_NAME); delete[] dir; if (!utils.file_exists (tmp_name)) { @@ -1514,7 +1522,7 @@ MonodroidRuntime::monodroid_dlopen (const char *name, int flags, char **err, [[m if (!found) { // Next lets try the location of the XA runtime DLL, libxa-internal-api.dll should be next to it. const char *path = get_my_location (false); - found = probe_dll_at (path); + found = probe_dll_at (path); // lgtm [cpp/unguardednullreturndereference] probe_dll_at checks whether the passed pointer is nullptr if (path != nullptr) { free (reinterpret_cast(const_cast(path))); } @@ -1879,6 +1887,11 @@ MonodroidRuntime::load_assembly (MonoAssemblyLoadContextGCHandle alc_handle, jst } const char *assm_name = assembly.get_cstr (); + if (XA_UNLIKELY (assm_name == nullptr)) { + log_warn (LOG_ASSEMBLY, "Unable to load assembly into ALC, name is null"); + return; + } + MonoAssemblyName *aname = mono_assembly_name_new (assm_name); MonoImageOpenStatus open_status; @@ -1908,6 +1921,11 @@ MonodroidRuntime::load_assembly (MonoDomain *domain, jstring_wrapper &assembly) } const char *assm_name = assembly.get_cstr (); + if (XA_UNLIKELY (assm_name == nullptr)) { + log_warn (LOG_ASSEMBLY, "Unable to load assembly into AppDomain, name is null"); + return; + } + MonoAssemblyName *aname = mono_assembly_name_new (assm_name); #ifndef ANDROID @@ -1979,6 +1997,10 @@ MonodroidRuntime::create_and_initialize_domain (JNIEnv* env, jclass runtimeClass bool force_preload_assemblies, bool have_split_apks) { MonoDomain* domain = create_domain (env, runtimeApks, is_root_domain, have_split_apks); +#if defined (ANDROID) + // Asserting this on desktop apparently breaks a Designer test + abort_unless (domain != nullptr, "Failed to create AppDomain"); +#endif // When running on desktop, the root domain is only a dummy so don't initialize it if constexpr (is_running_on_desktop) { @@ -1996,7 +2018,7 @@ MonodroidRuntime::create_and_initialize_domain (JNIEnv* env, jclass runtimeClass #endif // def NET #ifndef ANDROID - if (assembliesBytes != nullptr) + if (assembliesBytes != nullptr && domain != nullptr) designerAssemblies.add_or_update_from_java (domain, env, assemblies, assembliesBytes, assembliesPaths); #endif bool preload = (androidSystem.is_assembly_preload_enabled () || (is_running_on_desktop && force_preload_assemblies)); From 6cd0d38989178e1c3e5e1d71505b4aef26a1739b Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 15 Feb 2023 11:16:33 -0600 Subject: [PATCH 03/12] Bump to dotnet/installer/main@d25a3bb 8.0.100-preview.2.23105.6 (#7769) Changes: https://github.com/dotnet/installer/compare/dec1209...d25a3bb Updates: Microsoft.Dotnet.Sdk.Internal: from 8.0.100-alpha.1.23080.11 to 8.0.100-preview.2.23105.6 Other changes: * Manually fix up Maestro dependency names Renamed: Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100-alpha.1 To be `preview.2`: Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100-preview.2 Then got the latest build number here: https://maestro-prod.westus2.cloudapp.azure.com/3074/https:%2F%2Fgithub.com%2Fdotnet%2Finstaller/latest/graph Lastly, I ran this using the build number: darc update-dependencies --id 165885 Co-authored-by: Jonathan Peppers --- eng/Version.Details.xml | 18 +++++++++--------- eng/Versions.props | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 33b4096ba6d..0533ad38c2d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,20 +1,20 @@ - + https://github.com/dotnet/installer - dec120944450abb58bc07a2fcdae2f4383bfd6bf + f05478ba9a4026e95306d3f8de59c70cfc0e60ce - - https://github.com/dotnet/linker - c790896f128957acd2999208f44f09ae1e826c8c + + https://github.com/dotnet/runtime + fe4760cf04dee615948848955978e6d7430982a7 - + https://github.com/dotnet/runtime - 9529803ae29c2804880c6bd8ca710b8c037cb498 + fe4760cf04dee615948848955978e6d7430982a7 - + https://github.com/dotnet/emsdk - 0fe864fc71191ff4ee18e59ef0af2929ca367a11 + fd5a0d1b19bf0a96f6b4423150921542b0b9a90d diff --git a/eng/Versions.props b/eng/Versions.props index 926781e3a0a..febf67713f4 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.23107.13 + 8.0.0-preview.2.23106.6 + 8.0.0-preview.2.23106.6 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.23081.1 + $(MicrosoftNETWorkloadEmscriptenCurrentManifest80100preview2Version) 7.0.100-rc.1.22410.7 From c9ff96f6ee20428bb82ea70f92c74ace33b1d70a Mon Sep 17 00:00:00 2001 From: Dean Ellis Date: Wed, 15 Feb 2023 17:46:37 +0000 Subject: [PATCH 04/12] [Xamarin.Android.Build.Tasks] FileWrites&libraryprojectimports.cache (#7780) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On occasion we see the following error when building a Maui app: MyMauiApp/Platforms/Android/AndroidManifest.xml : error APT2260: resource style/Maui.SplashTheme (aka com.companyname.mymauiapp:style/Maui.SplashTheme) not found. Looking in detail at the build log we notice that *none* of the resources in the `$(IntermediateOutputPath)\lp` folder are being included in the call to `aapt2`. Looking further we see: Skipping target "_ResolveLibraryProjectImports" because all output files are up-to-date with respect to the input files. … Task "ReadLibraryProjectImportsCache" (TaskId:184) Task Parameter:CacheFile=obj/Debug/net7.0-android/libraryprojectimports.cache (TaskId:184) Task ReadLibraryProjectImportsCache (TaskId:184) CacheFile: obj/Debug/net7.0-android/libraryprojectimports.cache (TaskId:184) obj/Debug/net7.0-android/libraryprojectimports.cache does not exist. No Project Library Imports found (TaskId:184) Done executing task "ReadLibraryProjectImportsCache". (TaskId:184) In this case it seems that the `.cache` file which stores the list of resource directories was created, but was then deleted later on! A search of our build system shows that `libraryprojectimports.cache` was never added to the `@(FileWrites)` ItemGroup. As a result `libraryprojectimports.cache` gets deleted, but the `.stamp` file which controls `_ResolveLibraryProjectImports` is left in place. We end up in a situation where the target which generates the cache will *never* run again because its stamp file is present. Only a full Clean will fix this issue. Fix this situation by updating the `_ResolveLibraryProjectImports` target to add `libraryprojectimports.cache` to the `@(FileWrites)` group, which prevents MSBuild from (occasionally) deleting the file on [incremental clean][0]. [0]: https://github.com/xamarin/xamarin-android/blob/6cd0d38989178e1c3e5e1d71505b4aef26a1739b/Documentation/guides/MSBuildBestPractices.md#filewrites-and-incrementalclean --- .../Tests/Xamarin.Android.Build.Tests/IncrementalBuildTest.cs | 3 +++ .../Xamarin.Android.EmbeddedResource.targets | 4 ++++ 2 files changed, 7 insertions(+) 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 1c16ce4feb2..ae7e039c1a7 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 @@ -857,6 +857,7 @@ public void ResolveLibraryProjectImports ([Values (true, false)] bool useAapt2) b.BuildLogFile = "build2.log"; Assert.IsTrue (b.Build (proj), "second build should have succeeded."); + FileAssert.Exists (cacheFile); var actual = ReadCache (cacheFile); CollectionAssert.AreEqual (actual.Jars.Select (j => j.ItemSpec), expected.Jars.Select (j => j.ItemSpec)); @@ -871,6 +872,7 @@ public void ResolveLibraryProjectImports ([Values (true, false)] bool useAapt2) b.BuildLogFile = "build3.log"; Assert.IsTrue (b.Build (proj), "third build should have succeeded."); + FileAssert.Exists (cacheFile); actual = ReadCache (cacheFile); Assert.AreEqual (expected.Jars.Length + 1, actual.Jars.Length, $"{nameof (expected.Jars)} should have one more item"); @@ -885,6 +887,7 @@ public void ResolveLibraryProjectImports ([Values (true, false)] bool useAapt2) // Build with no changes, checking we are skipping targets appropriately b.BuildLogFile = "build4.log"; Assert.IsTrue (b.Build (proj), "fourth build should have succeeded."); + FileAssert.Exists (cacheFile); var targets = new List { "_UpdateAndroidResgen", "_CompileJava", diff --git a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.EmbeddedResource.targets b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.EmbeddedResource.targets index 8abf79f748b..0cc63a78e83 100644 --- a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.EmbeddedResource.targets +++ b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.EmbeddedResource.targets @@ -46,6 +46,10 @@ This file is used by all project types, including binding projects. OutputImportDirectory="$(_AndroidLibrayProjectIntermediatePath)" /> + + + From 6a310b8d4a58a40ceb4d5b5892b031bcd6bd63c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 Feb 2023 18:57:11 -0500 Subject: [PATCH 05/12] Bump to xamarin/Java.Interop/main@9e0a469 (#7797) Changes: https://github.com/xamarin/java.interop/compare/8a1ae5710ab00f7af3abbb3e7c45479f0d4cfeb5...9e0a4690adb71c04cd88a5b54bea3c3f8da73cc0 * xamarin/java.interop@9e0a4690: [generator] deep clone methods to avoid NREs (xamarin/java.interop#1080) * xamarin/java.interop@5fa7ac45: [java-source-utils] Fix lgtm java/path-injection-local (xamarin/java.interop#1079) * xamarin/java.interop@120d8a71: [generator] Add more [ObsoleteOSPlatform] to prevent CA1422 (xamarin/java.interop#1078) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- external/Java.Interop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/Java.Interop b/external/Java.Interop index 8a1ae5710ab..9e0a4690adb 160000 --- a/external/Java.Interop +++ b/external/Java.Interop @@ -1 +1 @@ -Subproject commit 8a1ae5710ab00f7af3abbb3e7c45479f0d4cfeb5 +Subproject commit 9e0a4690adb71c04cd88a5b54bea3c3f8da73cc0 From bec42eff7e99a6c93eaa7681d50def138bbf9115 Mon Sep 17 00:00:00 2001 From: Dean Ellis Date: Thu, 16 Feb 2023 14:39:57 +0000 Subject: [PATCH 06/12] [tests] `InstallAndroidDependenciesTest` can use `platform-tools` 34.0.0 (#7800) We are seeing the `InstallAndroidDependenciesTest` test fail allot recently. Looking at the logs we see the following warning. warning : Dependency `platform-tools` should have been installed but could not be resolved. You can attempt to install it with: /Users/dean/Documents/Sandbox/Xamarin/WI1714603/bin/TestRelease/temp/InstallAndroidDependenciesTest/android-sdk/cmdline-tools/7.0/lib/sdkmanager-classpath.jar --install "platform-tools" As a result `platform-tools` is not installed. This causes the `ResolveSdks` task to ignore the test sdk directory because `adb` is missing. So lets update the `AndroidSdkPlatformToolsVersion ` to use one that does work. --- .../Xamarin.Android.Build.Tests/AndroidDependenciesTests.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 37971f9a75f..a881d54de63 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 @@ -39,13 +39,13 @@ public void InstallAndroidDependenciesTest () Assert.IsTrue (b.Build (proj, parameters: new string [] { "AcceptAndroidSDKLicenses=true", "AndroidManifestType=GoogleV2", // Need GoogleV2 so we can install API-32 - "AndroidSdkPlatformToolsVersion=33.0.3", + "AndroidSdkPlatformToolsVersion=34.0.0", }), "InstallAndroidDependencies should have succeeded."); b.Target = defaultTarget; b.BuildLogFile = "build.log"; Assert.IsTrue (b.Build (proj, true), "build should have succeeded."); - Assert.IsTrue (b.LastBuildOutput.ContainsText ($"Output Property: _AndroidSdkDirectory={sdkPath}"), "_AndroidSdkDirectory was not set to new SDK path."); - Assert.IsTrue (b.LastBuildOutput.ContainsText ($"JavaPlatformJarPath={sdkPath}"), "JavaPlatformJarPath did not contain new SDK path."); + Assert.IsTrue (b.LastBuildOutput.ContainsText ($"Output Property: _AndroidSdkDirectory={sdkPath}"), $"_AndroidSdkDirectory was not set to new SDK path `{sdkPath}`."); + Assert.IsTrue (b.LastBuildOutput.ContainsText ($"JavaPlatformJarPath={sdkPath}"), $"JavaPlatformJarPath did not contain new SDK path `{sdkPath}`."); } } finally { Environment.SetEnvironmentVariable ("TEST_ANDROID_SDK_PATH", old); From 7ba7dd499b8e03c68838d33a008583ed51caad53 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Fri, 17 Feb 2023 11:03:29 -0600 Subject: [PATCH 07/12] [Microsoft.Android.Sdk.ILLink] target `net7.0` temporarily (#7803) Context: https://github.com/xamarin/xamarin-macios/pull/17560 Context: https://github.com/dotnet/runtime/issues/82241 On macOS, if you have both .NET 7 and .NET 8 Preview 1 installed, and you do: dotnet new android dotnet build -c Release You get a build error: Fatal error in IL Linker Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. File name: 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at Microsoft.Android.Sdk.ILLink.PreserveSubStepDispatcher..ctor() at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions) --- End of inner exception stack trace --- at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions) at Mono.Linker.Driver.AddCustomStep(Pipeline pipeline, String arg) at Mono.Linker.Driver.SetupContext(ILogger customLogger) at Mono.Linker.Driver.Run(ILogger customLogger) at Mono.Linker.Driver.Main(String[] args) This happens because the .NET 8 linker is actually trying to run against the .NET 7 runtime! It promptly blows up against `net8.0` linker steps. Trying [the same workaround as xamarin-macios][0], to build our linker steps for `net7.0`. [0]: https://github.com/xamarin/xamarin-macios/commit/c61e327b278ed310f3fb0a5ab24e6449066128e6 --- .../Microsoft.Android.Sdk.ILLink.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 aa8694c7a3c..81a86470d19 100644 --- a/src/Microsoft.Android.Sdk.ILLink/Microsoft.Android.Sdk.ILLink.csproj +++ b/src/Microsoft.Android.Sdk.ILLink/Microsoft.Android.Sdk.ILLink.csproj @@ -1,7 +1,7 @@  - $(DotNetTargetFramework) + $(DotNetStableTargetFramework) ILLINK false $(MicrosoftAndroidSdkOutDir) From 3a2e629349babf5b4e8d7d689f1a77d3954825fa Mon Sep 17 00:00:00 2001 From: Jonathan Pobst Date: Fri, 17 Feb 2023 11:08:50 -0600 Subject: [PATCH 08/12] [tests] Bump NUnit versions to latest (#7802) Context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=7343148&view=logs&j=ef53a832-6b9d-50db-0090-851acbb6bf0a&t=fba7f8c5-5b66-5210-3a07-28605b5a156a The tests on the **run MSBuildDeviceIntegration On Device - macOS-1 - One .NET** job are not running due to this error: Starting test execution, please wait... A total of 1 test files matched the specified pattern. Exception NUnit.VisualStudio.TestAdapter.NUnitEngine.DiscoveryException, Exception thrown executing tests in /Users/runner/work/1/s/xamarin-android/bin/TestRelease/MSBuildDeviceIntegration/net7.0/MSBuildDeviceIntegration.dll Not a TestFixture, SetUpFixture or TestSuite, but ParameterizedFixture at NUnit.VisualStudio.TestAdapter.NUnitEngine.DiscoveryConverter.ExtractTestFixtures(NUnitDiscoveryCanHaveTestFixture parent, XElement node) in D:\repos\NUnit\nunit3-vs-adapter\src\NUnitTestAdapter\NUnitEngine\DiscoveryConverter.cs:line 272 at NUnit.VisualStudio.TestAdapter.NUnitEngine.DiscoveryConverter.ExtractAllFixtures(NUnitDiscoveryTestSuite parent, XElement node) in D:\repos\NUnit\nunit3-vs-adapter\src\NUnitTestAdapter\NUnitEngine\DiscoveryConverter.cs:line 223 at NUnit.VisualStudio.TestAdapter.NUnitEngine.DiscoveryConverter.ExtractAllFixtures(NUnitDiscoveryTestSuite parent, XElement node) in D:\repos\NUnit\nunit3-vs-adapter\src\NUnitTestAdapter\NUnitEngine\DiscoveryConverter.cs:line 229 at NUnit.VisualStudio.TestAdapter.NUnitEngine.DiscoveryConverter.ExtractAllFixtures(NUnitDiscoveryTestSuite parent, XElement node) in D:\repos\NUnit\nunit3-vs-adapter\src\NUnitTestAdapter\NUnitEngine\DiscoveryConverter.cs:line 229 at NUnit.VisualStudio.TestAdapter.NUnitEngine.DiscoveryConverter.ExtractAllFixtures(NUnitDiscoveryTestSuite parent, XElement node) in D:\repos\NUnit\nunit3-vs-adapter\src\NUnitTestAdapter\NUnitEngine\DiscoveryConverter.cs:line 229 at NUnit.VisualStudio.TestAdapter.NUnitEngine.DiscoveryConverter.ConvertXml(NUnitResults discovery) in D:\repos\NUnit\nunit3-vs-adapter\src\NUnitTestAdapter\NUnitEngine\DiscoveryConverter.cs:line 179 at NUnit.VisualStudio.TestAdapter.NUnitEngine.DiscoveryConverter.Convert(NUnitResults discoveryResults, String assemblyPath) in D:\repos\NUnit\nunit3-vs-adapter\src\NUnitTestAdapter\NUnitEngine\DiscoveryConverter.cs:line 134 at NUnit.VisualStudio.TestAdapter.NUnit3TestExecutor.RunAssembly(String assemblyPath, IGrouping`2 testCases, TestFilter filter) in D:\repos\NUnit\nunit3-vs-adapter\src\NUnitTestAdapter\NUnit3TestExecutor.cs:line 279 No test matches the given testcase filter `TestCategory = Node-1 & TestCategory != TimeZoneInfo & TestCategory != Localization & TestCategory != DotNetIgnore & TestCategory != HybridAOT & TestCategory != MkBundle & TestCategory != MonoSymbolicate & TestCategory != PackagesConfig & TestCategory != S...` in /Users/runner/work/1/s/xamarin-android/bin/TestRelease/MSBuildDeviceIntegration/net7.0/MSBuildDeviceIntegration.dll Results File: /Users/runner/work/1/s/xamarin-android/TestResult-MSBuildDeviceIntegration-mac_dotnetdevice_tests_1-Release.xml This is fixed in []`NUnit3TestAdapter` version `4.1`][0]. Update NUnit to latest versions to fix, which results in: Passed! - Failed: 0, Passed: 60, Skipped: 0, Total: 60, Duration: 52 m 32 s - MSBuildDeviceIntegration.dll (net7.0) Finishing: run MSBuildDeviceIntegration On Device - macOS-1 - One .NET [0}: https://github.com/nunit/nunit3-vs-adapter/discussions/867#discussioncomment-1709528 --- build-tools/scripts/NUnitReferences.projitems | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-tools/scripts/NUnitReferences.projitems b/build-tools/scripts/NUnitReferences.projitems index cd6842ec7c8..38c6801b999 100644 --- a/build-tools/scripts/NUnitReferences.projitems +++ b/build-tools/scripts/NUnitReferences.projitems @@ -1,9 +1,9 @@ - + - + From fc34ead13ca897948601644fcb5758afca807707 Mon Sep 17 00:00:00 2001 From: Jonathan Pobst Date: Tue, 21 Feb 2023 08:41:26 -0600 Subject: [PATCH 09/12] [MSBuildDeviceIntegration] Fix duplicated test parameter (#7809) The following test case is duplicated in `MSBuildDeviceIntegration.XASdkDeployTests (...)`: new object[] { /* isRelease */ true, /* xamarinForms */ false, /* targetFramework*/ "net8.0-android", }, This was likely a c/p error and the correct `targetFramework` is `net7.0-android`. --- tests/MSBuildDeviceIntegration/Tests/XASdkDeployTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/MSBuildDeviceIntegration/Tests/XASdkDeployTests.cs b/tests/MSBuildDeviceIntegration/Tests/XASdkDeployTests.cs index 68eb6d66170..2a706f1ee58 100644 --- a/tests/MSBuildDeviceIntegration/Tests/XASdkDeployTests.cs +++ b/tests/MSBuildDeviceIntegration/Tests/XASdkDeployTests.cs @@ -43,7 +43,7 @@ public class XASdkDeployTests : DeviceTest new object[] { /* isRelease */ true, /* xamarinForms */ false, - /* targetFramework*/ "net8.0-android", + /* targetFramework*/ "net7.0-android", }, new object[] { /* isRelease */ false, From 37a1758dd622a8ffc8aa1a53bedb7f5cfbe78a0d Mon Sep 17 00:00:00 2001 From: Dean Ellis Date: Tue, 21 Feb 2023 19:16:00 +0000 Subject: [PATCH 10/12] [Xamarin.Android.Build.Tasks] Improve aapt2+file not found handling (#7644) Context: https://github.com/xamarin/xamarin-android/issues/7639 If a project has a long path name, this can cause `aapt2` to fail: error APT2000: The system cannot find the file specified. (2). This is not very helpful since there is no obvious reason to the user as to *why* the build is failing. We should do better. We *can* do better. Catch this specific error message and report a helpful, actionable message instead. error APT2264: 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. In this case we will advise the user that the path is probably too long and they should consult the documentation on how to resolve it. The documentation includes a number of options for resolutions, so it should cover all use cases. Generally these are: 1. Move the project closer to the root of the drive. 2. Enable long path support in windows. 3. Make changes to the `$(BaseIntermediateOutputPath)` MSBuild property to move only the `obj` folder closer to the drive root. Most users can get away with (1), though with Maui and Blazor based apps this might not solve the problem as the project itself might have a deep folder structure. Options (2) and (3) are available to cover those scenarios. --- Documentation/guides/messages/README.md | 1 + Documentation/guides/messages/apt2264.md | 58 +++++++++++++++++++ .../Properties/Resources.Designer.cs | 9 +++ .../Properties/Resources.resx | 4 ++ .../Tasks/Aapt2.cs | 22 ++++++- 5 files changed, 91 insertions(+), 3 deletions(-) create mode 100644 Documentation/guides/messages/apt2264.md diff --git a/Documentation/guides/messages/README.md b/Documentation/guides/messages/README.md index c31c84e89dc..c32d917a755 100644 --- a/Documentation/guides/messages/README.md +++ b/Documentation/guides/messages/README.md @@ -30,6 +30,7 @@ ms.date: 01/24/2020 + APT0002: Invalid file name: It must contain only \[^a-zA-Z0-9_.-\]+. + APT0003: Invalid file name: It must contain only \[^a-zA-Z0-9_.\]+. + APT0004: Invalid file name: It must start with either A-Z or a-z or an underscore. ++ [APT2264](apt2264.md): The system cannot find the file specified. (2). ## JAVAxxxx: Java Tool diff --git a/Documentation/guides/messages/apt2264.md b/Documentation/guides/messages/apt2264.md new file mode 100644 index 00000000000..d058a29a74f --- /dev/null +++ b/Documentation/guides/messages/apt2264.md @@ -0,0 +1,58 @@ +--- +title: Xamarin.Android error APT2264 +description: APT2264 error code +ms.date: 12/16/2022 +--- +# Xamarin.Android error APT2264 + +## Issue + +The tool `aapt2` is unable to resolve one of the files it was passed. +This is generally caused by the path being longer than the Maximum Path +length allowed on windows. + +## Solution + +The best way to avoid this is to ensure that your project is not located +deep in the folder structure. For example if you create all of your +projects in folders such as + +`C:\Users\shelly\Visual Studio\Android\MyProjects\Com.SomeReallyLongCompanyName.MyBrillantApplication\MyBrilliantApplicaiton.Android\` + +you may well encounter problems with not only `aapt2` but also Ahead of Time +compilation. Keeping your project names and folder structures short and +concise will help work around these issues. For example instead of the above +you could use + +`C:\Work\Android\MyBrilliantApp` + +Which is much shorter and much less likely to encounter path issues. + +However this is no always possible. Sometimes a project or a environment requires +deep folder structures. In this case enabling long path support in Windows *might* +be enough to get your project working. Details on how to do this can be found +[here](https://learn.microsoft.com/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#enable-long-paths-in-windows-10-version-1607-and-later). + + +If long path support does not work changing the location of the +`$(BaseIntermediateOutputPath)` can help solve these problems. In order for this +to work the setting MUST be changed before ANY build or restore occurs. To do this +you can make use of the MSBuild `Directory.Build.props` support. + +Creating a `Directory.Build.props` file in your solution or project directory which +redefines the `$(BaseIntermediateOutputPath)` to somewhere nearer the root of the drive +with solve these issues. Adding a file with the following contents will create the `obj` +directory in a different location of your choosing. + +``` + + + C:\Intermediate\$(ProjectName) + /tmp/Intermediate/$(ProjectName) + + + /// Looks up a localized string similar to This is probably caused by the project exceeding the Max Path length. Please move your entire project closer to the Root of the drive.. + /// + public static string APT2264 { + get { + return ResourceManager.GetString("APT2264", resourceCulture); + } + } + /// /// Looks up a localized string similar to Could not AOT the assembly: {0}. /// diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx index c36b272704b..f78a40c1314 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx @@ -530,6 +530,10 @@ Please change the value to an assembly-qualifed type name which inherits from '{ The following are literal names and should not be translated: Java.Interop.DoNotPackageAttribute {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. + The following are literal names and should not be translated: + Could not AOT the assembly: {0} The abbreviation "AOT" should not be translated. diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/Aapt2.cs b/src/Xamarin.Android.Build.Tasks/Tasks/Aapt2.cs index 961005e362a..193a72e630f 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/Aapt2.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/Aapt2.cs @@ -188,23 +188,38 @@ protected bool LogAapt2EventsFromOutput (string singleLine, MessageImportance me message = message.Substring ("error: ".Length); if (level.Contains ("error") || (line != 0 && !string.IsNullOrEmpty (file))) { + var errorCode = GetErrorCode (message); if (manifestError) - LogCodedError (GetErrorCode (message), string.Format (Xamarin.Android.Tasks.Properties.Resources.AAPTManifestError, message.TrimEnd('.')), AndroidManifestFile.ItemSpec, 0); + LogCodedError (errorCode, string.Format (Xamarin.Android.Tasks.Properties.Resources.AAPTManifestError, message.TrimEnd('.')), AndroidManifestFile.ItemSpec, 0); else - LogCodedError (GetErrorCode (message), message, file, line); + LogCodedError (errorCode, AddAdditionalErrorText (errorCode, message), file, line); return true; } } if (!apptResult) { var message = string.Format ("{0} \"{1}\".", singleLine.Trim (), singleLine.Substring (singleLine.LastIndexOfAny (new char [] { '\\', '/' }) + 1)); - LogCodedError (GetErrorCode (message), message, ToolName); + var errorCode = GetErrorCode (message); + LogCodedError (errorCode, AddAdditionalErrorText (errorCode, message), ToolName); } else { LogCodedWarning (GetErrorCode (singleLine), singleLine); } return true; } + static string AddAdditionalErrorText (string errorCode, string message) + { + var sb = new StringBuilder (); + sb.AppendLine (message); + switch (errorCode) + { + case "APT2264": + sb.AppendLine (Xamarin.Android.Tasks.Properties.Resources.APT2264); + break; + } + return sb.ToString (); + } + static string GetErrorCode (string message) { foreach (var tuple in error_codes) @@ -478,6 +493,7 @@ static string GetErrorCode (string message) Tuple.Create ("APT2261", "file failed to compile"), Tuple.Create ("APT2262", "unexpected element found in "), Tuple.Create ("APT2263", "found in "), // unexpected element found in + Tuple.Create ("APT2264", "The system cannot find the file specified. (2).") // Windows Long Path error from aapt2 }; } } From 618bd4abaefa40e9e8d263d493094af1711dacd0 Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Tue, 21 Feb 2023 19:48:29 -0500 Subject: [PATCH 11/12] [build] Only build the latest API level (#7786) Heads-up: xamarin-android/main is *becoming* .NET Android-only; Classic Xamarin.Android is only supported [through 2024-May-1][0]; all current and future feature work is oriented toward .NET Android. Classic Xamarin.Android will only be fully buildable/supportable on the [d17-5 release branch][1]. Update the Classic Xamarin.Android build *on the main branch* to only build and package `$(AndroidLatestStableFrameworkVersion)` (v13.0/API-33) *not* `$(AndroidFirstApiLevel)` (v4.4/API-19) *through* API-33. Build timing from main: make jenkins 219.78s user 62.79s system 21% cpu 21:56.92 total Build timing from the branch for PR #7786: make jenkins 178.66s user 47.24s system 36% cpu 10:22.81 total It looks like this will shave off about 10 minutes from the Linux build and 10-15 minutes from the macOS build in CI as well. This does not (yet!) remove building the Classic Xamarin.Android installers entirely from main; instead, the installers will only include bindings for Android v13.0 (API-33). This seems like a good incremental step towards obsoletion. The Designer integration tests have been removed as they rely on API-30 or lower. Additionally, the Designer integration tests *require* the Classic Xamarin.Android runtime, which is not long for this world/ The Android Wear test job has been moved to the emulator test stage rather than running in its own stage. TODO: Multiple API levels are still used in the following projects, and could be cleaned up in the future: * build-tools/api-merge * build-tools/create-android-api [0]: https://dotnet.microsoft.com/en-us/platform/support/policy/xamarin [1]: https://github.com/xamarin/xamarin-android/commits/d17-5 --- Configuration.props | 5 - Documentation/building/configuration.md | 5 - build-tools/api-xml-adjuster/Makefile | 2 +- build-tools/automation/azure-pipelines.yaml | 176 ------------------ .../installers/create-installers.targets | 1 - .../ConfigAndData/BuildAndroidPlatforms.cs | 28 +-- 6 files changed, 15 insertions(+), 202 deletions(-) diff --git a/Configuration.props b/Configuration.props index 1463c7b8184..447a8fda27f 100644 --- a/Configuration.props +++ b/Configuration.props @@ -21,14 +21,9 @@ <_StandardLibraryPath Condition=" '$(TargetFrameworkVersion)' == '' ">$([Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToStandardLibraries('.NETFramework', 'v4.7.2', '')) v4.7.2 v4.7.1 - - - v4.4 - 19 26 21 - $(AndroidFirstApiLevel) 33 $(AndroidLatestStableApiLevel) diff --git a/Documentation/building/configuration.md b/Documentation/building/configuration.md index 3325276f929..630e27407d0 100644 --- a/Documentation/building/configuration.md +++ b/Documentation/building/configuration.md @@ -27,11 +27,6 @@ Overridable MSBuild properties include: This is an integer value, e.g. `15` for [API-15 (Android 4.0.3)](http://developer.android.com/about/versions/android-4.0.3.html). - * `$(AndroidFirstFrameworkVersion)`: The first `$(TargetFrameworkVersion)` - which will be built by `make jenkins` and included in the installer. - Currently `v4.4`. - This controls what is included in `build-tools/create-vsix` packages. - * `$(AndroidFrameworkVersion)`: The Xamarin.Android `$(TargetFrameworkVersion)` version which corresponds to `$(AndroidApiLevel)`. This is *usually* the Android version number with a leading `v`, e.g. `v4.0.3` for API-15. diff --git a/build-tools/api-xml-adjuster/Makefile b/build-tools/api-xml-adjuster/Makefile index 88b632a73f5..ed4b8897ab3 100644 --- a/build-tools/api-xml-adjuster/Makefile +++ b/build-tools/api-xml-adjuster/Makefile @@ -17,7 +17,7 @@ API_XML_TOOL = $(BUILDBIN)/api-xml-adjuster.exe RUNTIME = mono --debug RUN_CLASS_PARSE = $(RUNTIME) $(CLASS_PARSE) RUN_API_XML_TOOL = $(RUNTIME) $(API_XML_TOOL) -API_LEVELS = 10 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 +API_LEVELS = 33 XML_OUTPUT_DIR = . diff --git a/build-tools/automation/azure-pipelines.yaml b/build-tools/automation/azure-pipelines.yaml index acbac80bda7..2e060009042 100644 --- a/build-tools/automation/azure-pipelines.yaml +++ b/build-tools/automation/azure-pipelines.yaml @@ -30,11 +30,6 @@ resources: name: xamarin/release-scripts ref: refs/heads/sign-and-notarized endpoint: xamarin - - repository: uitools - type: github - name: xamarin/UITools - ref: refs/heads/main - endpoint: xamarin parameters: - name: provisionatorChannel @@ -697,11 +692,6 @@ stages: target_framework: $(DotNetStableTargetFramework) provisionatorChannel: ${{ parameters.provisionatorChannel }} -- stage: wear_tests - displayName: WearOS 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: - job: wear_tests displayName: macOS > Tests > WearOS timeoutInMinutes: 180 @@ -771,172 +761,6 @@ stages: - template: yaml-templates/fail-on-issue.yaml - -- stage: designer_tests - displayName: Designer Tests - dependsOn: mac_build - condition: and(succeeded(), or(eq(variables['RunAllTests'], true), contains(dependencies.mac_build.outputs['mac_build_create_installers.TestConditions.TestAreas'], 'Designer'))) - jobs: - # Check - "Xamarin.Android (macOS > Tests > Designer Integration)" - - job: designer_integration_mac - condition: false #TODO: Enable once test issues are fixed. - displayName: macOS > Tests > Designer Integration - pool: - vmImage: $(HostedMacImage) - timeoutInMinutes: 120 - cancelTimeoutInMinutes: 5 - workspace: - clean: all - variables: - EnableRegressionTest: true - steps: - - checkout: uitools - clean: true - submodules: recursive - path: s/UITools - persistCredentials: true - - - powershell: | - # Use the branch name of the source being built or the PR target branch name. Fall back to 'main' if the branch is unknown. - $branchPrefix = "/refs/heads/" - $branchName = "$(Build.SourceBranch)" -replace $branchPrefix, "" - if ("$(Build.Reason)" -eq "PullRequest") { - $branchName = "$(System.PullRequest.TargetBranch)" -replace $branchPrefix, "" - } - if (("$branchName" -ne "main") -and ("$branchName" -notlike "d1*")) { - $branchName = "main" - } - Set-Location -Path $(System.DefaultWorkingDirectory)/UITools - git checkout $branchName - git submodule update -q --init --recursive - displayName: Clone and update UITools - - - task: NuGetAuthenticate@0 - displayName: authenticate with azure artifacts - inputs: - forceReinstallCredentialProvider: true - - - task: provisionator@2 - displayName: provision designer dependencies - inputs: - github_token: $(GitHub.Token) - provisioning_script: $(System.DefaultWorkingDirectory)/UITools/src/bot-provisioning/dependencies.csx - provisioning_extra_args: -remove Xamarin.Android -vv DEVDIV_PKGS_NUGET_TOKEN=$(DevDiv.NuGet.Token) SECTOOLS_PKGS_NUGET_TOKEN=$(SecTools.NuGet.Token) - env: - PROVISIONATOR_CHANNEL: ${{ parameters.provisionatorChannel }} - - - template: yaml-templates/setup-test-environment.yaml - parameters: - xaSourcePath: $(System.DefaultWorkingDirectory)/xamarin-android - jdkTestFolder: $(JAVA_HOME_8_X64) - provisionatorChannel: ${{ parameters.provisionatorChannel }} - - - template: designer/android-designer-build-mac.yaml@yaml-templates - parameters: - designerSourcePath: $(System.DefaultWorkingDirectory)/UITools/src - - - template: designer/android-designer-tests.yaml@yaml-templates - parameters: - designerSourcePath: $(System.DefaultWorkingDirectory)/UITools/src - runAddinTests: false - - - task: CopyFiles@2 - displayName: 'Copy binlogs' - inputs: - sourceFolder: $(System.DefaultWorkingDirectory)/UITools/src/Xamarin.Designer.Android - contents: '**/*.binlog' - targetFolder: $(Build.ArtifactStagingDirectory)/designer-binlogs - overWrite: true - flattenFolders: true - condition: ne(variables['Agent.JobStatus'], 'Succeeded') - - - template: yaml-templates/publish-artifact.yaml - parameters: - displayName: upload designer binlogs - artifactName: Test Results - Designer - macOS - targetPath: $(Build.ArtifactStagingDirectory)/designer-binlogs - condition: ne(variables['Agent.JobStatus'], 'Succeeded') - - # Check - "Xamarin.Android (Windows > Tests > Designer Integration)" - - job: designer_integration_win - displayName: Windows > Tests > Designer Integration - pool: - vmImage: $(HostedWinImage) - timeoutInMinutes: 120 - cancelTimeoutInMinutes: 5 - workspace: - clean: all - variables: - EnableRegressionTest: true - RegressionTestSuiteOutputDir: C:\Git\ADesRegTestSuite - VisualStudioInstallationPath: C:\Program Files\Microsoft Visual Studio\2022\Enterprise - steps: - - checkout: uitools - clean: true - submodules: recursive - path: s\UITools - persistCredentials: true - - - powershell: | - # Use the branch name of the source being built or the PR target branch name. Fall back to 'main' if the branch is unknown. - $branchPrefix = "/refs/heads/" - $branchName = "$(Build.SourceBranch)" -replace $branchPrefix, "" - if ("$(Build.Reason)" -eq "PullRequest") { - $branchName = "$(System.PullRequest.TargetBranch)" -replace $branchPrefix, "" - } - if (("$branchName" -ne "main") -and ("$branchName" -notlike "d1*")) { - $branchName = "main" - } - Set-Location -Path $(System.DefaultWorkingDirectory)\UITools - git checkout $branchName - git submodule update -q --init --recursive - displayName: Clone and update UITools - - - task: NuGetAuthenticate@0 - displayName: authenticate with azure artifacts - inputs: - forceReinstallCredentialProvider: true - - - task: provisionator@2 - displayName: provision designer dependencies - inputs: - github_token: $(GitHub.Token) - provisioning_script: $(System.DefaultWorkingDirectory)\UITools\src\bot-provisioning\dependencies.csx - provisioning_extra_args: -vv DEVDIV_PKGS_NUGET_TOKEN=$(DevDiv.NuGet.Token) SECTOOLS_PKGS_NUGET_TOKEN=$(SecTools.NuGet.Token) - env: - PROVISIONATOR_CHANNEL: ${{ parameters.provisionatorChannel }} - - - template: yaml-templates\setup-test-environment.yaml - parameters: - xaSourcePath: $(System.DefaultWorkingDirectory)\xamarin-android - jdkTestFolder: $(JAVA_HOME_8_X64) - provisionatorChannel: ${{ parameters.provisionatorChannel }} - - - task: VSBuild@1 - displayName: Restore Xamarin.AndroidDesigner - inputs: - solution: $(System.DefaultWorkingDirectory)\UITools\src\Xamarin.Designer.Android\Xamarin.AndroidDesigner.sln - vsVersion: 17.0 - msbuildArgs: >- - /t:Restore /p:RestoreDisableParallel=true - /p:RestoreConfigFile="$(System.DefaultWorkingDirectory)\UITools\NuGet.Config" - /p:JavaSdkDirectory="$(JAVA_HOME_8_X64)" - platform: Any CPU - configuration: DebugWin32 - - - task: VSBuild@1 - displayName: Build Xamarin.AndroidDesigner - inputs: - solution: $(System.DefaultWorkingDirectory)\UITools\src\Xamarin.Designer.Android\Xamarin.AndroidDesigner.sln - vsVersion: 17.0 - msbuildArgs: /t:Build /p:GitHubToken=$(GitHub.Token) - platform: Any CPU - configuration: DebugWin32 - - - template: yaml-templates/run-designer-tests.yml - parameters: - designerSourcePath: $(System.DefaultWorkingDirectory)\UITools\src - - stage: bcl_tests displayName: BCL Emulator Tests dependsOn: mac_build diff --git a/build-tools/installers/create-installers.targets b/build-tools/installers/create-installers.targets index 3e589147ceb..d8880a6ab2f 100644 --- a/build-tools/installers/create-installers.targets +++ b/build-tools/installers/create-installers.targets @@ -14,7 +14,6 @@ $(XAInstallPrefix)xbuild\Xamarin\Android\ $(XamarinAndroidSourcePath)src\Xamarin.Android.Build.Tasks\MSBuild\Xamarin\Android $(MSBuildThisFileDirectory)\..\create-pkg\runtime-entitlements.plist - $(AndroidFirstFrameworkVersion) $(AndroidLatestStableFrameworkVersion) v1.0 dylib diff --git a/build-tools/xaprepare/xaprepare/ConfigAndData/BuildAndroidPlatforms.cs b/build-tools/xaprepare/xaprepare/ConfigAndData/BuildAndroidPlatforms.cs index 0dbf3ca9f74..4604aea5292 100644 --- a/build-tools/xaprepare/xaprepare/ConfigAndData/BuildAndroidPlatforms.cs +++ b/build-tools/xaprepare/xaprepare/ConfigAndData/BuildAndroidPlatforms.cs @@ -29,20 +29,20 @@ class BuildAndroidPlatforms new AndroidPlatform (apiName: "Jelly Bean", apiLevel: 16, platformID: "16", include: "v4.1"), new AndroidPlatform (apiName: "Jelly Bean", apiLevel: 17, platformID: "17", include: "v4.2"), new AndroidPlatform (apiName: "Jelly Bean", apiLevel: 18, platformID: "18", include: "v4.3"), - new AndroidPlatform (apiName: "Kit Kat", apiLevel: 19, platformID: "19", include: "v4.4", framework: "v4.4"), - new AndroidPlatform (apiName: "Kit Kat + Wear support", apiLevel: 20, platformID: "20", include: "v4.4.87", framework: "v4.4.87"), - new AndroidPlatform (apiName: "Lollipop", apiLevel: 21, platformID: "21", include: "v5.0", framework: "v5.0"), - new AndroidPlatform (apiName: "Lollipop", apiLevel: 22, platformID: "22", include: "v5.1", framework: "v5.1"), - new AndroidPlatform (apiName: "Marshmallow", apiLevel: 23, platformID: "23", include: "v6.0", framework: "v6.0"), - new AndroidPlatform (apiName: "Nougat", apiLevel: 24, platformID: "24", include: "v7.0", framework: "v7.0"), - new AndroidPlatform (apiName: "Nougat", apiLevel: 25, platformID: "25", include: "v7.1", framework: "v7.1"), - new AndroidPlatform (apiName: "Oreo", apiLevel: 26, platformID: "26", include: "v8.0", framework: "v8.0"), - new AndroidPlatform (apiName: "Oreo", apiLevel: 27, platformID: "27", include: "v8.1", framework: "v8.1"), - new AndroidPlatform (apiName: "Pie", apiLevel: 28, platformID: "28", include: "v9.0", framework: "v9.0"), - new AndroidPlatform (apiName: "Q", apiLevel: 29, platformID: "29", include: "v10.0", framework: "v10.0"), - new AndroidPlatform (apiName: "R", apiLevel: 30, platformID: "30", include: "v11.0", framework: "v11.0"), - new AndroidPlatform (apiName: "S", apiLevel: 31, platformID: "31", include: "v12.0", framework: "v12.0"), - new AndroidPlatform (apiName: "Sv2", apiLevel: 32, platformID: "32", include: "v12.1", framework: "v12.1"), + new AndroidPlatform (apiName: "Kit Kat", apiLevel: 19, platformID: "19", include: "v4.4"), + new AndroidPlatform (apiName: "Kit Kat + Wear support", apiLevel: 20, platformID: "20", include: "v4.4.87"), + new AndroidPlatform (apiName: "Lollipop", apiLevel: 21, platformID: "21", include: "v5.0"), + new AndroidPlatform (apiName: "Lollipop", apiLevel: 22, platformID: "22", include: "v5.1"), + new AndroidPlatform (apiName: "Marshmallow", apiLevel: 23, platformID: "23", include: "v6.0"), + new AndroidPlatform (apiName: "Nougat", apiLevel: 24, platformID: "24", include: "v7.0"), + new AndroidPlatform (apiName: "Nougat", apiLevel: 25, platformID: "25", include: "v7.1"), + new AndroidPlatform (apiName: "Oreo", apiLevel: 26, platformID: "26", include: "v8.0"), + new AndroidPlatform (apiName: "Oreo", apiLevel: 27, platformID: "27", include: "v8.1"), + new AndroidPlatform (apiName: "Pie", apiLevel: 28, platformID: "28", include: "v9.0"), + new AndroidPlatform (apiName: "Q", apiLevel: 29, platformID: "29", include: "v10.0"), + new AndroidPlatform (apiName: "R", apiLevel: 30, platformID: "30", include: "v11.0"), + new AndroidPlatform (apiName: "S", apiLevel: 31, platformID: "31", include: "v12.0"), + new AndroidPlatform (apiName: "Sv2", apiLevel: 32, platformID: "32", include: "v12.1"), new AndroidPlatform (apiName: "Tiramisu", apiLevel: 33, platformID: "33", include: "v13.0", framework: "v13.0"), }; From 41748e1d3eae619ba73a9bb4f4f9337d8b9c5b9e Mon Sep 17 00:00:00 2001 From: Dean Ellis Date: Wed, 22 Feb 2023 13:17:04 +0000 Subject: [PATCH 12/12] Add Unit Test for testOnly apps (#7637) Fixes: https://github.com/dotnet/maui/issues/11345 For context users can mark their package as "testOnly" in the `AndroidManifest.xml`. When they do this `adb` also needs an additonal flag to install the package. PR https://github.com/xamarin/monodroid/pull/1279 adds the ability to pass this additional flag to `adb`. This PR adds the ability to read the flag from the `AndroidManifest.xml`, so it can be used by other tasks. A unit test has also been added to the Device tests to make sure we can install `testOnly` packages. --- .../Tasks/ReadAndroidManifest.cs | 8 ++++++++ .../Xamarin.Android.Common.targets | 1 + .../MSBuildDeviceIntegration/Tests/InstallAndRunTests.cs | 4 +++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/ReadAndroidManifest.cs b/src/Xamarin.Android.Build.Tasks/Tasks/ReadAndroidManifest.cs index 612fea6a844..c8143247d22 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/ReadAndroidManifest.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/ReadAndroidManifest.cs @@ -35,6 +35,9 @@ public class ReadAndroidManifest : AndroidTask [Output] public bool UseEmbeddedDex { get; set; } = false; + [Output] + public bool IsTestOnly { get; set; } = false; + public override bool RunTask () { var androidNs = AndroidAppManifest.AndroidXNamespace; @@ -52,6 +55,11 @@ public override bool RunTask () UseEmbeddedDex = value; } + text = app.Attribute (androidNs + "testOnly")?.Value; + if (bool.TryParse (text, out value)) { + IsTestOnly = value; + } + var libraries = new List (); foreach (var uses_library in app.Elements ("uses-library")) { var attribute = uses_library.Attribute (androidNs + "name"); diff --git a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets index 8606402f9f1..060d670a696 100644 --- a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets +++ b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets @@ -1641,6 +1641,7 @@ because xbuild doesn't support framework reference assemblies. + .so;$(AndroidStoreUncompressedFileExtensions) diff --git a/tests/MSBuildDeviceIntegration/Tests/InstallAndRunTests.cs b/tests/MSBuildDeviceIntegration/Tests/InstallAndRunTests.cs index 7f780147517..f1ab011b0ee 100644 --- a/tests/MSBuildDeviceIntegration/Tests/InstallAndRunTests.cs +++ b/tests/MSBuildDeviceIntegration/Tests/InstallAndRunTests.cs @@ -764,12 +764,14 @@ public void ResourceDesignerWithNuGetReference ([Values ("net8.0-android33.0")] } [Test] - public void SingleProject_ApplicationId () + public void SingleProject_ApplicationId ([Values (false, true)] bool testOnly) { AssertHasDevices (); proj = new XamarinAndroidApplicationProject (); proj.SetProperty ("ApplicationId", "com.i.should.get.overridden.by.the.manifest"); + if (testOnly) + proj.AndroidManifest = proj.AndroidManifest.Replace ("