@@ -11,7 +11,6 @@ var TARGET = Argument ("t", Argument ("target", "Default"));
1111var BUILD_CONFIG = Argument ( "config" , "Release" ) ;
1212var VERBOSITY = Argument ( "v" , Argument ( "verbosity" , Verbosity . Normal ) ) ;
1313var MAX_CPU_COUNT = Argument ( "maxcpucount" , 0 ) ;
14- var CONFIGURATION = Argument ( "c" , Argument ( "configuration" , "Release" ) ) ;
1514
1615// Lists all the artifacts and their versions for com.android.support.*
1716// https://dl.google.com/dl/android/maven2/com/android/support/group-index.xml
@@ -24,6 +23,8 @@ var REF_DOCS_URL = "https://bosstoragemirror.blob.core.windows.net/android-docs-
2423var XAMARIN_ANDROID_PATH = EnvironmentVariable ( "XAMARIN_ANDROID_PATH" ) ;
2524var ANDROID_SDK_BASE_VERSION = "v1.0" ;
2625var ANDROID_SDK_VERSION = "v9.0" ;
26+ string AndroidSdkBuildTools = $ "29.0.2";
27+ 2728if ( string . IsNullOrEmpty ( XAMARIN_ANDROID_PATH ) ) {
2829 if ( IsRunningOnWindows ( ) ) {
2930 var vsInstallPath = VSWhereLatest ( new VSWhereLatestSettings { Requires = "Component.Xamarin" } ) ;
@@ -48,6 +49,12 @@ var REQUIRED_DOTNET_TOOLS = new [] {
4849 "xamarin.androidx.migration.tool"
4950} ;
5051
52+ string [ ] Configs = new [ ]
53+ {
54+ "Debug" ,
55+ "Release"
56+ } ;
57+ 5158// Log some variables
5259Information ( "XAMARIN_ANDROID_PATH: {0}" , XAMARIN_ANDROID_PATH ) ;
5360Information ( "ANDROID_SDK_VERSION: {0}" , ANDROID_SDK_VERSION ) ;
@@ -131,11 +138,14 @@ Task("binderate")
131138Task ( "libs" )
132139 . Does ( ( ) =>
133140{
134- MSBuild ( "./generated/AndroidSupport.sln" , c => {
135- c . Configuration = "Release" ;
136- c . Restore = true ;
137- c . Properties . Add ( "DesignTimeBuild" , new [ ] { "false" } ) ;
138- } ) ;
141+ foreach ( string config in Configs )
142+ {
143+ MSBuild ( "./generated/AndroidSupport.sln" , c => {
144+ c . Configuration = config ;
145+ c . Restore = true ;
146+ c . Properties . Add ( "DesignTimeBuild" , new [ ] { "false" } ) ;
147+ } ) ;
148+ }
139149} ) ;
140150
141151Task ( "nuget" )
@@ -184,18 +194,22 @@ Task("samples")
184194 EnsureDirectoryExists ( packagesPath ) ;
185195 CleanDirectories ( packagesPath ) ;
186196
187- // build the samples
188- var settings = new MSBuildSettings ( )
189- . SetConfiguration ( CONFIGURATION )
190- . SetVerbosity ( VERBOSITY )
191- . SetMaxCpuCount ( 0 )
192- . EnableBinaryLogger ( "./output/samples.binlog" )
193- . WithRestore ( )
194- . WithProperty ( "RestorePackagesPath" , packagesPath )
195- . WithProperty ( "DesignTimeBuild" , "false" )
196- . WithProperty ( "AndroidSdkBuildToolsVersion" , "29.0.2" ) ;
197- 198- MSBuild ( "./samples/BuildAll/BuildAll.sln" , settings ) ;
197+ 198+ foreach ( string config in Configs )
199+ {
200+ // build the samples
201+ var settings = new MSBuildSettings ( )
202+ . SetConfiguration ( config )
203+ . SetVerbosity ( VERBOSITY )
204+ . SetMaxCpuCount ( 0 )
205+ . EnableBinaryLogger ( "./output/samples.binlog" )
206+ . WithRestore ( )
207+ . WithProperty ( "RestorePackagesPath" , packagesPath )
208+ . WithProperty ( "DesignTimeBuild" , "false" )
209+ . WithProperty ( "AndroidSdkBuildToolsVersion" , AndroidSdkBuildTools ) ;
210+ 211+ MSBuild ( "./samples/BuildAll/BuildAll.sln" , settings ) ;
212+ }
199213} ) ;
200214
201215Task ( "merge" )
@@ -233,13 +247,13 @@ Task ("clean")
233247 . Does ( ( ) =>
234248{
235249 if ( DirectoryExists ( "./externals" ) )
236- DeleteDirectory ( "./externals" , true ) ;
250+ DeleteDirectory ( "./externals" , new DeleteDirectorySettings { Recursive = true , Force = true } ) ;
237251
238252 if ( DirectoryExists ( "./generated" ) )
239- DeleteDirectory ( "./generated" , true ) ;
253+ DeleteDirectory ( "./generated" , new DeleteDirectorySettings { Recursive = true , Force = true } ) ;
240254
241255 if ( DirectoryExists ( "./util/binderator" ) )
242- DeleteDirectory ( "./util/binderator" , true ) ;
256+ DeleteDirectory ( "./util/binderator" , new DeleteDirectorySettings { Recursive = true , Force = true } ) ;
243257
244258 CleanDirectories ( "./**/packages" ) ;
245259} ) ;
0 commit comments