1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-22 11:35:21 +01: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
No known key found for this signature in database
GPG Key ID: 5D233F8F2B034536
4 changed files with 180 additions and 311 deletions

View File

@ -17,20 +17,20 @@ env:
target-net-version: net8.0 target-net-version: net8.0
jobs: jobs:
cloc: # cloc:
name: CLOC # name: CLOC
runs-on: ubuntu-20.04 # runs-on: ubuntu-20.04
steps: # steps:
- name: Checkout repo # - name: Checkout repo
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 # uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Set up CLOC # - name: Set up CLOC
run: | # run: |
sudo apt-get update # sudo apt-get update
sudo apt-get -y install cloc # sudo apt-get -y install cloc
- name: Print lines of code # - name: Print lines of code
run: cloc --vcs git --exclude-dir Resources,store,test,Properties --include-lang C#,XAML # run: cloc --vcs git --exclude-dir Resources,store,test,Properties --include-lang C#,XAML
setup: setup:
@ -290,202 +290,194 @@ jobs:
shell: bash shell: bash
# f-droid: f-droid:
# name: F-Droid Build name: F-Droid Build
# runs-on: windows-2022 runs-on: windows-2022
# steps: env:
# - name: Setup NuGet android_folder_path: src/App/Platforms/Android
# uses: nuget/setup-nuget@296fd3ccf8528660c91106efefe2364482f86d6f # v1.2.0 android_manifest_path: src/App/Platforms/Android/AndroidManifest.xml
# with: steps:
# nuget-version: 5.9.0 - name: Setup NuGet
uses: nuget/setup-nuget@296fd3ccf8528660c91106efefe2364482f86d6f # v1.2.0
with:
nuget-version: 6.4.0
# - name: Set up MSBuild - name: Set up .NET
# uses: microsoft/setup-msbuild@1ff57057b5cfdc39105cd07a01d78e9b0ea0c14c # v1.3.1 uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0
with:
dotnet-version: '8.0.x'
# - name: Setup Windows builder - name: Set up MSBuild
# run: choco install checksum --no-progress uses: microsoft/setup-msbuild@1ff57057b5cfdc39105cd07a01d78e9b0ea0c14c # v1.3.1
# - name: Work Around for broken Windows 2022 Runner Image # This step might be obsolete at some point as .NET MAUI workloads
# run: | # are starting to come pre-installed on the GH Actions build agents.
# Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\" - name: Install MAUI Workload
# $InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" run: dotnet workload install maui --ignore-failed-sources
# $componentsToAdd = @(
# "Component.Xamarin"
# )
# [string]$workloadArgs = $componentsToAdd | ForEach-Object {" --add " + $_}
# $Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
# $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
# if ($process.ExitCode -eq 0)
# {
# Write-Host "components have been successfully added"
# }
# else
# {
# Write-Host "components were not installed"
# exit 1
# }
# - name: Print environment - name: Setup Windows builder
# run: | run: choco install checksum --no-progress
# nuget help | grep Version
# msbuild -version
# dotnet --info
# echo "GitHub ref: $GITHUB_REF"
# echo "GitHub event: $GITHUB_EVENT"
# - name: Checkout repo - name: Print environment
# uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 run: |
nuget help | grep Version
msbuild -version
dotnet --info
echo "GitHub ref: $GITHUB_REF"
echo "GitHub event: $GITHUB_EVENT"
# - name: Decrypt secrets - name: Checkout repo
# env: uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
# DECRYPT_FILE_PASSWORD: ${{ secrets.DECRYPT_FILE_PASSWORD }}
# run: |
# mkdir -p ~/secrets
# gpg --quiet --batch --yes --decrypt --passphrase="$DECRYPT_FILE_PASSWORD" \ - name: Decrypt secrets
# --output ./src/Android/app_fdroid-keystore.jks ./.github/secrets/app_fdroid-keystore.jks.gpg env:
# shell: bash DECRYPT_FILE_PASSWORD: ${{ secrets.DECRYPT_FILE_PASSWORD }}
run: |
mkdir -p ~/secrets
# - name: Increment version gpg --quiet --batch --yes --decrypt --passphrase="$DECRYPT_FILE_PASSWORD" \
# run: | --output ./${{ env.main_app_folder_path }}/app_fdroid-keystore.jks ./.github/secrets/app_fdroid-keystore.jks.gpg
# BUILD_NUMBER=$((3000 + $GITHUB_RUN_NUMBER)) shell: bash
# echo "########################################" - name: Increment version
# echo "##### Setting Version Code $BUILD_NUMBER" run: |
# echo "########################################" BUILD_NUMBER=$((3000 + $GITHUB_RUN_NUMBER))
# sed -i "s/android:versionCode=\"1\"/android:versionCode=\"$BUILD_NUMBER\"/" \ echo "########################################"
# ./src/Android/Properties/AndroidManifest.xml echo "##### Setting Version Code $BUILD_NUMBER"
# shell: bash echo "########################################"
# - name: Clean for F-Droid sed -i "s/android:versionCode=\"1\"/android:versionCode=\"$BUILD_NUMBER\"/" \
# run: | ./${{ env.android_manifest_path }}
# $androidPath = $($env:GITHUB_WORKSPACE + "/src/Android/Android.csproj"); shell: bash
# $appPath = $($env:GITHUB_WORKSPACE + "/src/App/App.csproj");
# $corePath = $($env:GITHUB_WORKSPACE + "/src/Core/Core.csproj");
# $androidManifest = $($env:GITHUB_WORKSPACE + "/src/Android/Properties/AndroidManifest.xml"); - name: Clean for F-Droid
run: |
$appPath = $($env:GITHUB_WORKSPACE + "/${{ env.main_app_project_path }}");
$corePath = $($env:GITHUB_WORKSPACE + "/src/Core/Core.csproj");
# Write-Output "########################################" $androidManifest = $($env:GITHUB_WORKSPACE + "/${{ env.android_manifest_path }}");
# Write-Output "##### Clean Android and App"
# Write-Output "########################################"
# msbuild "$($androidPath)" "/t:Clean" "/p:Configuration=FDroid" # Write-Output "########################################"
# msbuild "$($appPath)" "/t:Clean" "/p:Configuration=FDroid" # Write-Output "##### Clean Android and App"
# Write-Output "########################################"
# Write-Output "########################################" # msbuild "$($androidPath)" "/t:Clean" "/p:Configuration=FDroid"
# Write-Output "##### Backup project files" # msbuild "$($appPath)" "/t:Clean" "/p:Configuration=FDroid"
# Write-Output "########################################"
# Copy-Item $androidManifest $($androidManifest + ".original"); Write-Output "########################################"
# Copy-Item $androidPath $($androidPath + ".original"); Write-Output "##### Backup project files"
# Copy-Item $appPath $($appPath + ".original"); Write-Output "########################################"
# Write-Output "########################################" Copy-Item $androidManifest $($androidManifest + ".original");
# Write-Output "##### Cleanup Android Manifest" Copy-Item $appPath $($appPath + ".original");
# Write-Output "########################################"
# $xml=New-Object XML; Write-Output "########################################"
# $xml.Load($androidManifest); Write-Output "##### Cleanup Android Manifest"
Write-Output "########################################"
# $nsAndroid=New-Object System.Xml.XmlNamespaceManager($xml.NameTable); $xml=New-Object XML;
# $nsAndroid.AddNamespace("android", "http://schemas.android.com/apk/res/android"); $xml.Load($androidManifest);
# $xml.Save($androidManifest); $nsAndroid=New-Object System.Xml.XmlNamespaceManager($xml.NameTable);
$nsAndroid.AddNamespace("android", "http://schemas.android.com/apk/res/android");
# Write-Output "########################################" $xml.Save($androidManifest);
# Write-Output "##### Uninstall from Android.csproj"
# Write-Output "########################################"
# $xml=New-Object XML; # Write-Output "########################################"
# $xml.Load($androidPath); # Write-Output "##### Uninstall from App.csproj"
# Write-Output "########################################"
# $ns=New-Object System.Xml.XmlNamespaceManager($xml.NameTable); # $xml=New-Object XML;
# $ns.AddNamespace("ns", $xml.DocumentElement.NamespaceURI); # $xml.Load($appPath);
# $firebaseNode=$xml.SelectSingleNode(` # $ns=New-Object System.Xml.XmlNamespaceManager($xml.NameTable);
# "/ns:Project/ns:ItemGroup/ns:PackageReference[@Include='Xamarin.Firebase.Messaging']", $ns); # $ns.AddNamespace("ns", $xml.DocumentElement.NamespaceURI);
# $firebaseNode.ParentNode.RemoveChild($firebaseNode);
# $daggerNode=$xml.SelectSingleNode(` # $firebaseNode=$xml.SelectSingleNode(`
# "/ns:Project/ns:ItemGroup/ns:PackageReference[@Include='Xamarin.Google.Dagger']", $ns); # "/ns:Project/ns:ItemGroup/ns:PackageReference[@Include='Xamarin.Firebase.Messaging']", $ns);
# $daggerNode.ParentNode.RemoveChild($daggerNode); # $firebaseNode.ParentNode.RemoveChild($firebaseNode);
# $safetyNetNode=$xml.SelectSingleNode(` # $daggerNode=$xml.SelectSingleNode(`
# "/ns:Project/ns:ItemGroup/ns:PackageReference[@Include='Xamarin.GooglePlayServices.SafetyNet']", $ns); # "/ns:Project/ns:ItemGroup/ns:PackageReference[@Include='Xamarin.Google.Dagger']", $ns);
# $safetyNetNode.ParentNode.RemoveChild($safetyNetNode); # $daggerNode.ParentNode.RemoveChild($daggerNode);
# $xml.Save($androidPath); # $safetyNetNode=$xml.SelectSingleNode(`
# "/ns:Project/ns:ItemGroup/ns:PackageReference[@Include='Xamarin.GooglePlayServices.SafetyNet']", $ns);
# $safetyNetNode.ParentNode.RemoveChild($safetyNetNode);
# Write-Output "########################################" # $xml.Save($appPath);
# Write-Output "##### Uninstall from Core.csproj"
# Write-Output "########################################"
# $xml=New-Object XML; # Write-Output "########################################"
# $xml.Load($corePath); # Write-Output "##### Uninstall from Core.csproj"
# Write-Output "########################################"
# $appCenterNode=$xml.SelectSingleNode("/Project/ItemGroup/PackageReference[@Include='Microsoft.AppCenter.Crashes']"); # $xml=New-Object XML;
# $appCenterNode.ParentNode.RemoveChild($appCenterNode); # $xml.Load($corePath);
# $xml.Save($corePath); # $appCenterNode=$xml.SelectSingleNode("/Project/ItemGroup/PackageReference[@Include='Microsoft.AppCenter.Crashes']");
# shell: pwsh # $appCenterNode.ParentNode.RemoveChild($appCenterNode);
# - name: Restore packages # $xml.Save($corePath);
# run: nuget restore shell: pwsh
# - name: Build for F-Droid - name: Restore packages
# run: | run: dotnet restore
# $configuration = "FDroid";
# Write-Output "########################################" - name: Build for F-Droid
# Write-Output "##### Build $configuration Configuration" run: |
# Write-Output "########################################" $configuration = "Release";
$projToBuild = $($env:GITHUB_WORKSPACE + "/${{ env.main_app_project_path }}");
# msbuild "$($env:GITHUB_WORKSPACE + "/src/Android/Android.csproj")" "/p:Configuration=$configuration" Write-Output "########################################"
# shell: pwsh Write-Output "##### Build $configuration FDROID
Write-Output "########################################"
# - name: Sign for F-Droid dotnet build $projToBuild -c $configuration -f ${{ env.target-net-version }}-android /p:CustomConstants="FDROID"
# env:
# FDROID_KEYSTORE_PASSWORD: ${{ secrets.FDROID_KEYSTORE_PASSWORD }}
# run: |
# Write-Output "########################################"
# Write-Output "##### Sign FDroid Configuration"
# Write-Output "########################################"
# msbuild "$($env:GITHUB_WORKSPACE + "/src/Android/Android.csproj")" ` shell: pwsh
# "/t:SignAndroidPackage" "/p:Configuration=FDroid" "/p:AndroidKeyStore=true" `
# "/p:AndroidSigningKeyAlias=bitwarden" "/p:AndroidSigningKeyPass=$($env:FDROID_KEYSTORE_PASSWORD)" `
# "/p:AndroidSigningKeyStore=$("app_fdroid-keystore.jks")" `
# "/p:AndroidSigningStorePass=$($env:FDROID_KEYSTORE_PASSWORD)" "/v:quiet"
# Write-Output "########################################" - name: Sign for F-Droid
# Write-Output "##### Copy FDroid apk to project root" env:
# Write-Output "########################################" FDROID_KEYSTORE_PASSWORD: ${{ secrets.FDROID_KEYSTORE_PASSWORD }}
run: |
$projToBuild = $($env:GITHUB_WORKSPACE + "/${{ env.main_app_project_path }}");
$packageName = "com.x8bit.bitwarden";
# $signedApkPath = $($env:GITHUB_WORKSPACE + "/src/Android/bin/FDroid/com.x8bit.bitwarden-Signed.apk"); Write-Output "########################################"
# $signedApkDestPath = $($env:GITHUB_WORKSPACE + "/com.x8bit.bitwarden-fdroid.apk"); Write-Output "##### Sign FDroid"
Write-Output "########################################"
# Copy-Item $signedApkPath $signedApkDestPath dotnet publish $projToBuild -c Release -f ${{ env.target-net-version }}-android /p:AndroidKeyStore=true /p:AndroidSigningKeyStore=$("app_fdroid-keystore.jks") /p:AndroidSigningKeyAlias=bitwarden /p:AndroidSigningKeyPass="$($env:FDROID_KEYSTORE_PASSWORD)" /p:AndroidSigningStorePass="$($env:FDROID_KEYSTORE_PASSWORD)" /p:CustomConstants="FDROID" --no-restore
# shell: pwsh
# - name: Upload F-Droid .apk artifact Write-Output "########################################"
# uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # v3.0.0 Write-Output "##### Copy FDroid apk to project root"
# with: Write-Output "########################################"
# name: com.x8bit.bitwarden-fdroid.apk
# path: ./com.x8bit.bitwarden-fdroid.apk
# if-no-files-found: error
# - name: Create checksum for F-Droid artifact $signedApkPath = $($env:GITHUB_WORKSPACE + "/${{ env.main_app_folder_path }}/bin/Release/${{ env.target-net-version }}-android/publish/$($packageName)-Signed.apk");
# run: | $signedApkDestPath = $($env:GITHUB_WORKSPACE + "/com.x8bit.bitwarden-fdroid.apk");
# checksum -f="./com.x8bit.bitwarden-fdroid.apk" `
# -t sha256 | Out-File -Encoding ASCII ./bw-fdroid-apk-sha256.txt
# - name: Upload F-Droid sha file Copy-Item $signedApkPath $signedApkDestPath
# uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # v3.0.0 shell: pwsh
# with:
# name: bw-fdroid-apk-sha256.txt - name: Upload F-Droid .apk artifact
# path: ./bw-fdroid-apk-sha256.txt uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # v3.0.0
# if-no-files-found: error with:
name: com.x8bit.bitwarden-fdroid.apk
path: ./com.x8bit.bitwarden-fdroid.apk
if-no-files-found: error
- name: Create checksum for F-Droid artifact
run: |
checksum -f="./com.x8bit.bitwarden-fdroid.apk" `
-t sha256 | Out-File -Encoding ASCII ./bw-fdroid-apk-sha256.txt
- name: Upload F-Droid sha file
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # v3.0.0
with:
name: bw-fdroid-apk-sha256.txt
path: ./bw-fdroid-apk-sha256.txt
if-no-files-found: error
# Disabling iOS build from this branch until fixing publish/build # Disabling iOS build from this branch until fixing publish/build
# really long time # really long time

View File

@ -29,10 +29,10 @@
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<!--<ForceSimulatorX64ArchitectureInIDE>true</ForceSimulatorX64ArchitectureInIDE>-->
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<DefineConstants Condition=" '$(CustomConstants)' != '' ">$(DefineConstants);$(CustomConstants)</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-android|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-android|AnyCPU'">
<AndroidEnableMultiDex>True</AndroidEnableMultiDex> <AndroidEnableMultiDex>True</AndroidEnableMultiDex>
<UseInterpreter>False</UseInterpreter> <UseInterpreter>False</UseInterpreter>
@ -87,7 +87,6 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="5.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="zxcvbn-core" Version="7.0.92" /> <PackageReference Include="zxcvbn-core" Version="7.0.92" />
<PackageReference Include="CommunityToolkit.Maui" Version="5.2.0" /> <PackageReference Include="CommunityToolkit.Maui" Version="5.2.0" />
@ -100,41 +99,6 @@
<PackageReference Include="PCLCrypto" Version="2.1.40-alpha" /> <PackageReference Include="PCLCrypto" Version="2.1.40-alpha" />
<PackageReference Include="Portable.BouncyCastle" Version="1.9.0" /> <PackageReference Include="Portable.BouncyCastle" Version="1.9.0" />
</ItemGroup> </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> <ItemGroup>
<Folder Include="Effects\" /> <Folder Include="Effects\" />
<Folder Include="Resources\" /> <Folder Include="Resources\" />
@ -148,13 +112,18 @@
<Folder Include="Platforms\Android\Tiles\" /> <Folder Include="Platforms\Android\Tiles\" />
<Folder Include="Platforms\Android\Utilities\" /> <Folder Include="Platforms\Android\Utilities\" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0-android'"> <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="Plugin.CurrentActivity" Version="2.1.0.4" />
<PackageReference Include="Xamarin.AndroidX.AutoFill" Version="1.1.0.18" /> <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" /> <PackageReference Include="Xamarin.AndroidX.Activity.Ktx" Version="1.7.2.1" />
</ItemGroup> </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> <ItemGroup>
<BundleResource Include="Platforms\Android\Resources\mipmap-mdpi\ic_launcher.png" /> <BundleResource Include="Platforms\Android\Resources\mipmap-mdpi\ic_launcher.png" />
<BundleResource Include="Platforms\Android\Resources\mipmap-mdpi\ic_launcher_round.png" /> <BundleResource Include="Platforms\Android\Resources\mipmap-mdpi\ic_launcher_round.png" />

View File

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

View File

@ -15,31 +15,9 @@
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-ios|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-ios|AnyCPU'">
<CreatePackage>false</CreatePackage> <CreatePackage>false</CreatePackage>
</PropertyGroup> </PropertyGroup>
<!--<ItemGroup> <PropertyGroup>
<None Remove="Resources\eff_long_word_list.txt" /> <DefineConstants Condition=" '$(CustomConstants)' != '' ">$(DefineConstants);$(CustomConstants)</DefineConstants>
<None Remove="Resources\public_suffix_list.dat" /> </PropertyGroup>
<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>-->
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="Resources\eff_long_word_list.txt" /> <EmbeddedResource Include="Resources\eff_long_word_list.txt" />
<EmbeddedResource Include="Resources\public_suffix_list.dat" /> <EmbeddedResource Include="Resources\public_suffix_list.dat" />
@ -53,7 +31,6 @@
<PackageReference Include="MessagePack" Version="2.5.124" /> <PackageReference Include="MessagePack" Version="2.5.124" />
<PackageReference Include="CsvHelper" Version="30.0.1" /> <PackageReference Include="CsvHelper" Version="30.0.1" />
<PackageReference Include="LiteDB" Version="5.0.17" /> <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="PCLCrypto" Version="2.1.40-alpha" />
<PackageReference Include="zxcvbn-core" Version="7.0.92" /> <PackageReference Include="zxcvbn-core" Version="7.0.92" />
<PackageReference Include="MessagePack.MSBuild.Tasks" Version="2.5.124"> <PackageReference Include="MessagePack.MSBuild.Tasks" Version="2.5.124">
@ -70,12 +47,17 @@
<PackageReference Include="Portable.BouncyCastle" Version="1.9.0" /> <PackageReference Include="Portable.BouncyCastle" Version="1.9.0" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'"> <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="Plugin.CurrentActivity" Version="2.1.0.4" />
<PackageReference Include="Xamarin.AndroidX.AutoFill" Version="1.1.0.18" /> <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" /> <PackageReference Include="Xamarin.AndroidX.Activity.Ktx" Version="1.7.2.1" />
</ItemGroup> </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> <ItemGroup>
<Folder Include="Services\Logging\" /> <Folder Include="Services\Logging\" />
<Folder Include="Attributes\" /> <Folder Include="Attributes\" />
@ -100,81 +82,7 @@
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" /> <MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
<MauiFont Include="Resources\Fonts\*" /> <MauiFont Include="Resources\Fonts\*" />
</ItemGroup> </ItemGroup>
<!--<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>
<EmbeddedResource Update="Resources\Localization\AppResources.resx"> <EmbeddedResource Update="Resources\Localization\AppResources.resx">
<LastGenOutput>AppResources.Designer.cs</LastGenOutput> <LastGenOutput>AppResources.Designer.cs</LastGenOutput>
<Generator>PublicResXFileCodeGenerator</Generator> <Generator>PublicResXFileCodeGenerator</Generator>