1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-07 11:03:54 +00:00

PM-3349 build.yml configured FDROID job for MAUI

This commit is contained in:
Federico Maccaroni
2023-11-27 17:53:01 -03:00
parent 32be08daae
commit bfa2a51608
4 changed files with 180 additions and 311 deletions

View File

@@ -29,10 +29,10 @@
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<!--<ForceSimulatorX64ArchitectureInIDE>true</ForceSimulatorX64ArchitectureInIDE>-->
</PropertyGroup>
<PropertyGroup>
<DefineConstants Condition=" '$(CustomConstants)' != '' ">$(DefineConstants);$(CustomConstants)</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-android|AnyCPU'">
<AndroidEnableMultiDex>True</AndroidEnableMultiDex>
<UseInterpreter>False</UseInterpreter>
@@ -87,7 +87,6 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="5.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="zxcvbn-core" Version="7.0.92" />
<PackageReference Include="CommunityToolkit.Maui" Version="5.2.0" />
@@ -100,41 +99,6 @@
<PackageReference Include="PCLCrypto" Version="2.1.40-alpha" />
<PackageReference Include="Portable.BouncyCastle" Version="1.9.0" />
</ItemGroup>
<!--<ItemGroup>
<None Remove="Platforms\Android\Resources\mipmap-mdpi\ic_launcher.png" />
<None Remove="Platforms\Android\Resources\mipmap-mdpi\ic_launcher_round.png" />
<None Remove="Platforms\Android\Resources\mipmap-xxhdpi\ic_launcher.png" />
<None Remove="Platforms\Android\Resources\mipmap-xxhdpi\ic_launcher_round.png" />
<None Remove="Platforms\Android\Resources\mipmap-xxxhdpi\ic_launcher.png" />
<None Remove="Platforms\Android\Resources\mipmap-xxxhdpi\ic_launcher_round.png" />
<None Remove="Platforms\Android\Resources\mipmap-hdpi\ic_launcher.png" />
<None Remove="Platforms\Android\Resources\mipmap-hdpi\ic_launcher_round.png" />
<None Remove="Platforms\Android\Resources\drawable-xhdpi\logo_legacy.png" />
<None Remove="Platforms\Android\Resources\drawable-xhdpi\yubikey.png" />
<None Remove="Platforms\Android\Resources\drawable-xhdpi\logo_white_legacy.png" />
<None Remove="Platforms\Android\Resources\drawable-xxhdpi\logo_legacy.png" />
<None Remove="Platforms\Android\Resources\drawable-xxhdpi\yubikey.png" />
<None Remove="Platforms\Android\Resources\drawable-xxhdpi\logo_white_legacy.png" />
<None Remove="Platforms\Android\Resources\drawable-hdpi\logo_legacy.png" />
<None Remove="Platforms\Android\Resources\drawable-hdpi\yubikey.png" />
<None Remove="Platforms\Android\Resources\drawable-hdpi\logo_white_legacy.png" />
<None Remove="Platforms\Android\Resources\mipmap-xhdpi\ic_launcher.png" />
<None Remove="Platforms\Android\Resources\mipmap-xhdpi\ic_launcher_round.png" />
<None Remove="Effects\" />
<None Remove="Resources\" />
<None Remove="Resources\Splash\splash.svg" />
<None Remove="Resources\Splash\" />
<None Remove="Platforms\Android\Accessibility\" />
<None Remove="Platforms\Android\Autofill\" />
<None Remove="Platforms\Android\Push\" />
<None Remove="Platforms\Android\Receivers\" />
<None Remove="Platforms\Android\Services\" />
<None Remove="Platforms\Android\Tiles\" />
<None Remove="Platforms\Android\Utilities\" />
<None Remove="Platforms\Android\google-services.json" />
<None Remove="Platforms\Android\google-services.json.enc" />
</ItemGroup>-->
<ItemGroup>
<Folder Include="Effects\" />
<Folder Include="Resources\" />
@@ -148,13 +112,18 @@
<Folder Include="Platforms\Android\Tiles\" />
<Folder Include="Platforms\Android\Utilities\" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0-android'">
<PackageReference Include="Xamarin.GooglePlayServices.SafetyNet" Version="118.0.1.5" />
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
<PackageReference Include="Plugin.CurrentActivity" Version="2.1.0.4" />
<PackageReference Include="Xamarin.AndroidX.AutoFill" Version="1.1.0.18" />
<PackageReference Include="Xamarin.Firebase.Messaging" Version="123.1.2.2" />
<PackageReference Include="Xamarin.AndroidX.Activity.Ktx" Version="1.7.2.1" />
</ItemGroup>
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android' AND !$(DefineConstants.Contains(FDROID))">
<PackageReference Include="Xamarin.GooglePlayServices.SafetyNet" Version="118.0.1.5" />
<PackageReference Include="Xamarin.Firebase.Messaging" Version="123.1.2.2" />
</ItemGroup>
<ItemGroup Condition="!$(DefineConstants.Contains(FDROID))">
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="5.0.3" />
</ItemGroup>
<ItemGroup>
<BundleResource Include="Platforms\Android\Resources\mipmap-mdpi\ic_launcher.png" />
<BundleResource Include="Platforms\Android\Resources\mipmap-mdpi\ic_launcher_round.png" />

View File

@@ -36,7 +36,7 @@ namespace Bit.Droid
#endif
[Register("com.x8bit.bitwarden.MainApplication")]
#if FDROID
public class MainApplication : Application
public class MainApplication : MauiApplication
#else
public class MainApplication : MauiApplication, ProviderInstaller.IProviderInstallListener
#endif

View File

@@ -15,31 +15,9 @@
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-ios|AnyCPU'">
<CreatePackage>false</CreatePackage>
</PropertyGroup>
<!--<ItemGroup>
<None Remove="Resources\eff_long_word_list.txt" />
<None Remove="Resources\public_suffix_list.dat" />
<None Remove="Microsoft.AppCenter.Crashes" />
<None Remove="Services\Logging\" />
<None Remove="Attributes\" />
<None Remove="MessagePack" />
<None Remove="MessagePack.MSBuild.Tasks" />
<None Remove="Services\EmailForwarders\" />
<None Remove="Resources\Fonts\" />
<None Remove="Resources\Fonts\bwi-font.ttf" />
<None Remove="Resources\Fonts\MaterialIcons_Regular.ttf" />
<None Remove="Resources\Fonts\RobotoMono_Regular.ttf" />
<None Remove="Effects\" />
<None Remove="Resources\Raw\" />
<None Remove="Pages\" />
<None Remove="Behaviors\" />
<None Remove="Controls\" />
<None Remove="Lists\" />
<None Remove="Resources\Styles\" />
<None Remove="Utilities\AccountManagement\" />
<None Remove="Utilities\Automation\" />
<None Remove="Utilities\Prompts\" />
<None Remove="Resources\Localization\" />
</ItemGroup>-->
<PropertyGroup>
<DefineConstants Condition=" '$(CustomConstants)' != '' ">$(DefineConstants);$(CustomConstants)</DefineConstants>
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\eff_long_word_list.txt" />
<EmbeddedResource Include="Resources\public_suffix_list.dat" />
@@ -53,7 +31,6 @@
<PackageReference Include="MessagePack" Version="2.5.124" />
<PackageReference Include="CsvHelper" Version="30.0.1" />
<PackageReference Include="LiteDB" Version="5.0.17" />
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="5.0.3" />
<PackageReference Include="PCLCrypto" Version="2.1.40-alpha" />
<PackageReference Include="zxcvbn-core" Version="7.0.92" />
<PackageReference Include="MessagePack.MSBuild.Tasks" Version="2.5.124">
@@ -70,12 +47,17 @@
<PackageReference Include="Portable.BouncyCastle" Version="1.9.0" />
</ItemGroup>
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
<PackageReference Include="Xamarin.GooglePlayServices.SafetyNet" Version="118.0.1.5" />
<PackageReference Include="Plugin.CurrentActivity" Version="2.1.0.4" />
<PackageReference Include="Xamarin.AndroidX.AutoFill" Version="1.1.0.18" />
<PackageReference Include="Xamarin.Firebase.Messaging" Version="123.1.2.2" />
<PackageReference Include="Xamarin.AndroidX.Activity.Ktx" Version="1.7.2.1" />
</ItemGroup>
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android' AND !$(DefineConstants.Contains(FDROID))">
<PackageReference Include="Xamarin.GooglePlayServices.SafetyNet" Version="118.0.1.5" />
<PackageReference Include="Xamarin.Firebase.Messaging" Version="123.1.2.2" />
</ItemGroup>
<ItemGroup Condition="!$(DefineConstants.Contains(FDROID))">
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="5.0.3" />
</ItemGroup>
<ItemGroup>
<Folder Include="Services\Logging\" />
<Folder Include="Attributes\" />
@@ -100,81 +82,7 @@
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
<MauiFont Include="Resources\Fonts\*" />
</ItemGroup>
<!--<ItemGroup>
<MauiXaml Update="Pages\Accounts\DeleteAccountPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Accounts\EnvironmentPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Accounts\HintPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Accounts\HomePage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Accounts\LockPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Accounts\LoginApproveDevicePage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Accounts\LoginPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Accounts\LoginPasswordlessPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Accounts\LoginPasswordlessRequestPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Accounts\LoginSsoPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Accounts\RegisterPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Accounts\RemoveMasterPasswordPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Accounts\SetPasswordPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Accounts\TwoFactorPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Accounts\UpdateTempPasswordPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Accounts\VerificationCodePage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Generator\GeneratorHistoryPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Generator\GeneratorPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Send\SendAddEditPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Send\SendAddOnlyOptionsView.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Send\SendAddOnlyPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Send\SendGroupingsPage\SendGroupingsPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Send\SendsPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Settings\AboutSettingsPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Settings\AppearanceSettingsPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Settings\AutofillPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Settings\AutofillSettingsPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Settings\BlockAutofillUrisPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Settings\ExportVaultPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Settings\ExtensionPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Settings\FolderAddEditPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Settings\FoldersPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Settings\LoginPasswordlessRequestsListPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Settings\OtherSettingsPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Settings\SecuritySettingsPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Settings\SettingsPage\SettingsPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Settings\VaultSettingsPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Vault\AttachmentsPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Vault\CipherAddEditPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Vault\CipherDetailsPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Vault\CipherSelectionPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Vault\CiphersPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Vault\CollectionsPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Vault\GroupingsPage\GroupingsPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Vault\PasswordHistoryPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Vault\ScanPage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Pages\Vault\SharePage.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Controls\AccountSwitchingOverlay\AccountSwitchingOverlayView.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Controls\AccountViewCell\AccountViewCell.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Controls\AuthenticatorViewCell\AuthenticatorViewCell.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Controls\CipherViewCell\CipherViewCell.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Controls\DateTime\DateTimePicker.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Controls\ExternalLinkItemView.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Controls\IconLabelButton\IconLabelButton.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Controls\PasswordStrengthProgressBar\PasswordStrengthProgressBar.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Controls\SendViewCell\SendViewCell.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Controls\Settings\SettingChooserItemView.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Controls\Settings\SwitchItemView.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Lists\ItemLayouts\CustomFields\BooleanCustomFieldItemLayout.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Lists\ItemLayouts\CustomFields\HiddenCustomFieldItemLayout.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Lists\ItemLayouts\CustomFields\LinkedCustomFieldItemLayout.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Lists\ItemLayouts\CustomFields\TextCustomFieldItemLayout.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Resources\Styles\Android.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Resources\Styles\Base.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Resources\Styles\Black.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Resources\Styles\ControlTemplates.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Resources\Styles\Dark.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Resources\Styles\iOS.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Resources\Styles\Light.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Resources\Styles\Nord.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Resources\Styles\SolarizedDark.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
<MauiXaml Update="Resources\Styles\Variables.xaml" Condition=" '$(EnableDefaultXamlItems)' == 'true' " />
</ItemGroup>-->
<ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Resources\Localization\AppResources.resx">
<LastGenOutput>AppResources.Designer.cs</LastGenOutput>
<Generator>PublicResXFileCodeGenerator</Generator>