From 1c3bdba364ce005b4ec25d5ab131efd921214c6b Mon Sep 17 00:00:00 2001 From: Guillaume Perrot Date: Wed, 14 Dec 2016 16:57:03 -0800 Subject: [PATCH] Test "Link All" in release for our forms apps --- .../Contoso.Forms.Demo.Droid.csproj | 2 +- .../Contoso.Forms.Demo/Contoso.Forms.Demo.csproj | 1 + .../ModulePages/AnalyticsContentPage.xaml.cs | 1 + .../ModulePages/CrashesContentPage.xaml.cs | 1 + .../ModulePages/MobileCenterContentPage.xaml.cs | 1 + .../Contoso.Forms.Demo/PreserveAttribute.cs | 8 ++++++++ .../Contoso.Forms.Puppet.Droid.csproj | 1 + .../Contoso.Forms.Puppet.iOS.csproj | 2 +- .../Contoso.Forms.Puppet/Constants.cs | 5 ++--- .../Contoso.Forms.Puppet/Contoso.Forms.Puppet.csproj | 1 + .../ModulePages/AnalyticsContentPage.xaml.cs | 1 + .../ModulePages/CrashesContentPage.xaml.cs | 1 + .../ModulePages/MobileCenterContentPage.xaml.cs | 1 + .../Contoso.Forms.Puppet/PreserveAttribute.cs | 8 ++++++++ 14 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/PreserveAttribute.cs create mode 100644 Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/PreserveAttribute.cs diff --git a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.Droid/Contoso.Forms.Demo.Droid.csproj b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.Droid/Contoso.Forms.Demo.Droid.csproj index f48818373..141f7a585 100644 --- a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.Droid/Contoso.Forms.Demo.Droid.csproj +++ b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.Droid/Contoso.Forms.Demo.Droid.csproj @@ -37,7 +37,7 @@ 4 true false - SdkOnly + Full armeabi-v7a;armeabi;x86;arm64-v8a;x86_64 diff --git a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/Contoso.Forms.Demo.csproj b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/Contoso.Forms.Demo.csproj index 3a870766c..2565fd0da 100644 --- a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/Contoso.Forms.Demo.csproj +++ b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/Contoso.Forms.Demo.csproj @@ -70,6 +70,7 @@ PropertiesContentPage.xaml + diff --git a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/AnalyticsContentPage.xaml.cs b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/AnalyticsContentPage.xaml.cs index abda4f04a..9c91964b8 100644 --- a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/AnalyticsContentPage.xaml.cs +++ b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/AnalyticsContentPage.xaml.cs @@ -17,6 +17,7 @@ public Property(string propertyName, string propertyValue) public string Value; } + [Android.Runtime.Preserve(AllMembers = true)] public partial class AnalyticsContentPage : ContentPage { List EventProperties; diff --git a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/CrashesContentPage.xaml.cs b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/CrashesContentPage.xaml.cs index 371959420..f4e491de4 100644 --- a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/CrashesContentPage.xaml.cs +++ b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/CrashesContentPage.xaml.cs @@ -8,6 +8,7 @@ namespace Contoso.Forms.Demo { + [Android.Runtime.Preserve(AllMembers = true)] public partial class CrashesContentPage { public CrashesContentPage() diff --git a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/MobileCenterContentPage.xaml.cs b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/MobileCenterContentPage.xaml.cs index d8848f568..88cc6ad41 100644 --- a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/MobileCenterContentPage.xaml.cs +++ b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/ModulePages/MobileCenterContentPage.xaml.cs @@ -3,6 +3,7 @@ namespace Contoso.Forms.Demo { + [Android.Runtime.Preserve(AllMembers = true)] public partial class MobileCenterContentPage : ContentPage { public MobileCenterContentPage() diff --git a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/PreserveAttribute.cs b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/PreserveAttribute.cs new file mode 100644 index 000000000..654727351 --- /dev/null +++ b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/PreserveAttribute.cs @@ -0,0 +1,8 @@ +namespace Android.Runtime +{ + public sealed class PreserveAttribute : System.Attribute + { + public bool AllMembers; + public bool Conditional; + } +} \ No newline at end of file diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Contoso.Forms.Puppet.Droid.csproj b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Contoso.Forms.Puppet.Droid.csproj index 8cf96901a..7398cb65a 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Contoso.Forms.Puppet.Droid.csproj +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Contoso.Forms.Puppet.Droid.csproj @@ -38,6 +38,7 @@ true false armeabi-v7a;armeabi;x86;arm64-v8a;x86_64 + Full diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/Contoso.Forms.Puppet.iOS.csproj b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/Contoso.Forms.Puppet.iOS.csproj index 5961d5b78..5abb0007c 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/Contoso.Forms.Puppet.iOS.csproj +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/Contoso.Forms.Puppet.iOS.csproj @@ -58,7 +58,7 @@ iPhone Developer true true - None + Full i386 HttpClientHandler Default diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Constants.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Constants.cs index 1c262c6f5..e1cea3d24 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Constants.cs +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Constants.cs @@ -1,7 +1,6 @@ -using System; - -namespace Contoso.Forms.Puppet +namespace Contoso.Forms.Puppet { + [Android.Runtime.Preserve(AllMembers = true)] public static class Constants { public const string Verbose = "Verbose"; diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Contoso.Forms.Puppet.csproj b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Contoso.Forms.Puppet.csproj index f77ccd1d3..051354748 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Contoso.Forms.Puppet.csproj +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Contoso.Forms.Puppet.csproj @@ -77,6 +77,7 @@ PropertiesContentPage.xaml + diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/AnalyticsContentPage.xaml.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/AnalyticsContentPage.xaml.cs index bd3a502a1..c2b8d4d62 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/AnalyticsContentPage.xaml.cs +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/AnalyticsContentPage.xaml.cs @@ -17,6 +17,7 @@ public Property(string propertyName, string propertyValue) public string Value; } + [Android.Runtime.Preserve(AllMembers = true)] public partial class AnalyticsContentPage : ContentPage { List EventProperties; diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/CrashesContentPage.xaml.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/CrashesContentPage.xaml.cs index 9be06a560..584b93b90 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/CrashesContentPage.xaml.cs +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/CrashesContentPage.xaml.cs @@ -6,6 +6,7 @@ namespace Contoso.Forms.Puppet { + [Android.Runtime.Preserve(AllMembers = true)] public partial class CrashesContentPage { public CrashesContentPage() diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/MobileCenterContentPage.xaml.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/MobileCenterContentPage.xaml.cs index 56acff5b7..de5beedf7 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/MobileCenterContentPage.xaml.cs +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/MobileCenterContentPage.xaml.cs @@ -6,6 +6,7 @@ namespace Contoso.Forms.Puppet { + [Android.Runtime.Preserve(AllMembers = true)] public partial class MobileCenterContentPage : ContentPage { // E.g., calling LogFunctions["Verbose"](tag, msg) will be diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/PreserveAttribute.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/PreserveAttribute.cs new file mode 100644 index 000000000..654727351 --- /dev/null +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/PreserveAttribute.cs @@ -0,0 +1,8 @@ +namespace Android.Runtime +{ + public sealed class PreserveAttribute : System.Attribute + { + public bool AllMembers; + public bool Conditional; + } +} \ No newline at end of file