Try build ControlGallery Android on CI (#525)

* Try build ControlGallery

Try build android controlgallery new path

Fix

Fix android uitests reference

Don't build iOS for now

* - only set content description for UI Test build

* Add Environment.Build.props back

* Update boots version

* Fix LinkDescription.xml

Co-authored-by: Shane Neuville <shneuvil@microsoft.com>
This commit is contained in:
Rui Marinho 2021-03-17 18:59:35 +00:00 коммит произвёл GitHub
Родитель 24485eba55
Коммит d74a03a0b7
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
8 изменённых файлов: 39 добавлений и 22 удалений

Просмотреть файл

@ -19,7 +19,7 @@ PowerShell:
// ADDINS
//////////////////////////////////////////////////////////////////////
#addin "nuget:?package=Cake.Android.SdkManager&version=3.0.2"
#addin "nuget:?package=Cake.Boots&version=1.0.3.556"
#addin "nuget:?package=Cake.Boots&version=1.0.4.600-preview1"
#addin "nuget:?package=Cake.AppleSimulator&version=0.2.0"
#addin "nuget:?package=Cake.FileHelpers&version=3.2.1"

Просмотреть файл

@ -1,5 +0,0 @@
<Project>
<PropertyGroup>
<LangVersion>8.0</LangVersion>
</PropertyGroup>
</Project>

Просмотреть файл

@ -45,11 +45,11 @@ steps:
displayName: 'Copy Android Files for UITest'
inputs:
Contents: |
**/Xamarin.Forms.Core.Android.UITests/bin/$(BuildConfiguration)/Newtonsoft.Json.*
**/Xamarin.Forms.Core.Android.UITests/bin/$(BuildConfiguration)/nunit.*
**/Xamarin.Forms.Core.Android.UITests/bin/$(BuildConfiguration)/NUnit3.*
**/Xamarin.Forms.Core.Android.UITests/bin/$(BuildConfiguration)/Plugin.*
**/Xamarin.Forms.Core.Android.UITests/bin/$(BuildConfiguration)/Xamarin.*
**/Android.UITests/bin/$(BuildConfiguration)/Newtonsoft.Json.*
**/Android.UITests/bin/$(BuildConfiguration)/nunit.*
**/Android.UITests/bin/$(BuildConfiguration)/NUnit3.*
**/Android.UITests/bin/$(BuildConfiguration)/Plugin.*
**/Android.UITests/bin/$(BuildConfiguration)/Xamarin.*
TargetFolder: '$(build.artifactstagingdirectory)/android'
CleanTargetFolder: true
flattenFolders: true
@ -57,7 +57,7 @@ steps:
- task: CopyFiles@2
displayName: 'Copy $(renderers)'
inputs:
SourceFolder: src/ControlGallery/src/Xamarin.Forms.ControlGallery.Android/bin/$(BuildConfiguration)/
SourceFolder: src/Compatibility/ControlGallery/src/Android/bin/$(BuildConfiguration)/
Contents: '**/*.apk'
TargetFolder: '$(build.artifactstagingdirectory)/androidApp'
CleanTargetFolder: true

Просмотреть файл

@ -150,6 +150,27 @@ stages:
steps:
- template: common/controlgallery-ios.yml
- stage: build_android
displayName: Android
dependsOn: []
jobs:
- job: android
workspace:
clean: all
displayName: Build ControlGallery Android
timeoutInMinutes: 120
pool:
name: $(macOSXVmPool)
vmImage: $(macOSXVmImage)
variables:
renderers: 'FAST'
outputfolder: 'newRenderers'
provisionator.xcode : '$(System.DefaultWorkingDirectory)/eng/provisioning/xcode.csx'
provisionator.path : '$(System.DefaultWorkingDirectory)/eng/provisioning/provisioning.csx'
provisionator.extraArguments : '--v'
steps:
- template: common/controlgallery-android.yml
- stage: pack_net6
displayName: Pack .NET 6
dependsOn: []

Просмотреть файл

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="../../../../../eng/ControlGallery.Build.props" />
<Import Condition="'$(EnvironmentBuildPropsImported)' != 'True'" Project="..\..\..\..\..\eng\Environment.Build.props" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -33,7 +32,7 @@
<DefineConstants Condition="'$(ANDROID_RENDERERS)' == 'LEGACY'">$(DefineConstants);LEGACY_RENDERERS</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<DefineConstants>$(DefineConstants);HAVE_OPENTK</DefineConstants>
<DefineConstants>$(DefineConstants);HAVE_OPENTK;ENABLE_TEST_CLOUD</DefineConstants>
<AndroidKeyStore>True</AndroidKeyStore>
<AndroidSigningKeyStore>$(MSBuildThisFileDirectory)../../../../../eng/debug.keystore</AndroidSigningKeyStore>
<AndroidSigningStorePass>android</AndroidSigningStorePass>

Просмотреть файл

@ -55,12 +55,14 @@ namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.Android
Microsoft.Maui.Controls.Compatibility.Forms.Init(this, bundle);
FormsMaps.Init(this, bundle);
#if ENABLE_TEST_CLOUD
Handlers.ViewHandler
.ViewMapper[nameof(IView.AutomationId)] = (h, v) =>
{
(h.NativeView as global::Android.Views.View).ContentDescription =
v.AutomationId;
};
#endif
//FormsMaterial.Init(this, bundle);
AndroidAppLinks.Init(this);

Просмотреть файл

@ -1,12 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?>
<linker>
<assembly fullname="Microsoft.Maui.Controls.ControlGallery.Android">
<namespace fullname="Microsoft.Maui.Controls.ControlGallery.Android.Tests" />
<namespace fullname="Xamarin.Forms.Controls.Issues" />
<assembly fullname="Microsoft.Maui.Controls.Compatibility.ControlGallery.Android">
<namespace fullname="Microsoft.Maui.Controls.Compatibility.ControlGallery.Android.Tests" />
<namespace fullname="Microsoft.Maui.Controls.Compatibility.ControlGallery.Issues" />
<type fullname="*Renderer" />
</assembly>
<assembly fullname="Xamarin.Forms.Controls">
<namespace fullname="Xamarin.Forms.Controls.Tests" />
<assembly fullname="Microsoft.Maui.Controls.Compatibility.ControlGallery">
<namespace fullname="Maui.Controls.Tests" />
<namespace fullname="Maui.Controls.Compatibility.Tests" />
</assembly>
<assembly fullname="nunit.framework"/>
<assembly fullname="mscorlib">
@ -14,6 +15,6 @@
<type fullname="System.Runtime.CompilerServices.INotifyCompletion" />
<type fullname="System.Runtime.CompilerServices.TaskAwaiter" />
</assembly>
<assembly fullname="Xamarin.Forms.Platform.Android.UnitTests" />
<assembly fullname="Xamarin.Platform" />
<assembly fullname="Microsoft.Maui.Controls.Compatibility.Android.UnitTests" />
<assembly fullname="Microsoft.Maui" />
</linker>

Просмотреть файл

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\..\..\..\eng\ControlGallery.Build.props" />
<Import Condition="'$(EnvironmentBuildPropsImported)' != 'True'" Project="..\..\..\..\..\eng\Environment.Build.props" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>