diff --git a/src/SourceBuild/content/build.proj b/src/SourceBuild/content/build.proj index bbcfd977b..65f27db57 100644 --- a/src/SourceBuild/content/build.proj +++ b/src/SourceBuild/content/build.proj @@ -1,11 +1,32 @@ - + + + + + + false + false + false + + - - + + + + + + + + + + - + source-build non-source-build @@ -15,27 +36,6 @@ - - - - - $(ArtifactsDir)VerticalManifest.xml - - - - - - - - - - - - - diff --git a/src/SourceBuild/content/build.sh b/src/SourceBuild/content/build.sh index 91555c833..706d131d2 100755 --- a/src/SourceBuild/content/build.sh +++ b/src/SourceBuild/content/build.sh @@ -234,7 +234,7 @@ function Build { if [ "$test" != "true" ]; then "$CLI_ROOT/dotnet" build-server shutdown - "$CLI_ROOT/dotnet" msbuild "$scriptroot/eng/tools/init-build.proj" -bl:"$scriptroot/artifacts/log/$configuration/BuildMSBuildSdkResolver.binlog" -flp:LogFile="$scriptroot/artifacts/log/$configuration/BuildMSBuildSdkResolver.log" /t:ExtractToolsetPackages,BuildMSBuildSdkResolver $properties + "$CLI_ROOT/dotnet" msbuild "$scriptroot/eng/init-source-only.proj" -bl:"$scriptroot/artifacts/log/$configuration/BuildMSBuildSdkResolver.binlog" $properties # kill off the MSBuild server so that on future invocations we pick up our custom SDK Resolver "$CLI_ROOT/dotnet" build-server shutdown fi diff --git a/src/SourceBuild/content/eng/detect-binaries.sh b/src/SourceBuild/content/eng/detect-binaries.sh index 59c78dd71..f43c708f0 100755 --- a/src/SourceBuild/content/eng/detect-binaries.sh +++ b/src/SourceBuild/content/eng/detect-binaries.sh @@ -36,6 +36,7 @@ mode='validate' logLevel='Debug' propsDir='' packagesDir='' +restoreSources='' dotnetSdk=$defaultDotnetSdk positional_args=() @@ -114,10 +115,9 @@ function ParseBinaryArgs # Check the packages directory if [ -z "$packagesDir" ]; then # Use dotnet-public and dotnet-libraries feeds as the default packages source feeds - export ARTIFACTS_PATH="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries/nuget/v3/index.json" + restoreSources="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json%3Bhttps://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries/nuget/v3/index.json" else - packagesDir=$(realpath ${packagesDir}) - export ARTIFACTS_PATH=$packagesDir + restoreSources=$(realpath ${packagesDir}) fi } @@ -125,7 +125,7 @@ function RunBinaryTool { targetDir="$REPO_ROOT" outputDir="$REPO_ROOT/artifacts/log/binary-report" - BinaryToolCommand=""$dotnetSdk/dotnet" run --project "$BINARY_TOOL" -c Release "$mode" "$targetDir" -o "$outputDir" -ab "$allowedBinariesFile" -l "$logLevel"" + BinaryToolCommand=""$dotnetSdk/dotnet" run --project "$BINARY_TOOL" -c Release --property:RestoreSources="$restoreSources" "$mode" "$targetDir" -o "$outputDir" -ab "$allowedBinariesFile" -l "$logLevel"" if [ -n "$packagesDir" ]; then BinaryToolCommand=""$BinaryToolCommand" -p CustomPackageVersionsProps="$packagesDir/PackageVersions.props"" @@ -136,4 +136,4 @@ function RunBinaryTool } ParseBinaryArgs -RunBinaryTool \ No newline at end of file +RunBinaryTool diff --git a/src/SourceBuild/content/eng/build.sourcebuild.targets b/src/SourceBuild/content/eng/finish-source-only.proj similarity index 93% rename from src/SourceBuild/content/eng/build.sourcebuild.targets rename to src/SourceBuild/content/eng/finish-source-only.proj index ca13c113a..bdbfeebaf 100644 --- a/src/SourceBuild/content/eng/build.sourcebuild.targets +++ b/src/SourceBuild/content/eng/finish-source-only.proj @@ -1,4 +1,14 @@ - + + + + + $(NetCurrent) + + + + + + + Condition="'@(PrebuiltFile)' != ''"> $(ArtifactsAssetsDir)$(SourceBuiltPrebuiltsTarballName).$(SourceBuiltSdkVersion).$(TargetRid)$(ArchiveExtension) $(ResultingPrebuiltPackagesDir) @@ -158,7 +168,7 @@ + Condition="'@(PrebuiltFile)' != '' and '$(SkipErrorOnPrebuilts)' != 'true'"> diff --git a/src/SourceBuild/content/eng/init-cross-build.proj b/src/SourceBuild/content/eng/init-cross-build.proj new file mode 100644 index 000000000..f017ae51d --- /dev/null +++ b/src/SourceBuild/content/eng/init-cross-build.proj @@ -0,0 +1,22 @@ + + + + $(NetCurrent) + + + + + ROOTFS_DIR=$(ArtifactsObjDir)crossrootfs/arm + ROOTFS_DIR=$(ArtifactsObjDir)crossrootfs/armel + + + + + + + diff --git a/src/SourceBuild/content/eng/init-poison.proj b/src/SourceBuild/content/eng/init-poison.proj new file mode 100644 index 000000000..d1497ccd9 --- /dev/null +++ b/src/SourceBuild/content/eng/init-poison.proj @@ -0,0 +1,39 @@ + + + + $(NetCurrent) + + + + + + + + + + .source-built.xml + $(PackageReportDir)poison-source-built-catalog.xml + + + + + + + + + + + + + + + + + + + + + diff --git a/src/SourceBuild/content/eng/init-source-only.proj b/src/SourceBuild/content/eng/init-source-only.proj new file mode 100644 index 000000000..f45d4a70c --- /dev/null +++ b/src/SourceBuild/content/eng/init-source-only.proj @@ -0,0 +1,97 @@ + + + + + + true + + netstandard2.0 + true + false + + + + + + + + + + $([MSBuild]::NormalizeDirectory('$(PrereqsPackagesDir)', 'archive')) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/SourceBuild/content/eng/publish.proj b/src/SourceBuild/content/eng/publish.proj new file mode 100644 index 000000000..05355e66f --- /dev/null +++ b/src/SourceBuild/content/eng/publish.proj @@ -0,0 +1,29 @@ + + + + $(NetCurrent) + + + + + + + + + + + $(ArtifactsDir)VerticalManifest.xml + + + + + + + + + + + \ No newline at end of file diff --git a/src/SourceBuild/content/eng/tools/BinaryToolKit/Directory.Build.props b/src/SourceBuild/content/eng/tools/BinaryToolKit/Directory.Build.props new file mode 100644 index 000000000..560e3a358 --- /dev/null +++ b/src/SourceBuild/content/eng/tools/BinaryToolKit/Directory.Build.props @@ -0,0 +1,13 @@ + + + + + true + + + + + diff --git a/src/SourceBuild/content/eng/tools/BinaryToolKit/NuGet.config b/src/SourceBuild/content/eng/tools/BinaryToolKit/NuGet.config deleted file mode 100644 index 9d4d1db97..000000000 --- a/src/SourceBuild/content/eng/tools/BinaryToolKit/NuGet.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/SourceBuild/content/eng/tools/Directory.Build.props b/src/SourceBuild/content/eng/tools/Directory.Build.props index 63c892c31..7c1442273 100644 --- a/src/SourceBuild/content/eng/tools/Directory.Build.props +++ b/src/SourceBuild/content/eng/tools/Directory.Build.props @@ -1,13 +1,21 @@ - - - true - - + + $(ReferencePackagesDir);$(PrebuiltPackagesPath);$(PrebuiltSourceBuiltPackagesPath) + + + + + + + diff --git a/src/SourceBuild/content/eng/tools/init-build.proj b/src/SourceBuild/content/eng/tools/init-build.proj deleted file mode 100644 index 7dece577b..000000000 --- a/src/SourceBuild/content/eng/tools/init-build.proj +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - netstandard2.0 - true - false - - - - - - - - - $([MSBuild]::NormalizeDirectory('$(PrereqsPackagesDir)', 'archive')) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ROOTFS_DIR=$(ArtifactsObjDir)crossrootfs/arm - ROOTFS_DIR=$(ArtifactsObjDir)crossrootfs/armel - - - - - - - - - - - - - - - - - - - - - - - - - - .source-built.xml - $(PackageReportDir)poison-source-built-catalog.xml - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SourceBuild/content/eng/tools/tasks/Directory.Build.props b/src/SourceBuild/content/eng/tools/tasks/Directory.Build.props deleted file mode 100644 index 7c1442273..000000000 --- a/src/SourceBuild/content/eng/tools/tasks/Directory.Build.props +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - $(ReferencePackagesDir);$(PrebuiltPackagesPath);$(PrebuiltSourceBuiltPackagesPath) - - - - - - - - diff --git a/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.UnifiedBuild.MSBuildSdkResolver/Directory.Build.props b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.UnifiedBuild.MSBuildSdkResolver/Directory.Build.props new file mode 100644 index 000000000..6e73e409c --- /dev/null +++ b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.UnifiedBuild.MSBuildSdkResolver/Directory.Build.props @@ -0,0 +1,13 @@ + + + + + true + + + + + diff --git a/src/SourceBuild/content/eng/tools/tools.proj b/src/SourceBuild/content/eng/tools/tools.proj new file mode 100644 index 000000000..df5292004 --- /dev/null +++ b/src/SourceBuild/content/eng/tools/tools.proj @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + +