|
3 | 3 | <!-- Imports ========================================================= --> |
4 | 4 | <Import Project="src/Directory.Build.props" /> |
5 | 5 |
|
| 6 | + <!-- Import each project's Versions.props to apply default version numbers in Package mode. --> |
| 7 | + <Import Project="src/Microsoft.SqlServer.Server/Versions.props" /> |
| 8 | + <Import Project="src/Microsoft.Data.SqlClient.Internal/Logging/src/Versions.props" /> |
| 9 | + <Import Project="src/Microsoft.Data.SqlClient.Extensions/Abstractions/src/Versions.props" /> |
| 10 | + <Import Project="src/Microsoft.Data.SqlClient/Versions.props" /> |
| 11 | + <Import Project="src/Microsoft.Data.SqlClient.Extensions/Azure/src/Versions.props" /> |
| 12 | + <Import Project="src/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider/src/Versions.props" /> |
| 13 | + |
6 | 14 | <!-- Build Parameters ================================================ --> |
7 | 15 | <!-- @TODO: Add a Help target that lists targets and these descriptions of the parameters --> |
8 | 16 | <PropertyGroup> |
|
109 | 117 | Default value: [blank] |
110 | 118 | Example: 1.0.1-dev2345 |
111 | 119 | --> |
112 | | - <PackageVersionAbstractions Condition="'$(PackageVersionAbstractions)' == ''" /> |
| 120 | + <PackageVersionAbstractions Condition="'$(PackageVersionAbstractions)' == ''">$(AbstractionsPackageVersion)</PackageVersionAbstractions> |
113 | 121 | <PackageVersionAbstractionsArgument Condition="'$(PackageVersionAbstractions)' != ''"> |
114 | 122 | -p:AbstractionsPackageVersion=$(PackageVersionAbstractions) |
115 | 123 | </PackageVersionAbstractionsArgument> |
|
125 | 133 | Default value: [blank] |
126 | 134 | Example: 1.0.1-dev2345 |
127 | 135 | --> |
128 | | - <PackageVersionAkvProvider Condition="'$(PackageVersionAkvProvider)' == ''" /> |
| 136 | + <PackageVersionAkvProvider Condition="'$(PackageVersionAkvProvider)' == ''">$(AkvProviderPackageVersion)</PackageVersionAkvProvider> |
129 | 137 | <PackageVersionAkvProviderArgument Condition="'$(PackageVersionAkvProvider)' != ''"> |
130 | 138 | -p:AkvProviderPackageVersion=$(PackageVersionAkvProvider) |
131 | 139 | </PackageVersionAkvProviderArgument> |
|
141 | 149 | Default value: [blank] |
142 | 150 | Example: 1.0.1-dev2345 |
143 | 151 | --> |
144 | | - <PackageVersionAzure Condition="'$(PackageVersionAzure)' == ''" /> |
| 152 | + <PackageVersionAzure Condition="'$(PackageVersionAzure)' == ''">$(AzurePackageVersion)</PackageVersionAzure> |
145 | 153 | <PackageVersionAzureArgument Condition="'$(PackageVersionAzure)' != ''"> |
146 | | - -p:AzurePackageVersion=$(PackageVersionAbstractions) |
| 154 | + -p:AzurePackageVersion=$(PackageVersionAzure) |
147 | 155 | </PackageVersionAzureArgument> |
148 | 156 |
|
149 | 157 | <!-- |
|
166 | 174 | Default value: [blank] |
167 | 175 | Example: 1.0.1-dev2345 |
168 | 176 | --> |
169 | | - <PackageVersionLogging Condition="'$(PackageVersionLogging)' == ''" /> |
| 177 | + <PackageVersionLogging Condition="'$(PackageVersionLogging)' == ''">$(LoggingPackageVersion)</PackageVersionLogging> |
170 | 178 | <PackageVersionLoggingArgument Condition="'$(PackageVersionLogging)' != ''"> |
171 | 179 | -p:LoggingPackageVersion=$(PackageVersionLogging) |
172 | 180 | </PackageVersionLoggingArgument> |
|
190 | 198 | Default value: [blank] |
191 | 199 | Example: 7.0.0-preview4 |
192 | 200 | --> |
193 | | - <PackageVersionSqlClient Condition="'$(PackageVersionSqlClient)' == ''" /> |
| 201 | + <PackageVersionSqlClient Condition="'$(PackageVersionSqlClient)' == ''">$(SqlClientPackageVersion)</PackageVersionSqlClient> |
194 | 202 | <PackageVersionSqlClientArgument Condition="'$(PackageVersionSqlClient)' != ''"> |
195 | 203 | -p:SqlClientPackageVersion=$(PackageVersionSqlClient) |
196 | 204 | </PackageVersionSqlClientArgument> |
|
204 | 212 | Default value: [blank] |
205 | 213 | Example: 1.0.0-dev2345 |
206 | 214 | --> |
207 | | - <PackageVersionSqlServer Condition="'$(PackageVersionSqlServer)' == ''" /> |
| 215 | + <PackageVersionSqlServer Condition="'$(PackageVersionSqlServer)' == ''">$(SqlServerPackageVersion)</PackageVersionSqlServer> |
208 | 216 | <PackageVersionSqlServerArgument Condition="'$(PackageVersionSqlServer)' != ''"> |
209 | 217 | -p:SqlServerPackageVersion=$(PackageVersionSqlServer) |
210 | 218 | </PackageVersionSqlServerArgument> |
|
216 | 224 | references (eg, Abstractions from SqlClient) will be made as project references. If |
217 | 225 | set to "Package", package references will be made instead. When running in |
218 | 226 | package mode, target versions can be specified via PackageVersion* build |
219 | | - parameters. If these are not provided, the central feed version will be used |
220 | | - instead (see Directory.Packages.props). When running in project mode, the |
| 227 | + parameters. If these are not provided, defaults are evaluated from each |
| 228 | + package's Versions.props and applied via Directory.Packages.props. When |
| 229 | + running in project mode, the |
221 | 230 | dependencies will be built automatically. |
222 | 231 |
|
223 | 232 | Applies to: TestSqlClientFunctional, TestSqlClientManual |
|
231 | 240 | <ReferenceTypeArgument Condition="'$(ReferenceType.ToLower())' == 'package'"> |
232 | 241 | -p:ReferenceType=Package |
233 | 242 | </ReferenceTypeArgument> |
234 | | - |
235 | 243 | <!-- |
236 | 244 | SigningKeyPath |
237 | 245 | Applies to: Build*, Pack* |
|
395 | 403 | PlatformNotSupportedException. It generates the source for this using GenAPI which is built as |
396 | 404 | the first step of this target. |
397 | 405 | --> |
398 | | - <Target Name="BuildSqlClientNotSupported"> |
| 406 | + <PropertyGroup> |
| 407 | + <BuildSqlClientNotSupportedDependsOn Condition="'$(ReferenceType.ToLower())' == 'package'">PackAbstractions</BuildSqlClientNotSupportedDependsOn> |
| 408 | + </PropertyGroup> |
| 409 | + <Target Name="BuildSqlClientNotSupported" DependsOnTargets="$(BuildSqlClientNotSupportedDependsOn)"> |
399 | 410 | <PropertyGroup> |
400 | 411 | <DotnetCommand> |
401 | 412 | "$(DotnetPath)dotnet" build "$(GenApiProjectPath)" |
|
429 | 440 | $(ReferenceTypeArgument) |
430 | 441 | $(PackageVersionAbstractionsArgument) |
431 | 442 | $(PackageVersionLoggingArgument) |
| 443 | + $(PackageVersionSqlServerArgument) |
432 | 444 | </DotnetCommand> |
433 | 445 | <!-- Convert more than one whitespace character into one space --> |
434 | 446 | <DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand> |
|
439 | 451 | </Target> |
440 | 452 |
|
441 | 453 | <!-- BuildSqlClientRef: Builds the ref binaries project for SqlClient, which is OS-agnostic --> |
442 | | - <Target Name="BuildSqlClientRef"> |
| 454 | + <PropertyGroup> |
| 455 | + <BuildSqlClientRefDependsOn Condition="'$(ReferenceType.ToLower())' == 'package'">PackAbstractions</BuildSqlClientRefDependsOn> |
| 456 | + </PropertyGroup> |
| 457 | + <Target Name="BuildSqlClientRef" DependsOnTargets="$(BuildSqlClientRefDependsOn)"> |
443 | 458 | <PropertyGroup> |
444 | 459 | <DotnetCommand> |
445 | 460 | "$(DotnetPath)dotnet" build $(SqlClientRefProjectPath) |
|
464 | 479 | </Target> |
465 | 480 |
|
466 | 481 | <!-- BuildSqlClientUnix: Builds all unix-specific SqlClient binaries --> |
467 | | - <Target Name="BuildSqlClientUnix"> |
| 482 | + <PropertyGroup> |
| 483 | + <BuildSqlClientUnixDependsOn Condition="'$(ReferenceType.ToLower())' == 'package'">PackAbstractions;PackLogging;PackSqlServer</BuildSqlClientUnixDependsOn> |
| 484 | + </PropertyGroup> |
| 485 | + <Target Name="BuildSqlClientUnix" DependsOnTargets="$(BuildSqlClientUnixDependsOn)"> |
468 | 486 | <PropertyGroup> |
469 | 487 | <DotnetCommand> |
470 | 488 | "$(DotnetPath)dotnet" build $(SqlClientProjectPath) |
|
481 | 499 | $(ReferenceTypeArgument) |
482 | 500 | $(PackageVersionAbstractionsArgument) |
483 | 501 | $(PackageVersionLoggingArgument) |
| 502 | + $(PackageVersionSqlServerArgument) |
484 | 503 | </DotnetCommand> |
485 | 504 | <!-- Convert more than one whitespace character into one space --> |
486 | 505 | <DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand> |
|
491 | 510 | </Target> |
492 | 511 |
|
493 | 512 | <!-- BuildSqlClientWindows: Builds all windows-specific SqlClient binaries --> |
494 | | - <Target Name="BuildSqlClientWindows"> |
| 513 | + <PropertyGroup> |
| 514 | + <BuildSqlClientWindowsDependsOn Condition="'$(ReferenceType.ToLower())' == 'package'">PackAbstractions;PackLogging;PackSqlServer</BuildSqlClientWindowsDependsOn> |
| 515 | + </PropertyGroup> |
| 516 | + <Target Name="BuildSqlClientWindows" DependsOnTargets="$(BuildSqlClientWindowsDependsOn)"> |
495 | 517 | <PropertyGroup> |
496 | 518 | <DotnetCommand> |
497 | 519 | "$(DotnetPath)dotnet" build $(SqlClientProjectPath) |
|
508 | 530 | $(ReferenceTypeArgument) |
509 | 531 | $(PackageVersionAbstractionsArgument) |
510 | 532 | $(PackageVersionLoggingArgument) |
| 533 | + $(PackageVersionSqlServerArgument) |
511 | 534 | </DotnetCommand> |
512 | 535 | <!-- Convert more than one whitespace character into one space --> |
513 | 536 | <DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand> |
|
670 | 693 | </PropertyGroup> |
671 | 694 |
|
672 | 695 | <!-- BuildAkvProvider: Builds Microsoft.Data.SqlClient.AlwaysEncrpyted.AzureKeyVaultProvider --> |
673 | | - <Target Name="BuildAkvProvider"> |
| 696 | + <PropertyGroup> |
| 697 | + <BuildAkvProviderDependsOn Condition="'$(ReferenceType.ToLower())' == 'package'">PackSqlClient;PackLogging</BuildAkvProviderDependsOn> |
| 698 | + </PropertyGroup> |
| 699 | + <Target Name="BuildAkvProvider" DependsOnTargets="$(BuildAkvProviderDependsOn)"> |
674 | 700 | <PropertyGroup> |
675 | 701 | <DotnetCommand> |
676 | 702 | "$(DotnetPath)dotnet" build "$(AkvProviderProjectPath)" |
|
733 | 759 | </PropertyGroup> |
734 | 760 |
|
735 | 761 | <!-- BuildAbstractions: Builds Microsoft.Data.SqlClient.Extensions.Abstractions --> |
736 | | - <Target Name="BuildAbstractions"> |
| 762 | + <PropertyGroup> |
| 763 | + <BuildAbstractionsDependsOn Condition="'$(ReferenceType.ToLower())' == 'package'">PackLogging</BuildAbstractionsDependsOn> |
| 764 | + </PropertyGroup> |
| 765 | + <Target Name="BuildAbstractions" DependsOnTargets="$(BuildAbstractionsDependsOn)"> |
737 | 766 | <PropertyGroup> |
738 | 767 | <DotnetCommand> |
739 | 768 | "$(DotnetPath)dotnet" build "$(AbstractionsProjectPath)" |
|
820 | 849 | </PropertyGroup> |
821 | 850 |
|
822 | 851 | <!-- BuildAzure: Builds Microsoft.Data.SqlClient.Extensions.Azure --> |
823 | | - <Target Name="BuildAzure"> |
| 852 | + <PropertyGroup> |
| 853 | + <BuildAzureDependsOn Condition="'$(ReferenceType.ToLower())' == 'package'">PackAbstractions;PackLogging</BuildAzureDependsOn> |
| 854 | + </PropertyGroup> |
| 855 | + <Target Name="BuildAzure" DependsOnTargets="$(BuildAzureDependsOn)"> |
824 | 856 | <PropertyGroup> |
825 | 857 | <DotnetCommand> |
826 | 858 | "$(DotnetPath)dotnet" build "$(AzureProjectPath)" |
|
983 | 1015 | <DotnetCommand> |
984 | 1016 | "$(DotnetPath)dotnet" pack $(SqlServerProjectPath) |
985 | 1017 | -p:Configuration=$(Configuration) |
| 1018 | + -p:PackageOutputPath="$(PackagesDir)" |
986 | 1019 | $(PackBuildArgument) |
987 | 1020 | $(SigningKeyPathArgument) |
988 | 1021 |
|
|
0 commit comments