Skip to content

Commit 395189c

Browse files
authored
[XABT] Make NRT opt-out instead of opt-in. (#10093)
Help ensure we do not unintentionally add any additional non-NRT aware code to `Xamarin.Android.Build.Tasks` by switching `$(Nullable)` from `annotation` to `enable`. This will subject any new files to NRT analysis by default unless they opt out with `#nullable disable`. To switch to this mode: - Add `#nullable disable` to any existing code files that have not been converted and currently have NRT warnings. (~200 files) - Remove `#nullable enable` from any existing code files that have already been converted. (~50 files)
1 parent d3d3584 commit 395189c

File tree

252 files changed

+415
-80
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

252 files changed

+415
-80
lines changed

src-ThirdParty/Mono.Security.Cryptography/CryptoConvert.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
// Original source can be found at
3030
// https://github.com/mono/mono/blob/e2c5f4b0ad1a6b21ca0735f0b35b8611d4ad87b3/mcs/class/Mono.Security/Mono.Security.Cryptography/CryptoConvert.cs#L4
3131

32+
#nullable disable
33+
3234
using System;
3335
using System.Security.Cryptography;
3436

src-ThirdParty/android-platform-tools-base/SymbolWriter.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#nullable disable
2+
13
using Microsoft.Build.Framework;
24
using System;
35
using System.Collections.Generic;

src/Mono.Android/Android.App/IntentFilterAttribute.Partial.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#nullable disable
2+
13
using System;
24

35
namespace Android.App;

src/Xamarin.Android.Build.Tasks/Linker/External/Linker.Steps/BaseStep.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2727
//
2828

29+
#nullable disable
30+
2931
using Mono.Cecil;
3032

3133
namespace Mono.Linker.Steps {

src/Xamarin.Android.Build.Tasks/Linker/External/Linker/Annotations.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2727
//
2828

29+
#nullable disable
30+
2931
using System;
3032
using System.Collections.Generic;
3133
using Mono.Cecil;

src/Xamarin.Android.Build.Tasks/Linker/External/Linker/AssemblyResolver.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2727
//
2828

29+
#nullable disable
30+
2931
using System;
3032
using System.Collections.Generic;
3133
using System.IO;

src/Xamarin.Android.Build.Tasks/Linker/External/Linker/BaseMarkHandler.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#nullable disable
2+
13
using Mono.Cecil;
24
using Mono.Linker.Steps;
35

src/Xamarin.Android.Build.Tasks/Linker/External/Linker/LinkContext.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2727
//
2828

29+
#nullable disable
30+
2931
using System;
3032
using System.Collections.Generic;
3133
using System.IO;

src/Xamarin.Android.Build.Tasks/Linker/External/Linker/OverrideInformation.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#nullable disable
2+
13
using System.Diagnostics;
24
using Mono.Cecil;
35

src/Xamarin.Android.Build.Tasks/Linker/External/Linker/Tracer.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2727
//
2828

29+
#nullable disable
30+
2931
using System;
3032
using System.Collections.Generic;
3133

0 commit comments

Comments
 (0)