From aacf7247ada4b69c13a385c6b78a95df7298d1ae Mon Sep 17 00:00:00 2001 From: Michael Gordeev Date: Tue, 28 Jan 2020 23:18:24 +0300 Subject: [PATCH 1/8] Updated project config to create App Bundle --- GUT.Schedule/GUT.Schedule.sln | 4 ++++ GUT.Schedule/GUT.Schedule/GUT.Schedule.csproj | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/GUT.Schedule/GUT.Schedule.sln b/GUT.Schedule/GUT.Schedule.sln index 056c894..4281a71 100644 --- a/GUT.Schedule/GUT.Schedule.sln +++ b/GUT.Schedule/GUT.Schedule.sln @@ -8,12 +8,16 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Release (APK)|Any CPU = Release (APK)|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {A0471165-37F5-4309-8A92-42F1A6589EEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A0471165-37F5-4309-8A92-42F1A6589EEE}.Debug|Any CPU.Build.0 = Debug|Any CPU {A0471165-37F5-4309-8A92-42F1A6589EEE}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {A0471165-37F5-4309-8A92-42F1A6589EEE}.Release (APK)|Any CPU.ActiveCfg = Release|Any CPU + {A0471165-37F5-4309-8A92-42F1A6589EEE}.Release (APK)|Any CPU.Build.0 = Release|Any CPU + {A0471165-37F5-4309-8A92-42F1A6589EEE}.Release (APK)|Any CPU.Deploy.0 = Release|Any CPU {A0471165-37F5-4309-8A92-42F1A6589EEE}.Release|Any CPU.ActiveCfg = Release|Any CPU {A0471165-37F5-4309-8A92-42F1A6589EEE}.Release|Any CPU.Build.0 = Release|Any CPU {A0471165-37F5-4309-8A92-42F1A6589EEE}.Release|Any CPU.Deploy.0 = Release|Any CPU diff --git a/GUT.Schedule/GUT.Schedule/GUT.Schedule.csproj b/GUT.Schedule/GUT.Schedule/GUT.Schedule.csproj index 45929f2..a767114 100644 --- a/GUT.Schedule/GUT.Schedule/GUT.Schedule.csproj +++ b/GUT.Schedule/GUT.Schedule/GUT.Schedule.csproj @@ -58,6 +58,25 @@ false false armeabi-v7a;x86;x86_64;arm64-v8a + aab + + + bin\Release %28APK%29\ + false + portable + True + TRACE + prompt + 4 + true + False + SdkOnly + true + false + false + false + false + armeabi-v7a;x86;x86_64;arm64-v8a From e0bf07614e30ee203c18d4185452670858a02c6e Mon Sep 17 00:00:00 2001 From: Michael Gordeev Date: Wed, 29 Jan 2020 00:07:05 +0300 Subject: [PATCH 2/8] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d892aa7..7846701 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -30,6 +30,7 @@ steps: configuration: '$(buildConfiguration)' msbuildVersionOption: 'latest' msbuildArchitectureOption: 'x64' + msbuildArguments: '-p:AndroidPackageFormat=aab' jdkOption: 'JDKVersion' - task: DeleteFiles@1 From b1fa3064512ece65cb5335c400afab63b8d82e54 Mon Sep 17 00:00:00 2001 From: Michael Gordeev Date: Wed, 29 Jan 2020 11:16:24 +0300 Subject: [PATCH 3/8] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7846701..68e2261 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -12,41 +12,54 @@ variables: steps: - task: NuGetToolInstaller@1 + displayName: 'Install NuGet Tool' - task: NuGetCommand@2 + displayName: 'Restore Solution' inputs: restoreSolution: '**/*.sln' - task: ResharperCli@2 + displayName: 'RESharper CLI Code Analyzer' inputs: solutionOrProjectPath: 'GUT.Schedule/GUT.Schedule.sln' failBuildLevelSelector: 'Error' failBuildOnCodeIssues: false -- task: XamarinAndroid@1 +- task: MSBuild@1 + displayName: 'Build Solution' inputs: - projectFile: '**/**.csproj' - outputDirectory: '$(outputDirectory)' - configuration: '$(buildConfiguration)' - msbuildVersionOption: 'latest' - msbuildArchitectureOption: 'x64' - msbuildArguments: '-p:AndroidPackageFormat=aab' - jdkOption: 'JDKVersion' + solution: '**/*.sln' + msbuildArchitecture: x64 + msbuildArguments: '-p:Configuration=Release -p:AndroidPackageFormat=aab -p:AndroidUseAapt2=true' -- task: DeleteFiles@1 - inputs: - SourceFolder: '$(outputDirectory)' - Contents: | - **/**.pdb - **/**.dll +#- task: XamarinAndroid@1 +# inputs: +# projectFile: '**/**.csproj' +# outputDirectory: '$(outputDirectory)' +# configuration: '$(buildConfiguration)' +# msbuildVersionOption: 'latest' +# msbuildArchitectureOption: 'x64' +# msbuildArguments: '-p:AndroidPackageFormat=aab -p:AndroidUseAapt2=true' +# jdkOption: 'JDKVersion' + +#- task: DeleteFiles@1 +# displayName: 'Delete debug files' +# inputs: +# SourceFolder: '$(outputDirectory)' +# Contents: | +# **/**.pdb +# **/**.dll - task: CopyFiles@2 + displayName: 'Copy changelog to output' inputs: SourceFolder: '$(Build.SourcesDirectory)' Contents: 'changelog.md' TargetFolder: '$(outputDirectory)' - task: PublishBuildArtifacts@1 + displayName: 'Drop Artifact' inputs: PathtoPublish: '$(outputDirectory)' ArtifactName: 'bundle' From 4feb97d917cb599dbf78d94227c0a83b1dc383b8 Mon Sep 17 00:00:00 2001 From: Michael Gordeev Date: Fri, 31 Jan 2020 20:12:19 +0300 Subject: [PATCH 4/8] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 68e2261..84c862b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -26,30 +26,30 @@ steps: failBuildLevelSelector: 'Error' failBuildOnCodeIssues: false -- task: MSBuild@1 - displayName: 'Build Solution' +#- task: MSBuild@1 +# displayName: 'Build Solution' +# inputs: +# solution: '**/*.sln' +# msbuildArchitecture: x64 +# msbuildArguments: '-p:Configuration=Release -p:AndroidPackageFormat=aab -p:AndroidUseAapt2=true' + +- task: XamarinAndroid@1 inputs: - solution: '**/*.sln' - msbuildArchitecture: x64 - msbuildArguments: '-p:Configuration=Release -p:AndroidPackageFormat=aab -p:AndroidUseAapt2=true' + projectFile: '**/**.csproj' + outputDirectory: '$(outputDirectory)' + configuration: '$(buildConfiguration)' + msbuildVersionOption: 'latest' + msbuildArchitectureOption: 'x64' + msbuildArguments: ' /t:PackageForAndroid -t:SignAndroidPackage -p:AndroidPackageFormat=aab /p:Configuration=Release' + jdkOption: 'JDKVersion' -#- task: XamarinAndroid@1 -# inputs: -# projectFile: '**/**.csproj' -# outputDirectory: '$(outputDirectory)' -# configuration: '$(buildConfiguration)' -# msbuildVersionOption: 'latest' -# msbuildArchitectureOption: 'x64' -# msbuildArguments: '-p:AndroidPackageFormat=aab -p:AndroidUseAapt2=true' -# jdkOption: 'JDKVersion' - -#- task: DeleteFiles@1 -# displayName: 'Delete debug files' -# inputs: -# SourceFolder: '$(outputDirectory)' -# Contents: | -# **/**.pdb -# **/**.dll +- task: DeleteFiles@1 + displayName: 'Delete debug files' + inputs: + SourceFolder: '$(outputDirectory)' + Contents: | + **/**.pdb + **/**.dll - task: CopyFiles@2 displayName: 'Copy changelog to output' From 2b27acce6a349798feb4b9f27a0bb672659578c1 Mon Sep 17 00:00:00 2001 From: Michael Gordeev Date: Fri, 31 Jan 2020 20:50:03 +0300 Subject: [PATCH 5/8] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 84c862b..d70d1ca 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -26,14 +26,8 @@ steps: failBuildLevelSelector: 'Error' failBuildOnCodeIssues: false -#- task: MSBuild@1 -# displayName: 'Build Solution' -# inputs: -# solution: '**/*.sln' -# msbuildArchitecture: x64 -# msbuildArguments: '-p:Configuration=Release -p:AndroidPackageFormat=aab -p:AndroidUseAapt2=true' - - task: XamarinAndroid@1 + displayName: 'Build Solution' inputs: projectFile: '**/**.csproj' outputDirectory: '$(outputDirectory)' @@ -58,6 +52,13 @@ steps: Contents: 'changelog.md' TargetFolder: '$(outputDirectory)' +- task: PowerShell@2 + displayName: 'Update package name' + inputs: + targetType: 'inline' + script: 'get-childitem *-Signed.aab | foreach { rename-item $_ $_.Name.Replace("-Signed", "") }' + workingDirectory: '$(outputDirectory)' + - task: PublishBuildArtifacts@1 displayName: 'Drop Artifact' inputs: From c7f3cd6c9fde01ecdb9cdaa4ba1c05b700f4836a Mon Sep 17 00:00:00 2001 From: Michael Gordeev Date: Fri, 31 Jan 2020 21:01:57 +0300 Subject: [PATCH 6/8] Update azure-pipelines.yml for Azure Pipelines Reconfigured pipeline to deliver both .apk and .aab archives --- azure-pipelines.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d70d1ca..72fd465 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -27,7 +27,7 @@ steps: failBuildOnCodeIssues: false - task: XamarinAndroid@1 - displayName: 'Build Solution' + displayName: 'Build Solution (AppBundle)' inputs: projectFile: '**/**.csproj' outputDirectory: '$(outputDirectory)' @@ -37,6 +37,17 @@ steps: msbuildArguments: ' /t:PackageForAndroid -t:SignAndroidPackage -p:AndroidPackageFormat=aab /p:Configuration=Release' jdkOption: 'JDKVersion' +- task: XamarinAndroid@1 + displayName: 'Build Solution (APK)' + inputs: + projectFile: '**/**.csproj' + outputDirectory: '$(outputDirectory)' + configuration: 'Release (APK)' + msbuildVersionOption: 'latest' + msbuildArchitectureOption: 'x64' + msbuildArguments: ' /t:PackageForAndroid -t:SignAndroidPackage -p:AndroidPackageFormat=apk /p:Configuration="Release (APK)"' + jdkOption: 'JDKVersion' + - task: DeleteFiles@1 displayName: 'Delete debug files' inputs: @@ -56,7 +67,7 @@ steps: displayName: 'Update package name' inputs: targetType: 'inline' - script: 'get-childitem *-Signed.aab | foreach { rename-item $_ $_.Name.Replace("-Signed", "") }' + script: 'get-childitem *-Signed.* | foreach { rename-item $_ $_.Name.Replace("-Signed", "") }' workingDirectory: '$(outputDirectory)' - task: PublishBuildArtifacts@1 From 60c5a65b3c102ca710aa9fd126608165ee4f2093 Mon Sep 17 00:00:00 2001 From: Michael Gordeev Date: Fri, 31 Jan 2020 21:28:04 +0300 Subject: [PATCH 7/8] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 72fd465..223259f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -26,6 +26,16 @@ steps: failBuildLevelSelector: 'Error' failBuildOnCodeIssues: false +- task: XamarinAndroid@1 + displayName: 'Build Solution (APK)' + inputs: + projectFile: '**/**.csproj' + outputDirectory: '$(outputDirectory)' + configuration: 'Release (APK)' + msbuildVersionOption: 'latest' + msbuildArchitectureOption: 'x64' + jdkOption: 'JDKVersion' + - task: XamarinAndroid@1 displayName: 'Build Solution (AppBundle)' inputs: @@ -37,17 +47,6 @@ steps: msbuildArguments: ' /t:PackageForAndroid -t:SignAndroidPackage -p:AndroidPackageFormat=aab /p:Configuration=Release' jdkOption: 'JDKVersion' -- task: XamarinAndroid@1 - displayName: 'Build Solution (APK)' - inputs: - projectFile: '**/**.csproj' - outputDirectory: '$(outputDirectory)' - configuration: 'Release (APK)' - msbuildVersionOption: 'latest' - msbuildArchitectureOption: 'x64' - msbuildArguments: ' /t:PackageForAndroid -t:SignAndroidPackage -p:AndroidPackageFormat=apk /p:Configuration="Release (APK)"' - jdkOption: 'JDKVersion' - - task: DeleteFiles@1 displayName: 'Delete debug files' inputs: From c86524467803bf09994f7c2af8cb8d5a52275037 Mon Sep 17 00:00:00 2001 From: Michael Gordeev Date: Fri, 31 Jan 2020 21:36:47 +0300 Subject: [PATCH 8/8] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 223259f..dcdeef5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -26,16 +26,6 @@ steps: failBuildLevelSelector: 'Error' failBuildOnCodeIssues: false -- task: XamarinAndroid@1 - displayName: 'Build Solution (APK)' - inputs: - projectFile: '**/**.csproj' - outputDirectory: '$(outputDirectory)' - configuration: 'Release (APK)' - msbuildVersionOption: 'latest' - msbuildArchitectureOption: 'x64' - jdkOption: 'JDKVersion' - - task: XamarinAndroid@1 displayName: 'Build Solution (AppBundle)' inputs: @@ -47,6 +37,16 @@ steps: msbuildArguments: ' /t:PackageForAndroid -t:SignAndroidPackage -p:AndroidPackageFormat=aab /p:Configuration=Release' jdkOption: 'JDKVersion' +- task: XamarinAndroid@1 + displayName: 'Build Solution (APK)' + inputs: + projectFile: '**/**.csproj' + outputDirectory: '$(outputDirectory)' + configuration: 'Release (APK)' + msbuildVersionOption: 'latest' + msbuildArchitectureOption: 'x64' + jdkOption: 'JDKVersion' + - task: DeleteFiles@1 displayName: 'Delete debug files' inputs: