1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-25 12:43:39 +00:00

fdroid-build script

This commit is contained in:
Kyle Spearrin
2018-01-10 18:32:57 -05:00
parent 2f025d51ff
commit 9a13036f4e
4 changed files with 13 additions and 43 deletions

View File

@@ -155,7 +155,7 @@
<ItemGroup>
<None Include="8bit.keystore.enc" />
<GoogleServicesJson Include="google-services.json" />
<None Include="fdroid-remove-libs.ps1" />
<None Include="fdroid-build.ps1" />
<None Include="google-services.json.enc" />
<None Include="increment-version.ps1" />
<None Include="Resources\AboutResources.txt" />

View File

@@ -0,0 +1,11 @@
msbuild "Android.csproj" "/t:Clean" "/p:Configuration=FDroid"
msbuild "..\App\App.csproj" "/t:Clean" "/p:Configuration=FDroid"
Uninstall-Package Xamarin.Firebase.Messaging
Uninstall-Package Xamarin.GooglePlayServices.Analytics
Uninstall-Package HockeySDK.Xamarin
msbuild "Android.csproj" "/logger:C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" "/p:Configuration=FDroid"
msbuild "Android.csproj" "/t:SignAndroidPackage" "/p:Configuration=FDroid" "/p:AndroidKeyStore=true" "/p:AndroidSigningKeyAlias=bitwarden" "/p:AndroidSigningKeyPass=$($env:keystore_password)" "/p:AndroidSigningKeyStore=8bit.keystore" "/p:AndroidSigningStorePass=$($env:keystore_password)"
Copy-Item .\bin\FDroid\com.x8bit.bitwarden-Signed.apk ..\com.x8bit.bitwarden-fdroid-$($env:APPVEYOR_BUILD_NUMBER).apk

View File

@@ -1,35 +0,0 @@
$rootPath = $args[0];
$androidPath = $($rootPath + "\src\Android\Android.csproj");
$appPath = $($rootPath + "\src\App\App.csproj");
# Backup files
Copy-Item $androidPath $($androidPath + ".original");
Copy-Item $appPath $($appPath + ".original");
# Android.csproj
$xml=New-Object XML;
$xml.Load($androidPath);
$ns=New-Object System.Xml.XmlNamespaceManager($xml.NameTable);
$ns.AddNamespace("ns", $xml.DocumentElement.NamespaceURI);
$firebaseNode=$xml.SelectSingleNode("/ns:Project/ns:ItemGroup/ns:PackageReference[@Include='Xamarin.Firebase.Messaging']", $ns);
$firebaseNode.ParentNode.RemoveChild($firebaseNode);
$playServiceNode=$xml.SelectSingleNode("/ns:Project/ns:ItemGroup/ns:PackageReference[@Include='Xamarin.GooglePlayServices.Analytics']", $ns);
$playServiceNode.ParentNode.RemoveChild($playServiceNode);
$xml.Save($androidPath);
# App.csproj
$xml=New-Object XML;
$xml.Load($appPath);
$hockeyNode=$xml.SelectSingleNode("/Project/ItemGroup/PackageReference[@Include='HockeySDK.Xamarin']");
$hockeyNode.ParentNode.RemoveChild($hockeyNode);
$xml.Save($appPath);