forked from dotnet/android
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[One .NET] remove in-tree DynamicDependencyAttribute
Context: dotnet#5652 In earlier development of .NET 6, we had a copy of `DynamicDependencyAttribute` because we were compiling `Mono.Android.dll` for `netcoreapp3.1`. Now we are compiling for `net6.0`, so we can remove these files. We also can condition their usage behind `#if NET`, to mean ".NET 5 or higher", where the attributes were introduced. I also fixed the linker warning: src\Mono.Android\Android.Runtime\AndroidRuntime.cs(296,5): warning IL2026: Android.Runtime.AndroidTypeManager.CreateDynamicCallback(MethodInfo): Using method 'System.Reflection.Assembly.GetType(String)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. Types might be removed. By introducing: [DynamicDependency ("Create", "Java.Interop.DynamicCallbackCodeGenerator", "Mono.Android.Export")] However, we still need to suppress the warning: [UnconditionalSuppressMessage ("Trimming", "IL2026", Justification = "DynamicDependency should preserve the Create() method.")]
- Loading branch information
1 parent
1aac4a0
commit 941f4a6
Showing
7 changed files
with
14 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
130 changes: 0 additions & 130 deletions
130
...roid.NamingCustomAttributes/System.Diagnostics.CodeAnalysis/DynamicDependencyAttribute.cs
This file was deleted.
Oops, something went wrong.
90 changes: 0 additions & 90 deletions
90
....NamingCustomAttributes/System.Diagnostics.CodeAnalysis/DynamicallyAccessedMemberTypes.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters