@@ -41,37 +41,51 @@ var BUILD_CONFIG = Argument ("config", "Release");
41
41
// Master list of all the packages in the repo:
42
42
// https://dl.google.com/dl/android/maven2/master-index.xml
43
43
44
- var NUGET_VERSION = "26.1 .0 .2 ";
45
- var COMPONENT_VERSION = "26.1 .0 .0 ";
46
- var AAR_VERSION = "26.1 .0 ";
47
- var DOC_VERSION = "2017-10-02" ;
44
+ var NUGET_PRE = "";
45
+
46
+ var NUGET_VERSION = "27.0 .2 " + NUGET_PRE ;
47
+ var COMPONENT_VERSION = "27.0 .2 .0 ";
48
+ var AAR_VERSION = "27.0 .2 ";
49
+
50
+ var ARCH_CORE_COMMON_AAR_VERSION = "1.0 .0 ";
51
+ var ARCH_CORE_RUNTIME_AAR_VERSION = "1.0 .0 ";
52
+ var ARCH_LIFECYCLE_COMMON_AAR_VERSION = "1.0 .3 ";
53
+ var ARCH_LIFECYCLE_RUNTIME_AAR_VERSION = "1.0 .3 ";
54
+ var ARCH_LIFECYCLE_EXTENSIONS_AAR_VERSION = "1.0 .0 ";
55
+
56
+ var ARCH_CORE_COMMON_NUGET_VERSION = "1.0 .0 " + NUGET_PRE ;
57
+ var ARCH_CORE_RUNTIME_NUGET_VERSION = "1.0 .0 " + NUGET_PRE ;
58
+ var ARCH_LIFECYCLE_COMMON_NUGET_VERSION = "1.0 .3 " + NUGET_PRE ;
59
+ var ARCH_LIFECYCLE_RUNTIME_NUGET_VERSION = "1.0 .3 " + NUGET_PRE ;
60
+ var ARCH_LIFECYCLE_EXTENSIONS_NUGET_VERSION = "1.0 .0 " + NUGET_PRE ;
61
+
62
+
63
+ var DOC_VERSION = "2017-12-18" ;
48
64
49
65
var SUPPORT_PKG_NAME = "com.android.support" ;
50
66
var ARCH_LIFECYCLE_PKG_NAME = "android.arch.lifecycle" ;
51
67
var ARCH_CORE_PKG_NAME = "android.arch.core" ;
52
68
53
69
// FROM: https://dl.google.com/android/repository/addon2-1.xml
54
70
var MAVEN_REPO_URL = "https://dl.google.com/dl/android/maven2/" ;
55
- var BUILD_TOOLS_URL = "https://dl-ssl.google.com/android/repository/build-tools_r26 -macosx.zip" ;
71
+ var BUILD_TOOLS_URL = "https://dl-ssl.google.com/android/repository/build-tools_r27 -macosx.zip" ;
56
72
var ANDROID_SDK_VERSION = IsRunningOnWindows ( ) ? "v8.0" : "android-26" ;
57
- var RENDERSCRIPT_FOLDER = "android-8.0.0" ;
73
+ var RENDERSCRIPT_FOLDER = "android-8.1.0" ;
74
+ var REFERENCE_DOCS_URL = "https://developer.android.com/reference/" ;
75
+ var REFERENCE_DOCS_PACKAGELIST_URL = REFERENCE_DOCS_URL + "android/support/package-list" ;
58
76
59
77
// We grab the previous release's api-info.xml to use as a comparison for this build's generated info to make an api-diff
60
- var BASE_API_INFO_URL = EnvironmentVariable ( "MONO_API_INFO_XML_URL" ) ?? "https://github.com/xamarin/AndroidSupportComponents/releases/download/25.4.0.2 /api-info.xml" ;
78
+ var BASE_API_INFO_URL = EnvironmentVariable( "MONO_API_INFO_XML_URL") ?? " https : //github.com/xamarin/AndroidSupportComponents/releases/download/26.1.0 /api-info.xml";
61
79
62
- var CPU_COUNT = System . Environment . ProcessorCount ;
80
+ var CPU_COUNT = 1 ;
63
81
var USE_MSBUILD_ON_MAC = true;
64
82
65
- // MSBUILD has issues on *nix/osx with a different CPU Count being specified
66
- if ( ! IsRunningOnWindows ( ) )
67
- CPU_COUNT = 1 ;
68
-
69
83
var ARTIFACTS = new [ ] {
70
- new ArtifactInfo ( ARCH_CORE_PKG_NAME , "common" , "Xamarin.Android.Arch.Core.Common" , "1.0.0" , "1.0.0" , "1.0.0.0" , true ) { PathPrefix = "arch-core/" } ,
71
- new ArtifactInfo ( ARCH_CORE_PKG_NAME , "runtime" , "Xamarin.Android.Arch.Core.Runtime" , "1.0.0" , "1.0.0" , "1.0.0.0" ) { PathPrefix = "arch-core/" } ,
72
- new ArtifactInfo ( ARCH_LIFECYCLE_PKG_NAME , "common" , "Xamarin.Android.Arch.Lifecycle.Common" , "1.0.3" , "1.0.3" , "1.0.3.0" , true ) { PathPrefix = "arch-lifecycle/" } ,
73
- new ArtifactInfo ( ARCH_LIFECYCLE_PKG_NAME , "runtime" , "Xamarin.Android.Arch.Lifecycle.Runtime" , "1.0.3" , "1.0.3" , "1.0.3.0" ) { PathPrefix = "arch-lifecycle/" } ,
74
- new ArtifactInfo ( ARCH_LIFECYCLE_PKG_NAME , "extensions" , "Xamarin.Android.Arch.Lifecycle.Extensions" , "1.0.0" , "1.0.0" , "1.0.0.0" ) { PathPrefix = "arch-lifecycle/" } ,
84
+ new ArtifactInfo ( ARCH_CORE_PKG_NAME , "common" , "Xamarin.Android.Arch.Core.Common" , ARCH_CORE_COMMON_AAR_VERSION , ARCH_CORE_COMMON_NUGET_VERSION , "1.0.0.0" , true ) { PathPrefix = "arch-core/" } ,
85
+ new ArtifactInfo ( ARCH_CORE_PKG_NAME , "runtime" , "Xamarin.Android.Arch.Core.Runtime" , ARCH_CORE_RUNTIME_AAR_VERSION , ARCH_CORE_RUNTIME_NUGET_VERSION , "1.0.0.0" ) { PathPrefix = "arch-core/" } ,
86
+ new ArtifactInfo ( ARCH_LIFECYCLE_PKG_NAME , "common" , "Xamarin.Android.Arch.Lifecycle.Common" , ARCH_LIFECYCLE_COMMON_AAR_VERSION , ARCH_LIFECYCLE_COMMON_NUGET_VERSION , "1.0.3.0" , true ) { PathPrefix = "arch-lifecycle/" } ,
87
+ new ArtifactInfo ( ARCH_LIFECYCLE_PKG_NAME , "runtime" , "Xamarin.Android.Arch.Lifecycle.Runtime" , ARCH_LIFECYCLE_RUNTIME_AAR_VERSION , ARCH_LIFECYCLE_RUNTIME_NUGET_VERSION , "1.0.3.0" ) { PathPrefix = "arch-lifecycle/" } ,
88
+ new ArtifactInfo ( ARCH_LIFECYCLE_PKG_NAME , "extensions" , "Xamarin.Android.Arch.Lifecycle.Extensions" , ARCH_LIFECYCLE_EXTENSIONS_AAR_VERSION , ARCH_LIFECYCLE_EXTENSIONS_NUGET_VERSION , "1.0.0.0" ) { PathPrefix = "arch-lifecycle/" } ,
75
89
76
90
//new ArtifactInfo (SUPPORT_PKG_NAME, "support-v4", "Xamarin.Android.Support.v4", AAR_VERSION, NUGET_VERSION, COMPONENT_VERSION),
77
91
new ArtifactInfo ( SUPPORT_PKG_NAME , "support-v13" , "Xamarin.Android.Support.v13" , AAR_VERSION , NUGET_VERSION , COMPONENT_VERSION ) ,
@@ -92,6 +106,7 @@ var ARTIFACTS = new [] {
92
106
new ArtifactInfo ( SUPPORT_PKG_NAME , "animated-vector-drawable" , "Xamarin.Android.Support.Animated.Vector.Drawable" , AAR_VERSION , NUGET_VERSION , COMPONENT_VERSION ) ,
93
107
new ArtifactInfo ( SUPPORT_PKG_NAME , "support-vector-drawable" , "Xamarin.Android.Support.Vector.Drawable" , AAR_VERSION , NUGET_VERSION , COMPONENT_VERSION ) ,
94
108
new ArtifactInfo ( SUPPORT_PKG_NAME , "support-compat" , "Xamarin.Android.Support.Compat" , AAR_VERSION , NUGET_VERSION , COMPONENT_VERSION ) ,
109
+ new ArtifactInfo ( SUPPORT_PKG_NAME , "support-content" , "Xamarin.Android.Support.Content" , AAR_VERSION , NUGET_VERSION , COMPONENT_VERSION ) ,
95
110
new ArtifactInfo ( SUPPORT_PKG_NAME , "support-core-utils" , "Xamarin.Android.Support.Core.Utils" , AAR_VERSION , NUGET_VERSION , COMPONENT_VERSION ) ,
96
111
new ArtifactInfo ( SUPPORT_PKG_NAME , "support-core-ui" , "Xamarin.Android.Support.Core.UI" , AAR_VERSION , NUGET_VERSION , COMPONENT_VERSION ) ,
97
112
new ArtifactInfo ( SUPPORT_PKG_NAME , "support-dynamic-animation" , "Xamarin.Android.Support.Dynamic.Animation" , AAR_VERSION , NUGET_VERSION , COMPONENT_VERSION ) ,
@@ -128,6 +143,7 @@ class ArtifactInfo
128
143
NuGetVersion = nugetVersion;
129
144
ComponentVersion = componentVersion;
130
145
IsJar = isJar;
146
+ PathPrefix = string . Empty ;
131
147
}
132
148
133
149
public string Package { get ; set ; }
@@ -141,8 +157,10 @@ class ArtifactInfo
141
157
}
142
158
143
159
var MONODROID_PATH = "/Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mandroid/platforms/" + ANDROID_SDK_VERSION + "/" ;
144
- if ( IsRunningOnWindows ( ) )
145
- MONODROID_PATH = MakeAbsolute ( new DirectoryPath ( Environment . GetFolderPath ( Environment . SpecialFolder . ProgramFilesX86 ) ) . Combine ( "Reference Assemblies/Microsoft/Framework/MonoAndroid/" + ANDROID_SDK_VERSION + "/" ) ) . FullPath ;
160
+ if ( IsRunningOnWindows ( ) ) {
161
+ var vsInstallPath = VSWhereLatest ( new VSWhereLatestSettings { Requires = "Component.Xamarin" } ) ;
162
+ MONODROID_PATH = vsInstallPath. Combine ( "Common7/IDE/ReferenceAssemblies/Microsoft/Framework/MonoAndroid/" + ANDROID_SDK_VERSION ) . FullPath ;
163
+ }
146
164
147
165
var MSCORLIB_PATH = "/Library/Frameworks/Xamarin.Android.framework/Libraries/mono/2.1/" ;
148
166
if ( IsRunningOnWindows ( ) ) {
@@ -155,6 +173,9 @@ if (IsRunningOnWindows ()) {
155
173
MSCORLIB_PATH = MakeAbsolute ( DOTNETDIR . Combine ( "Framework/v4.0.30319/" ) ) . FullPath ;
156
174
}
157
175
176
+ Information ( "MONODROID_PATH: {0}" , MONODROID_PATH ) ;
177
+ Information ( "MSCORLIB_PATH: {0}" , MSCORLIB_PATH ) ;
178
+
158
179
var nugetInfos = ARTIFACTS . Select ( a => new NuGetInfo { NuSpec = "./" + a . PathPrefix + a . ArtifactId + "/nuget/" + a . NugetId + ".nuspec" , Version = a . NuGetVersion , RequireLicenseAcceptance = true } ) . ToList ( ) ;
159
180
nugetInfos . Add ( new NuGetInfo { NuSpec = "./support-v4/nuget/Xamarin.Android.Support.v4.nuspec" , Version = NUGET_VERSION , RequireLicenseAcceptance = true } ) ;
160
181
@@ -424,6 +445,32 @@ Task ("nuget-setup")
424
445
}
425
446
} ) ;
426
447
448
+ Task ( "ci-setup" )
449
+ . WithCriteria ( ! BuildSystem . IsLocalBuild )
450
+ . Does ( ( ) =>
451
+ {
452
+ var buildCommit = "DEV" ;
453
+ var buildNumber = "DEBUG" ;
454
+ var buildTimestamp = DateTime . UtcNow . ToString ( ) ;
455
+
456
+ if ( BuildSystem . IsRunningOnJenkins ) {
457
+ buildNumber = BuildSystem . Jenkins . Environment . Build . BuildTag ;
458
+ buildCommit = EnvironmentVariable ( "GIT_COMMIT" ) ?? buildCommit ;
459
+ } else if ( BuildSystem . IsRunningOnVSTS ) {
460
+ buildNumber = BuildSystem . TFBuild . Environment . Build . Number ;
461
+ buildCommit = BuildSystem . TFBuild . Environment . Repository . SourceVersion ;
462
+ }
463
+
464
+ foreach ( var art in ARTIFACTS ) {
465
+ var glob = "./" + art . PathPrefix + art . ArtifactId + "/**/source/**/AssemblyInfo.cs" ;
466
+
467
+ ReplaceTextInFiles ( glob , "{NUGET_VERSION}" , art . NuGetVersion ) ;
468
+ ReplaceTextInFiles ( glob , "{BUILD_COMMIT}" , buildCommit ) ;
469
+ ReplaceTextInFiles ( glob , "{BUILD_NUMBER}" , buildNumber ) ;
470
+ ReplaceTextInFiles ( glob , "{BUILD_TIMESTAMP}" , buildTimestamp ) ;
471
+ }
472
+ } ) ;
473
+
427
474
Task ( "component-setup" )
428
475
. Does ( ( ) =>
429
476
{
@@ -570,15 +617,15 @@ Task ("droiddocs")
570
617
571
618
if ( ! FileExists ( compressedDocsFile ) ) {
572
619
if ( IsRunningOnWindows ( ) )
573
- StartProcess ( "util/droiddocs.exe" , "scrape --out ./docs --url https://developer.android.com/reference/ --package-filter \" android.support\" " ) ;
620
+ StartProcess ( "util/droiddocs.exe" , "scrape --out ./docs --url " + REFERENCE_DOCS_URL + " --package-list-source " + REFERENCE_DOCS_PACKAGELIST_URL + " --package-filter \" android.support\" ") ;
574
621
else
575
- StartProcess ( "mono" , "util/droiddocs.exe scrape --out ./docs --url https://developer.android.com/reference/ --package-filter \" android.support\" " ) ;
622
+ StartProcess ( "mono" , "util/droiddocs.exe scrape --out ./docs --url " + REFERENCE_DOCS_URL + " --package-list-source " + REFERENCE_DOCS_PACKAGELIST_URL + " --package-filter \" android.support\" ") ;
576
623
577
624
// Scraper misses a few files we require
578
625
EnsureDirectoryExists ( "./docs/reference" ) ;
579
- DownloadFile ( "https://developer.android.com/reference/ classes.html", "./docs/reference/classes.html" ) ;
626
+ DownloadFile ( REFERENCE_DOCS_URL + " classes.html", "./docs/reference/classes.html" ) ;
580
627
CopyFile ( "./docs/reference/classes.html" , "./docs/reference/index.html" ) ;
581
- DownloadFile ( "https://developer.android.com/reference/ packages.html", "./docs/reference/packages.html" ) ;
628
+ DownloadFile ( REFERENCE_DOCS_URL + " packages.html", "./docs/reference/packages.html" ) ;
582
629
583
630
584
631
ZipCompress ( "./docs" , compressedDocsFile ) ;
@@ -596,27 +643,6 @@ Task ("droiddocs")
596
643
}
597
644
} ) ;
598
645
599
- Task ( "ci-setup" )
600
- . WithCriteria ( ! BuildSystem . IsLocalBuild )
601
- . Does ( ( ) =>
602
- {
603
- var buildCommit = "DEV" ;
604
- var buildNumber = "DEBUG" ;
605
- var buildTimestamp = DateTime . UtcNow . ToString ( ) ;
606
-
607
- if ( BuildSystem . IsRunningOnJenkins ) {
608
- buildNumber = BuildSystem . Jenkins . Environment . Build . BuildTag ;
609
- buildCommit = EnvironmentVariable ( "GIT_COMMIT" ) ?? buildCommit ;
610
- } else if ( BuildSystem . IsRunningOnVSTS ) {
611
- buildNumber = BuildSystem . TFBuild . Environment . Build . Number ;
612
- buildCommit = BuildSystem . TFBuild . Environment . Repository . SourceVersion ;
613
- }
614
-
615
- ReplaceTextInFiles ( "./**/source/**/AssemblyInfo.cs" , "{BUILD_COMMIT}" , buildCommit ) ;
616
- ReplaceTextInFiles ( "./**/source/**/AssemblyInfo.cs" , "{BUILD_NUMBER}" , buildNumber ) ;
617
- ReplaceTextInFiles ( "./**/source/**/AssemblyInfo.cs" , "{BUILD_TIMESTAMP}" , buildTimestamp ) ;
618
- } ) ;
619
-
620
646
Task ( "clean" )
621
647
. IsDependentOn ( "clean-base" )
622
648
. Does ( ( ) =>
0 commit comments