@@ -48,9 +48,15 @@ var MONODROID_PATH = MONODROID_BASE_PATH.Combine(ANDROID_SDK_VERSION);
4848
4949var ANDROIDX_MAPPER_EXE = MakeAbsolute ( ( FilePath ) $ "util/AndroidXMapper/AndroidXMapper/bin/{ BUILD_CONFIG } /net47/AndroidXMapper.exe") ;
5050
51+ var BUILD_NUMBER = EnvironmentVariable ( "BUILD_NUMBER" ) ?? "" ;
52+ if ( string . IsNullOrEmpty ( BUILD_NUMBER ) ) {
53+ BUILD_NUMBER = "0" ;
54+ }
55+
5156Information ( "MONODROID_BASE_PATH: {0}" , MONODROID_BASE_PATH ) ;
5257Information ( "MONODROID_PATH: {0}" , MONODROID_PATH ) ;
5358Information ( "ANDROIDX_MAPPER_EXE: {0}" , ANDROIDX_MAPPER_EXE ) ;
59+ Information ( "BUILD_NUMBER: {0}" , BUILD_NUMBER ) ;
5460
5561// You shouldn't have to configure anything below here
5662// ######################################################
@@ -110,6 +116,19 @@ Task("nuget")
110116 . IsDependentOn ( "libs" )
111117 . Does ( ( ) =>
112118{
119+ // package the stable release
120+ MSBuild ( "./generated/AndroidX.sln" , c => {
121+ c . Configuration = BUILD_CONFIG ;
122+ c . MaxCpuCount = 0 ;
123+ c . Verbosity = VERBOSITY ;
124+ c . Targets . Clear ( ) ;
125+ c . Targets . Add ( "Pack" ) ;
126+ c . Properties . Add ( "PackageOutputPath" , new [ ] { MakeAbsolute ( new FilePath ( "./output" ) ) . FullPath } ) ;
127+ c . Properties . Add ( "PackageRequireLicenseAcceptance" , new [ ] { "true" } ) ;
128+ c . Properties . Add ( "DesignTimeBuild" , new [ ] { "false" } ) ;
129+ c . Properties . Add ( "AndroidSdkBuildToolsVersion" , new [ ] { "28.0.3" } ) ;
130+ } ) ;
131+ // package the preview release
113132 MSBuild ( "./generated/AndroidX.sln" , c => {
114133 c . Configuration = BUILD_CONFIG ;
115134 c . MaxCpuCount = 0 ;
@@ -120,6 +139,7 @@ Task("nuget")
120139 c . Properties . Add ( "PackageRequireLicenseAcceptance" , new [ ] { "true" } ) ;
121140 c . Properties . Add ( "DesignTimeBuild" , new [ ] { "false" } ) ;
122141 c . Properties . Add ( "AndroidSdkBuildToolsVersion" , new [ ] { "28.0.3" } ) ;
142+ c . Properties . Add ( "PackageVersionSuffix" , new [ ] { "-preview-" + BUILD_NUMBER } ) ;
123143 } ) ;
124144
125145 var xmlns = ( XNamespace ) "http://schemas.microsoft.com/developer/msbuild/2003" ;
0 commit comments