Skip to content

Commit

Permalink
Merge pull request #1638 from microsoft/release/4.5.1
Browse files Browse the repository at this point in the history
Start new 4.5.1 version
  • Loading branch information
aleksandr-dorofeev authored Apr 12, 2022
2 parents 85e0cff + 78e4dc8 commit 58d1004
Show file tree
Hide file tree
Showing 143 changed files with 835 additions and 413 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
strategy:
fail-fast: false

# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
runs-on: macos-latest

steps:
Expand Down Expand Up @@ -44,10 +43,12 @@ jobs:
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

- run: |
echo "Run Externals-iOS"
./build.sh -target="Externals-iOS"

steps:
- name: Run the Cake script
uses: cake-build/cake-action@v1
with:
target: Externals-Apple

- run: |
echo "Build App Center For iOS"
Expand All @@ -64,8 +65,7 @@ jobs:
strategy:
fail-fast: false

# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
runs-on: windows-latest
runs-on: windows-2019

steps:
- name: Checkout repository
Expand Down
3 changes: 3 additions & 0 deletions Apps/Contoso.Android.Puppet/Contoso.Android.Puppet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@
<EnableProguard>true</EnableProguard>
<AndroidLinkTool>r8</AndroidLinkTool>
</PropertyGroup>
<PropertyGroup Condition=" '$(RunConfiguration)' == 'Default' ">
<Run>am start -e "XAMARIN_ANDROID_INT" "{XAMARIN_ANDROID_INT}" -n "com.microsoft.appcenter.xamarin.puppet/Contoso.Android.Puppet.MainActivity"</Run>
</PropertyGroup>
<ItemGroup>
<Reference Include="Mono.Android" />
<Reference Include="mscorlib" />
Expand Down
3 changes: 2 additions & 1 deletion Apps/Contoso.Android.Puppet/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ protected override void OnCreate(Bundle savedInstanceState)
}
Distribute.SetInstallUrl("https://install.portal-server-core-integration.dev.avalanch.es");
Distribute.SetApiUrl("https://asgard-int.trafficmanager.net/api/v0.1");
AppCenter.Start("bff0949b-7970-439d-9745-92cdc59b10fe", typeof(Analytics), typeof(Crashes), typeof(Distribute));
var appCenterSecret = Intent.GetStringExtra("XAMARIN_ANDROID_INT");
AppCenter.Start(appCenterSecret, typeof(Analytics), typeof(Crashes), typeof(Distribute));
AppCenter.IsEnabledAsync().ContinueWith(enabled =>
{
AppCenterLog.Info(LogTag, "AppCenter.Enabled=" + enabled.Result);
Expand Down
2 changes: 1 addition & 1 deletion Apps/Contoso.Android.Puppet/Properties/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.microsoft.appcenter.xamarin.puppet" android:versionCode="101" android:versionName="4.5.0-SNAPSHOT" android:installLocation="auto">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.microsoft.appcenter.xamarin.puppet" android:versionCode="103" android:versionName="4.5.1-SNAPSHOT" android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="30" />
<application android:label="SXPuppet" android:icon="@drawable/Icon" android:theme="@style/PuppetTheme">
</application>
Expand Down
4 changes: 2 additions & 2 deletions Apps/Contoso.Android.Puppet/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.0.0")]
[assembly: AssemblyFileVersion("4.5.0.0")]
[assembly: AssemblyInformationalVersion("4.5.0-SNAPSHOT")]
[assembly: AssemblyFileVersion("4.5.1.0")]
[assembly: AssemblyInformationalVersion("4.5.1-SNAPSHOT")]
Original file line number Diff line number Diff line change
Expand Up @@ -63,22 +63,25 @@
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
<AndroidSupportedAbis>armeabi-v7a;x86;arm64-v8a;x86_64</AndroidSupportedAbis>
</PropertyGroup>
<PropertyGroup Condition=" '$(RunConfiguration)' == 'Default' ">
<Run>am start -e "XAMARIN_FORMS_ANDROID_PROD" "{XAMARIN_FORMS_ANDROID_PROD}" -e "XAMARIN_FORMS_ANDROID_TARGET_TOKEN_PROD" "{XAMARIN_FORMS_ANDROID_TARGET_TOKEN_PROD}" -n "com.microsoft.appcenter.xamarin.forms.demo/Contoso.Forms.Demo.Droid.MainActivity"</Run>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Mono.Android" />
</ItemGroup>
<ItemGroup Condition=" '$(Configuration)'=='GooglePlay' ">
<PackageReference Include="Microsoft.AppCenter.DistributePlay" Version="4.5.0" />
<PackageReference Include="Microsoft.AppCenter.DistributePlay" Version="4.5.1" />
</ItemGroup>
<ItemGroup Condition=" '$(Configuration)'!='GooglePlay' ">
<PackageReference Include="Microsoft.AppCenter.Distribute" Version="4.5.0" />
<PackageReference Include="Microsoft.AppCenter.Distribute" Version="4.5.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AppCenter.Analytics" Version="4.5.0" />
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="4.5.0" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2083" />
<PackageReference Include="Microsoft.AppCenter.Analytics" Version="4.5.1" />
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="4.5.1" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2401" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
Expand Down
16 changes: 15 additions & 1 deletion Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.Droid/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,20 @@
namespace Contoso.Forms.Demo.Droid
{
[Activity(Label = "ACFDemo", Icon = "@drawable/icon", Theme = "@style/MyTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation, LaunchMode = LaunchMode.SingleTop)]
public class MainActivity : Xamarin.Forms.Platform.Android.FormsAppCompatActivity, IClearCrashClick
public class MainActivity : Xamarin.Forms.Platform.Android.FormsAppCompatActivity, IClearCrashClick, IAppConfiguration
{
public static readonly int FileAttachmentId = 1;

private const string CrashesUserConfirmationStorageKey = "com.microsoft.appcenter.crashes.always.send";
private static string AppCenterSecret;
private static string AppCenterTargetToken;

public TaskCompletionSource<string> FileAttachmentTaskCompletionSource { set; get; }

protected override void OnCreate(Bundle savedInstanceState)
{
AppCenterSecret = Intent.GetStringExtra("XAMARIN_FORMS_ANDROID_PROD");
AppCenterTargetToken = Intent.GetStringExtra("XAMARIN_FORMS_ANDROID_TARGET_TOKEN_PROD");
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;

Expand Down Expand Up @@ -57,6 +61,16 @@ public void ClearCrashButton()
ISharedPreferences appCenterPreferences = Android.App.Application.Context.GetSharedPreferences("AppCenter", FileCreationMode.Private);
appCenterPreferences.Edit().Remove(CrashesUserConfirmationStorageKey).Apply();
}

public string GetAppSecret()
{
return AppCenterSecret;
}

public string GetTargetToken()
{
return AppCenterTargetToken;
}
}

public class AndroidAnalyticsListener : Java.Lang.Object, IAnalyticsListener
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.microsoft.appcenter.xamarin.forms.demo" android:versionName="4.5.0" android:versionCode="92">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.microsoft.appcenter.xamarin.forms.demo" android:versionName="4.5.1" android:versionCode="93">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="30" />
<application android:label="ACFDemo">
</application>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
// and "{Major}.{Minor}.{Build}.*" will update just the revision.

[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("4.5.0.0")]
[assembly: AssemblyInformationalVersion("4.5.0")]
[assembly: AssemblyFileVersion("4.5.1.0")]
[assembly: AssemblyInformationalVersion("4.5.1")]

// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ if [ -e $nugetFileName ]; then
rm $nugetFileName
fi
echo $contentValue >> $nugetFileName
./scripts/update-app-secrets.sh PROD
./build.sh -t=externals-android
popd

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using Contoso.Forms.Demo.MacOS;
using Xamarin.Forms;

[assembly: Dependency(typeof(AppConfiguration))]
namespace Contoso.Forms.Demo.MacOS
{
public class AppConfiguration: IAppConfiguration
{
public AppConfiguration()
{
}

public string GetAppSecret()
{
return Environment.GetEnvironmentVariable("XAMARIN_FORMS_MACOS_PROD");
}

public string GetTargetToken()
{
return "";
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\..\packages\Xamarin.Forms.5.0.0.2125\build\Xamarin.Forms.props" Condition="Exists('..\..\..\packages\Xamarin.Forms.5.0.0.2125\build\Xamarin.Forms.props')" />
<Import Project="..\..\..\packages\Xamarin.Forms.5.0.0.2401\build\Xamarin.Forms.props" Condition="Exists('..\..\..\packages\Xamarin.Forms.5.0.0.2401\build\Xamarin.Forms.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand Down Expand Up @@ -48,21 +48,26 @@
<LinkMode>SdkOnly</LinkMode>
<HttpClientHandler></HttpClientHandler>
</PropertyGroup>
<PropertyGroup Condition=" '$(RunConfiguration)' == 'Default' ">
<EnvironmentVariables>
<Variable name="XAMARIN_FORMS_MACOS_PROD" value="{XAMARIN_FORMS_MACOS_PROD}" />
</EnvironmentVariables>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.Mac" />
<Reference Include="Xamarin.Forms.Core">
<HintPath>..\..\..\packages\Xamarin.Forms.5.0.0.2125\lib\Xamarin.Mac\Xamarin.Forms.Core.dll</HintPath>
<HintPath>..\..\..\packages\Xamarin.Forms.5.0.0.2401\lib\Xamarin.Mac\Xamarin.Forms.Core.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Platform">
<HintPath>..\..\..\packages\Xamarin.Forms.5.0.0.2125\lib\Xamarin.Mac\Xamarin.Forms.Platform.dll</HintPath>
<HintPath>..\..\..\packages\Xamarin.Forms.5.0.0.2401\lib\Xamarin.Mac\Xamarin.Forms.Platform.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Platform.macOS">
<HintPath>..\..\..\packages\Xamarin.Forms.5.0.0.2125\lib\Xamarin.Mac\Xamarin.Forms.Platform.macOS.dll</HintPath>
<HintPath>..\..\..\packages\Xamarin.Forms.5.0.0.2401\lib\Xamarin.Mac\Xamarin.Forms.Platform.macOS.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Xaml">
<HintPath>..\..\..\packages\Xamarin.Forms.5.0.0.2125\lib\Xamarin.Mac\Xamarin.Forms.Xaml.dll</HintPath>
<HintPath>..\..\..\packages\Xamarin.Forms.5.0.0.2401\lib\Xamarin.Mac\Xamarin.Forms.Xaml.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AppCenter">
<HintPath>..\..\..\packages\Microsoft.AppCenter.4.5.0\lib\Xamarin.Mac\Microsoft.AppCenter.dll</HintPath>
Expand Down Expand Up @@ -116,6 +121,7 @@
<DependentUpon>ViewController.cs</DependentUpon>
</Compile>
<Compile Include="FilePicker.cs" />
<Compile Include="AppConfiguration.cs" />
</ItemGroup>
<ItemGroup>
<InterfaceDefinition Include="Main.storyboard" />
Expand All @@ -127,5 +133,5 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.CSharp.targets" />
<Import Project="..\..\..\packages\Xamarin.Forms.5.0.0.2125\build\Xamarin.Forms.targets" Condition="Exists('..\..\..\packages\Xamarin.Forms.5.0.0.2125\build\Xamarin.Forms.targets')" />
<Import Project="..\..\..\packages\Xamarin.Forms.5.0.0.2401\build\Xamarin.Forms.targets" Condition="Exists('..\..\..\packages\Xamarin.Forms.5.0.0.2401\build\Xamarin.Forms.targets')" />
</Project>
4 changes: 2 additions & 2 deletions Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.MacOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<key>CFBundleIdentifier</key>
<string>com.microsoft.appcenter.Contoso-Forms-Demo-MacOS</string>
<key>CFBundleShortVersionString</key>
<string>4.5.0</string>
<string>4.5.1</string>
<key>CFBundleVersion</key>
<string>4.5.0</string>
<string>4.5.1</string>
<key>LSMinimumSystemVersion</key>
<string>10.14</string>
<key>CFBundleDevelopmentRegion</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
<package id="Microsoft.AppCenter.Analytics" version="4.5.0" targetFramework="xamarinmac20" />
<package id="Microsoft.AppCenter.Crashes" version="4.5.0" targetFramework="xamarinmac20" />
<package id="Microsoft.AppCenter.DistributePlay" version="4.5.0" targetFramework="xamarinmac20" />
<package id="Xamarin.Forms" version="5.0.0.2125" targetFramework="xamarinmac20" />
<package id="Xamarin.Forms" version="5.0.0.2401" targetFramework="xamarinmac20" />
</packages>
23 changes: 23 additions & 0 deletions Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.UWP/AppConfiguration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using Contoso.Forms.Demo.UWP;
using System;
using Xamarin.Forms;

[assembly: Dependency(typeof(AppConfiguration))]
namespace Contoso.Forms.Demo.UWP
{
class AppConfiguration: IAppConfiguration
{
public string GetAppSecret()
{
return Environment.GetEnvironmentVariable("XAMARIN_FORMS_UWP_PROD");
}

public string GetTargetToken()
{
return "";
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="AppConfiguration.cs" />
<Compile Include="ClearCrashes.cs" />
<Compile Include="EventFilter.cs" />
<Compile Include="EventFilterWrapper.cs" />
Expand Down Expand Up @@ -135,9 +136,9 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AppCenter.Analytics" Version="4.5.0" />
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="4.5.0" />
<PackageReference Include="Microsoft.AppCenter.Distribute" Version="4.5.0" />
<PackageReference Include="Microsoft.AppCenter.Analytics" Version="4.5.1" />
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="4.5.1" />
<PackageReference Include="Microsoft.AppCenter.Distribute" Version="4.5.1" />
<PackageReference Include="Xamarin.Forms" Version="4.8.0.1821" />
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.9" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
<Identity Name="10805zumoTestUser.AppCenter-Contoso.Forms.Demo.UWP" Publisher="CN=B2D1C358-6AF8-4416-BF73-129CC1F3C152" Version="4.5.0.0" />
<Identity Name="10805zumoTestUser.AppCenter-Contoso.Forms.Demo.UWP" Publisher="CN=B2D1C358-6AF8-4416-BF73-129CC1F3C152" Version="4.5.1.0" />
<mp:PhoneIdentity PhoneProductId="fbe02dcf-2c7d-4740-9c2b-0df5e15916e5" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>AppCenter-Contoso.Forms.Demo.UWP</DisplayName>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.0.0")]
[assembly: AssemblyFileVersion("4.5.0.0")]
[assembly: AssemblyFileVersion("4.5.1.0")]
[assembly: ComVisible(false)]
13 changes: 12 additions & 1 deletion Apps/Contoso.Forms.Demo/Contoso.Forms.Demo.iOS/AppDelegate.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using Contoso.Forms.Demo.iOS;
using Foundation;
using Microsoft.AppCenter;
Expand All @@ -13,7 +14,7 @@
namespace Contoso.Forms.Demo.iOS
{
[Register("AppDelegate")]
public class AppDelegate : Xamarin.Forms.Platform.iOS.FormsApplicationDelegate, IClearCrashClick
public class AppDelegate : Xamarin.Forms.Platform.iOS.FormsApplicationDelegate, IClearCrashClick, IAppConfiguration
{
private const string CrashesUserConfirmationStorageKey = "MSAppCenterCrashesUserConfirmation";

Expand All @@ -37,6 +38,16 @@ public void ClearCrashButton()
{
NSUserDefaults.StandardUserDefaults.RemoveObject(CrashesUserConfirmationStorageKey);
}

public string GetAppSecret()
{
return Environment.GetEnvironmentVariable("XAMARIN_FORMS_IOS_PROD");
}

public string GetTargetToken()
{
return Environment.GetEnvironmentVariable("XAMARIN_FORMS_IOS_TARGET_TOKEN_PROD");
}
}

public class AnalyticsDelegate : MSACAnalyticsDelegate
Expand Down
Loading

0 comments on commit 58d1004

Please sign in to comment.