From efef49f976ce63d24947a5a3ead3e8bdebe3c552 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 11 Jan 2018 09:03:05 -0500 Subject: [PATCH] Revert "choose/when fdroid conditional on packages" This reverts commit b3573f94826dc850a0c8f9d75b1a76be157bfbd3. --- src/Android/Android.csproj | 18 +++++--------- src/Android/ci-build-apks.ps1 | 45 +++++++++++++++++++++++++++++++++++ src/App/App.csproj | 11 ++------- 3 files changed, 53 insertions(+), 21 deletions(-) diff --git a/src/Android/Android.csproj b/src/Android/Android.csproj index 152b82ddf..0d377d020 100644 --- a/src/Android/Android.csproj +++ b/src/Android/Android.csproj @@ -872,6 +872,12 @@ + + 42.1021.1 + + + 42.1021.1 + 4.0.12 @@ -882,18 +888,6 @@ - - - - - 42.1021.1 - - - 42.1021.1 - - - - diff --git a/src/Android/ci-build-apks.ps1 b/src/Android/ci-build-apks.ps1 index 94e24db47..a7d2f8c4a 100644 --- a/src/Android/ci-build-apks.ps1 +++ b/src/Android/ci-build-apks.ps1 @@ -1,5 +1,7 @@ $rootPath = $env:APPVEYOR_BUILD_FOLDER; + $androidPath = $($rootPath + "\src\Android\Android.csproj"); +$appPath = $($rootPath + "\src\App\App.csproj"); echo "##### Increment Version" @@ -31,8 +33,51 @@ $signedApkDestPath = $($rootPath + "\com.x8bit.bitwarden-" + $env:APPVEYOR_BUILD Copy-Item $signedApkPath $signedApkDestPath +echo "##### Clean Android and App" + +msbuild "$($androidPath)" "/t:Clean" "/p:Configuration=FDroid" +msbuild "$($appPath)" "/t:Clean" "/p:Configuration=FDroid" + +echo "##### Backup project files" + +Copy-Item $androidPath $($androidPath + ".original"); +Copy-Item $appPath $($appPath + ".original"); + +echo "##### Uninstall from 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); + +echo "##### Uninstall from 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); + +echo "##### Restore NuGet" + +$nugetPath = $($rootPath + "\nuget.exe"); + +Invoke-Expression "& `"$nugetPath`" restore" + echo "##### Build and Sign FDroid Configuration" +msbuild "$($androidPath)" "/logger:C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" "/p:Configuration=FDroid" msbuild "$($androidPath)" "/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)" "/v:quiet" echo "##### Copy FDroid apk to project root" diff --git a/src/App/App.csproj b/src/App/App.csproj index 3b269a92b..8d8f07770 100644 --- a/src/App/App.csproj +++ b/src/App/App.csproj @@ -11,7 +11,7 @@ TRACE;FDROID;NETSTANDARD2_0 - + TRACE;FDROID;NET471 @@ -25,6 +25,7 @@ + @@ -39,14 +40,6 @@ - - - - - - - - AppResources.cs.resx