diff --git a/.pipelines/pipeline.user.windows.buddy.yml b/.pipelines/pipeline.user.windows.buddy.yml new file mode 100644 index 00000000000..b6a43f83fe2 --- /dev/null +++ b/.pipelines/pipeline.user.windows.buddy.yml @@ -0,0 +1,38 @@ +version: + major: 0 + minor: 0 + tag: 'SNAPSHOT' + name: 'ApplicationInsights-Java' + system: 'custom' +build: + commands: + - !!buildcommand + name: 'Assemble Perf Counters DLL' + command: '.scripts/gradle.cmd' + arguments: ':core:windowsSharedLibrary' + artifacts: + - from: 'core/build/libs/windows/shared' + include: + - '**/*' + exclude: + - '**/*.pdb' + signing_options: + profile: external_distribution + sign_inline: true + logs: + - to: 'PerfCounters DLL Build Logs' + from: 'core/build/tmp' + include: + - '*WindowsCpp/*' + - !!buildcommand + name: 'Assemble ApplicationInsights-Java JARs' + command: '.scripts/gradle.cmd' + arguments: 'assemble -Pcore.native.artifacts.prebuilt=true' + artifacts: + - to: 'Artifacts' + include: + - '**/build/libs/*.jar' + exclude: + - '**/build/libs/*-sources.jar' + - '**/build/libs/*-javadoc.jar' + - 'buildSrc/**/*' diff --git a/.pipelines/pipeline.user.windows.official.yml b/.pipelines/pipeline.user.windows.official.yml new file mode 100644 index 00000000000..a33a430731f --- /dev/null +++ b/.pipelines/pipeline.user.windows.official.yml @@ -0,0 +1,37 @@ +version: + major: 0 + minor: 0 + name: 'ApplicationInsights-Java' + system: 'custom' +build: + commands: + - !!buildcommand + name: 'Assemble Perf Counters DLL' + command: '.scripts/gradle.cmd' + arguments: ':core:windowsSharedLibrary' + artifacts: + - from: 'core/build/libs/windows/shared' + include: + - '**/*' + exclude: + - '**/*.pdb' + signing_options: + profile: external_distribution + sign_inline: true + logs: + - to: 'PerfCounters DLL Build Logs' + from: 'core/build/tmp' + include: + - '*WindowsCpp/*' + - !!buildcommand + name: 'Assemble ApplicationInsights-Java JARs' + command: '.scripts/gradle.cmd' + arguments: 'assemble -Pcore.native.artifacts.prebuilt=true -DisRelease=true -Pai.etw.native.build=release' + artifacts: + - to: 'Artifacts' + include: + - '**/build/libs/*.jar' + exclude: + - '**/build/libs/*-sources.jar' + - '**/build/libs/*-javadoc.jar' + - 'buildSrc/**/*' diff --git a/.pipelines/pipeline.user.windows.yml b/.pipelines/pipeline.user.windows.yml new file mode 100644 index 00000000000..f53a102f340 --- /dev/null +++ b/.pipelines/pipeline.user.windows.yml @@ -0,0 +1,78 @@ +environment: + host: + os: 'windows' + flavor: 'server' + version: '2019' + runtime: + provider: 'appcontainer' + image: 'cdpxwin1809.azurecr.io/global/vse2019:latest' + source_mode: 'link' +versioning: + commands: + - !!defaultcommand + name: 'Generate Version' + command: '.scripts/version.cmd' +signing_options: + profile: '170' +static_analysis_options: + policheck_options: + disable_tool_scan: false + fail_on_error: true +restore: + commands: + - !!defaultcommand + name: 'Install Windows 8.1 SDK' + command: '.scripts/installWindows81Sdk.cmd' + logs: + - from: 'WinSdkInstall' + to: 'WinSdkInstall' + include: + - '**/*.log' + - !!defaultcommand + name: 'Install Windows 10 SDK' + command: '.scripts/installWindows10Sdk.cmd' + logs: + - from: 'WinSdkInstall' + to: 'WinSdkInstall' + include: + - '**/*.log' + - !!defaultcommand + name: 'Install Java 11 JDK' + command: '.scripts/installJava11jdk.cmd' + - !!defaultcommand + name: 'Add OpenTelemetry to MavenLocal' + command: '.scripts/ot-gradle.cmd' + arguments: 'publishToMavenLocal --refresh-dependencies' + - !!defaultcommand + name: 'Clean and Resolve Dependencies' + command: '.scripts/gradle.cmd' + arguments: 'clean resolveDependencies --refresh-dependencies' + - !!defaultcommand + name: 'List Installation Information' + command: '.scripts/dumpInstallationInfo.cmd' +test: + commands: + # - !!defaultcommand + # name: 'Gradle Static Analysis' + # command: '.scripts/gradle.cmd' + # arguments: 'check -x test' + # logs: + # - to: 'Checks Reports' + # include: + # - '**/build/reports/**/*' + # exclude: + # - '**/build/reports/tests/**/*' + - !!testcommand + name: 'ApplicationInsights-Java Unit Tests' + command: '.scripts/gradle.cmd' + arguments: 'test' + fail_on_stderr: false + testresults: + - title: ':Unit Test Results' + type: 'junit' + include: + - '**/build/test-results/test/**/*' + logs: + - to: 'Test Logs' + include: + - '**/build/reports/tests/**/*' diff --git a/.pipelines/pipeline.user.yml b/.pipelines/pipeline.user.yml new file mode 100644 index 00000000000..cbfe3a80013 --- /dev/null +++ b/.pipelines/pipeline.user.yml @@ -0,0 +1,4 @@ +artifact_publish_options: + publish_to_legacy_artifacts: false + publish_to_pipeline_artifacts: true + publish_to_cloudvault_artifacts: false diff --git a/.scripts/copyBitsToAzureBlob.ps1 b/.scripts/copyBitsToAzureBlob.ps1 new file mode 100644 index 00000000000..a966d28e257 --- /dev/null +++ b/.scripts/copyBitsToAzureBlob.ps1 @@ -0,0 +1,18 @@ +param ( + [Parameter(Mandatory=$true, HelpMessage="azuresdkpartnerdrops service principal key")] + [ValidateNotNullOrEmpty()] + [string]$ServicePrincipalKey, + + [Parameter(Mandatory=$true, HelpMessage="azuresdkpartnerdrops Service principal client ID")] + [ValidateNotNullOrEmpty()] + [string]$ServicePrincipleClientId, + + [Parameter(Mandatory=$true, HelpMessage="applicationinsights-java version")] + [ValidateNotNullOrEmpty()] + [string]$SDKVersionNumber +) + +$Env:AZCOPY_SPA_CLIENT_SECRET=$ServicePrincipalKey +azcopy login --service-principal --application-id $ServicePrincipleClientId +azcopy copy "$(System.DefaultWorkingDirectory)/_applicationinsights-java-Windows-Official-master/drop/outputs/build/Artifacts/agent/agent/build/libs/applicationinsights-agent-$SDKVersionNumber.jar" "https://azuresdkpartnerdrops.blob.core.windows.net/drops/applicationinsights-sdk/java/$SDKVersionNumber/" +Remove-Item Env:AZCOPY_SPA_CLIENT_SECRET \ No newline at end of file diff --git a/.scripts/dumpInstallationInfo.cmd b/.scripts/dumpInstallationInfo.cmd new file mode 100644 index 00000000000..cd671846e1e --- /dev/null +++ b/.scripts/dumpInstallationInfo.cmd @@ -0,0 +1,5 @@ +@echo off + +echo "Listing installed software..." +powershell -NoProfile -ExecutionPolicy Unrestricted -File "%~dp0List-Programs.ps1" || exit /B 1 +echo "Finished listing installed software." \ No newline at end of file diff --git a/.scripts/generateVersion.ps1 b/.scripts/generateVersion.ps1 new file mode 100644 index 00000000000..c207d4fe06f --- /dev/null +++ b/.scripts/generateVersion.ps1 @@ -0,0 +1,15 @@ +# To generate a custom version with "M.m.p.yyyymmdd" +$path = "core\build\src\generated\main\resources\sdk-version.properties" +if (-Not (Test-Path -Path $path -PathType Leaf)) { + Write-Error -Message "'$path' does not exist" -Category ObjectNotFound + exit 2 +} +$versionProps = ConvertFrom-StringData (Get-Content $path -Raw) +Write-Host "Read from sdk-version.properties: " $versionProps.version +$matchObj = ($versionProps.version | Select-String -Pattern "^(?\d+)\.(?\d+)\.(?\d+)(?:-(?.*))?") +$major, $minor, $patch, $tag = $matchObj.Matches[0].Groups['major', 'minor','patch','tag'].Value +$date = Get-Date -UFormat "%Y%m%d" +$revision = "$date$env:CDP_DEFINITION_BUILD_COUNT_DAY" +$buildNumber = "$major.$minor.$patch.$revision" +[Environment]::SetEnvironmentVariable("CustomBuildNumber", $buildNumber, "User") # This will allow you to use it from env var in later steps of the same phase +Write-Host "##vso[build.updatebuildnumber]${buildNumber}" diff --git a/.scripts/gradle.cmd b/.scripts/gradle.cmd new file mode 100644 index 00000000000..da684a8ad46 --- /dev/null +++ b/.scripts/gradle.cmd @@ -0,0 +1,20 @@ +@echo off +setlocal + +pushd %~dp0 +set SCRIPT_ROOT=%CD% +popd + +pushd %~dp0.. +set PROJECT_ROOT=%CD% + +set DEFAULT_OPTIONS=--info --stacktrace -DisBuildServer=true --warning-mode=all +set GRADLE_CMD=gradlew.bat %DEFAULT_OPTIONS% %* +echo Running '%GRADLE_CMD%' in '%PROJECT_ROOT%' +call %GRADLE_CMD% +if errorlevel 1 ( + echo Error running '%GRADLE_CMD%' in '%PROJECT_ROOT%' + exit /b 1 +) +popd +endlocal \ No newline at end of file diff --git a/.scripts/install-azcopy.ps1 b/.scripts/install-azcopy.ps1 new file mode 100644 index 00000000000..395d6aabc57 --- /dev/null +++ b/.scripts/install-azcopy.ps1 @@ -0,0 +1,95 @@ +param ( + [Parameter(Mandatory=$true, HelpMessage="Url to download. Must point to a zip file. Assumes filename is last path element. Assumes zip contains top level directory with same name as zip file.")] + [ValidateNotNullOrEmpty()] + [string]$Url, + + [Parameter(Mandatory=$true, HelpMessage="Destination directory to unzip downloaded file.")] + [ValidateNotNullOrEmpty()] + [System.IO.FileInfo]$Destination, + + [Parameter(HelpMessage="When used, adds bin directory to PATH.")] + [switch]$UpdatePath = $false, + + [Parameter(HelpMessage="When used, downloads directory will be cleaned and temp directories cleaned.")] + [switch]$CleanOnFinish = $false, + + [Parameter(Mandatory=$false, HelpMessage="7Zip location. Should point to 7z.exe.")] + [ValidateNotNullOrEmpty()] + [System.IO.FileInfo]$PathTo7Zip, + + [Parameter(Mandatory=$false, HelpMessage="Skips download step.")] + [switch]$SkipDownload = $false, + + [Parameter(Mandatory=$false, HelpMessage="Skips unzip.")] + [switch]$SkipUnzip = $false +) + +$fileName, $dirName = ($Url | Select-String -Pattern ".+/(?(?[^/]+)\..+)$").Matches[0].Groups['filename', 'dirname'].Value +$Source = [System.IO.Path]::Combine("C:\Downloads", $fileName) + +$ErrorActionPreference = "Stop" +Import-Module "$PSScriptRoot\win-installer-helper.psm1" -DisableNameChecking + +Start-Setup + +$PathNodes=@() +try +{ + if (-not $SkipDownload) { + Write-Host "Downloading '$fileName' from '$Url' to '$Source'" + Get-File -Url $url -FileName $fileName + Write-Host "Download finished: $Source" + } + else + { + Write-Host "Skipping download." + if (-not (Test-Path $Source)) { + Write-Error "$Source does not exist" + exit + } + } + + if ($SkipUnzip) + { + if($Destination.ToString() -eq "C:\7-Zip") { + Start-Process -Wait -FilePath "$Source" -ArgumentList "/S" + } + } + else + { + if ($PathTo7Zip) + { + Write-Host "***" + Write-Host $PathTo7Zip.ToString() + Write-Host "***" + if (-not (Test-Path $PathTo7Zip)) + { + Write-Error "7zip location still does not exist $PathTo7Zip" + exit + } + Expand-ArchiveWith7Zip -Source $Source -Destination $destination -ToolPath $PathTo7Zip + } + else + { + Write-Host "$PathTo7Zip does not exist" + Expand-ArchiveWith7Zip -Source $Source -Destination $destination + } + Write-Host "Finished unzipping to $destination" + } +} +finally +{ + if (!$PathNodes -eq "") + { + Write-Host "Appending to PATH: '$PathNodes'" + Update-Path -PathNodes $PathNodes + } + if ($CleanOnFinish) + { + Stop-Setup + } + else + { + Stop-Setup -PreserveTemp -PreserveDownloads + } +} diff --git a/.scripts/install-java.ps1 b/.scripts/install-java.ps1 new file mode 100644 index 00000000000..fc058479569 --- /dev/null +++ b/.scripts/install-java.ps1 @@ -0,0 +1,129 @@ +param ( + [Parameter(Mandatory=$true, HelpMessage="Url to download. Must point to a zip file. Assumes filename is last path element. Assumes zip contains top level directory with same name as zip file.")] + [ValidateNotNullOrEmpty()] + [string]$Url, + + [Parameter(Mandatory=$true, HelpMessage="Destination directory to unzip downloaded file.")] + [ValidateNotNullOrEmpty()] + [System.IO.FileInfo]$Destination, + + [Parameter(Mandatory=$true, HelpMessage="Environment variable to store destination path, e.g. JAVA_HOME")] + [ValidateNotNullOrEmpty()] + [string]$EnvVar, + + [Parameter(HelpMessage="When used, adds bin directory to PATH.")] + [switch]$UpdatePath = $false, + + [Parameter(Mandatory=$true, HelpMessage="Checksum to use to validate download.")] + [ValidateScript({$_ | Select-String -Pattern "^[0-9a-fA-F]{64}$" -Quiet})] + [string]$Checksum, + + [Parameter(Mandatory=$false, HelpMessage="Algorithm to use when computing zip file checksum.")] + [ValidateNotNullOrEmpty()] + [string]$Algorithm = "SHA256", + + [Parameter(HelpMessage="When used, downloads directory will be cleaned and temp directories cleaned.")] + [switch]$CleanOnFinish = $false, + + [Parameter(Mandatory=$false, HelpMessage="7Zip location. Should point to 7z.exe.")] + [ValidateNotNullOrEmpty()] + [System.IO.FileInfo]$PathTo7Zip, + + [Parameter(Mandatory=$false, HelpMessage="Skips download step.")] + [switch]$SkipDownload = $false, + + [Parameter(Mandatory=$false, HelpMessage="Skips unzip.")] + [switch]$SkipUnzip = $false +) + +$fileName, $dirName = ($Url | Select-String -Pattern ".+/(?(?[^/]+)\..+)$").Matches[0].Groups['filename', 'dirname'].Value +$Source = [System.IO.Path]::Combine("C:\Downloads", $fileName) +$envVarValue = [System.IO.Path]::Combine($Destination, $dirName) + +$ErrorActionPreference = "Stop" +Import-Module "$PSScriptRoot\win-installer-helper.psm1" -DisableNameChecking + +Start-Setup +$PathNodes=@() +try +{ + if (-not $SkipDownload) { + Write-Host "Downloading '$fileName' from '$Url' to '$Source'" + Get-File -Url $url -FileName $fileName + Write-Host "Download finished: $Source" + } + else + { + Write-Host "Skipping download." + if (-not (Test-Path $Source)) { + Write-Error "$Source does not exist" + exit + } + } + + if ($Checksum) + { + Write-Host "Validating download..." + $sha = Get-FileHash $Source -Algorithm $Algorithm + Write-Host "$fileName checksum ($Algorithm): "$sha.Hash + if (-not $sha -eq $Checksum) + { + Write-Error "Checksum for $Source did not match!" + Write-Host "Expected: $Checksum" + exit + } + Write-Host "Download validated successfully." + } + else + { + Write-Host "Skipping checksum validation." + } + + if ($SkipUnzip) + { + Write-Host "Skipping unzip" + } + else + { + Write-Host "Expanding $Source to $destination" + if ($PathTo7Zip) + { + Write-Host "***" + Write-Host $PathTo7Zip.ToString() + Write-Host "***" + if (-not (Test-Path $PathTo7Zip)) + { + Write-Error "7zip location does not exist: $PathTo7Zip" + exit + } + Expand-ArchiveWith7Zip -Source $Source -Destination $destination -ToolPath $PathTo7Zip + } + else + { + Expand-ArchiveWith7Zip -Source $Source -Destination $destination + } + Write-Host "Finished unzipping to $destination" + } + Write-Host "Setting $EnvVar=$envVarValue" + Add-EnvironmentVariable -Name $EnvVar -Value $envVarValue + if ($UpdatePath) + { + $PathNodes += "$envVarValue\bin" + } +} +finally +{ + if (!$PathNodes -eq "") + { + Write-Host "Appending to PATH: '$PathNodes'" + Update-Path -PathNodes $PathNodes + } + if ($CleanOnFinish) + { + Stop-Setup + } + else + { + Stop-Setup -PreserveTemp -PreserveDownloads + } +} diff --git a/.scripts/install-something.ps1 b/.scripts/install-something.ps1 new file mode 100644 index 00000000000..8fef7ac38f2 --- /dev/null +++ b/.scripts/install-something.ps1 @@ -0,0 +1,210 @@ +[CmdletBinding()] +param( + [Parameter(Mandatory,Position=0,ParameterSetName='Unzip')] + [switch]$Unzip, + [Parameter(Mandatory,Position=0,ParameterSetName='Installer')] + [switch]$Install, + + [Parameter(ParameterSetName='Unzip', Mandatory)] + [Parameter(ParameterSetName='Installer', Mandatory)] + [ValidateNotNullOrEmpty()] + [string]$Url, + + [Parameter(ParameterSetName='Unzip')] + [Parameter(ParameterSetName='Installer')] + [ValidateNotNullOrEmpty()] + [string]$Filename=$(($Url | Select-String -Pattern ".+/(?[^/]+\..+)$").Matches[0].Groups['filename'].Value), + + [Parameter(ParameterSetName='Unzip')] + [Parameter(ParameterSetName='Installer')] + [ValidateScript({$_ | Select-String -Pattern "^[0-9a-fA-F]{64}$" -Quiet})] + [string]$Checksum, + + [Parameter(ParameterSetName='Unzip')] + [Parameter(ParameterSetName='Installer')] + [System.IO.FileInfo]$DownloadDirectory="C:\Downloads", + + [Parameter(ParameterSetName='Unzip')] + [Parameter(ParameterSetName='Installer')] + [switch]$CleanOnFinish = $false, + + [Parameter(ParameterSetName='Unzip')] + [Parameter(ParameterSetName='Installer')] + [switch]$AddToPath = $false, + + [Parameter(ParameterSetName='Unzip')] + [Parameter(ParameterSetName='Installer')] + [Alias('Destination','Dest','DestinationDirectory','DestDir','DestinationDir')] + [System.IO.FileInfo]$InstallationDirectory=$( + if($PSCmdlet.ParameterSetName -eq 'Unzip') { + [System.IO.Path]::GetFileNameWithoutExtension($Filename) + } + ), + + [Parameter(ParameterSetName='Unzip')] + [Parameter(ParameterSetName='Installer')] + [System.IO.FileInfo]$PathFolder, # Relative to HomeFolder + + [Parameter(ParameterSetName='Unzip')] + [ValidateNotNullOrEmpty()] + [System.IO.FileInfo]$PathTo7Zip, + + [Parameter(ParameterSetName='Installer')] + [ValidateSet('EXE','MSI')] + [string]$InstallerType='EXE', + + [Parameter(ParameterSetName='Installer')] + [string[]]$InstallerArgs, #arguments to pass to installer + + [Parameter(ParameterSetName='Unzip')] + [Parameter(ParameterSetName='Installer')] + [ValidateNotNullOrEmpty()] + [string]$HomeVar, # e.g. JAVA_HOME + + [Parameter(ParameterSetName='Unzip')] + [Parameter(ParameterSetName='Installer')] + [ValidateNotNullOrEmpty()] + [string]$HomeFolder, # Relative to installation directory + + [Parameter(DontShow)] + [Parameter(ParameterSetName='Unzip')] + [Parameter(ParameterSetName='Installer')] + [switch]$SkipDownload = $false, + + [Parameter(DontShow)] + [Parameter(ParameterSetName='Unzip')] + [Parameter(ParameterSetName='Installer')] + [switch]$SkipInstall = $false +) + +$plist = (Get-Command -Name $MyInvocation.InvocationName).Parameters +foreach ($p in $plist) { + Get-Variable -Name $p.Values.Name -ErrorAction SilentlyContinue +} +Write-Host +Write-Host "set = " $PSCmdlet.ParameterSetName + +$ErrorActionPreference = "Stop" +Import-Module "$PSScriptRoot\win-installer-helper.psm1" -DisableNameChecking + +$DownloadedFile = [System.IO.Path]::Combine($DownloadDirectory, $Filename) +$HomeDirectory = [System.IO.Path]::Combine($InstallationDirectory, $HomeFolder) +$PathDirectory = [System.IO.Path]::Combine($HomeDirectory, $PathFolder) + +Trace-Message "Creating download location $DownloadDirectory" +New-Item -Path $DownloadDirectory -ItemType Container -ErrorAction SilentlyContinue + +#region function definitions +function Get-Installer +{ + if (-not $SkipDownload) { + Write-Host "Downloading '$Filename' from '$Url' to '$DownloadedFile'" + Import-Module BitsTransfer + Start-BitsTransfer -Source $Url -Destination $DownloadedFile + Write-Host "Download finished: $DownloadedFile" + } + else + { + Write-Host "Skipping download. Assuming $Source exists." + if (-not (Test-Path $Source)) { + Write-Error "$Source does not exist" + exit + } + } +} + +function Set-HomeVar +{ + if ($HomeVar) + { + Write-Host "Setting $HomeVar=$HomeDirectory" + Add-EnvironmentVariable -Name $HomeVar -Value $HomeDirectory + } +} + +function Expand-Zipfile +{ + Write-Host "Expanding $Source to $InstallationDirectory" + if ($PathTo7Zip) + { + if (-not (Test-Path $PathTo7Zip)) + { + Write-Error "7zip location does not exist: $PathTo7Zip" + exit + } + Expand-ArchiveWith7Zip -Source $source -Destination $InstallationDirectory -ToolPath $PathTo7Zip + } + else + { + Expand-ArchiveWith7Zip -Source $source -Destination $InstallationDirectory + } + Write-Host "Finished unzipping to $InstallationDirectory" +} + +function Invoke-Installer +{ + if ($InstallerType -eq 'EXE') + { + Install-FromEXE -Path $DownloadedFile -Arguments $InstallerArgs + } + elseif ($InstallerType -eq 'MSI') + { + Install-FromMSI -Path $DownloadedFile -Arguments $InstallerArgs + } +} +#endregion + +Start-Setup +$PathNodes=@() +try +{ + Get-Installer + if ($Checksum) + { + Confirm-FileHash -Path $Source -ExpectedHash $Checksum + } + + if (-not $SkipInstall) + { + if ($Unzip) + { + Expand-Zipfile + } + else + { + Invoke-Installer + } + } + else + { + Write-Host "Skipping installation." + } + + Set-HomeVar + + if ($UpdatePath) + { + # TODO user homepath or pathdirectory + $PathNodes += $PathDirectory + } +} +finally +{ + if (!$PathNodes -eq "") + { + Write-Host "Appending to PATH: '$PathNodes'" + Update-Path -PathNodes $PathNodes + } + + if ($CleanOnFinish) + { + Trace-Message "Deleting download location $DownloadDirectory" + Remove-Item -Path $DownloadDirectory -Recurse -ErrorAction SilentlyContinue + + Stop-Setup + } + else + { + Stop-Setup -PreserveTemp -PreserveDownloads + } +} diff --git a/.scripts/install7zipexe.cmd b/.scripts/install7zipexe.cmd new file mode 100644 index 00000000000..9533ef57f5f --- /dev/null +++ b/.scripts/install7zipexe.cmd @@ -0,0 +1,20 @@ +@echo off + +echo "Installing 7-Zip Windows..." +set SEVEN_ZIP=C:\7-Zip\7z.exe + +echo "7Zip root path: %SEVEN_ZIP%" +set ZIP_URL=https://www.7-zip.org/a/7z2101-x64.exe + +IF NOT EXIST %SEVEN_ZIP% ( + echo "%SEVEN_ZIP% does not exist yet." + powershell -NoProfile -ExecutionPolicy Unrestricted -File "%~dp0install-azcopy.ps1" -Url "%ZIP_URL%" -Destination "C:\7-Zip" -SkipUnzip -CleanOnFinish || exit /B 1 + + IF EXIST %SEVEN_ZIP% ( + echo "Installed 7-Zip Successfully." + ) ELSE ( + echo "Failed to install 7-Zip." + ) +) ELSE ( + echo "%SEVEN_ZIP% exists, no installation is needed." +) diff --git a/.scripts/installAzCopyV10.cmd b/.scripts/installAzCopyV10.cmd new file mode 100644 index 00000000000..20541dd58b3 --- /dev/null +++ b/.scripts/installAzCopyV10.cmd @@ -0,0 +1,15 @@ +@echo off + +echo "Installing AzCopy V10 Windows..." + +set ZIP_URL=https://azcopyvnext.azureedge.net/release20210226/azcopy_windows_amd64_10.9.0.zip + +powershell -NoProfile -ExecutionPolicy Unrestricted -File "%~dp0install-azcopy.ps1" -Url "%ZIP_URL%" -Destination "C:\Program Files\AzCopy" -UpdatePath -PathTo7Zip "C:\7-Zip\7z.exe" -CleanOnFinish || exit /B 1 + +echo "C:\Program Files\AzCopy" +dir "C:\Program Files\AzCopy" + +echo "C:\Program Files\AzCopy\azcopy_windows_amd64_10.9.0" +dir "C:\Program Files\AzCopy\azcopy_windows_amd64_10.9.0" + +echo "Installed AzCopy v10.9.0 Successfully." \ No newline at end of file diff --git a/.scripts/installWindows10Sdk.cmd b/.scripts/installWindows10Sdk.cmd new file mode 100644 index 00000000000..5de1c13cffd --- /dev/null +++ b/.scripts/installWindows10Sdk.cmd @@ -0,0 +1,36 @@ +@echo off + +echo "Installing Windows 10 SDK..." + +:: --------------------------- +:: Windows Software Development Kit - Windows 10.0.19041.1 +:: --------------------------- +:: Available features: (Features marked with * can be downloaded but cannot be installed on this computer) +:: OptionId.WindowsPerformanceToolkit +:: OptionId.WindowsDesktopDebuggers +:: OptionId.AvrfExternal +:: OptionId.NetFxSoftwareDevelopmentKit +:: OptionId.WindowsSoftwareLogoToolkit +:: OptionId.IpOverUsb +:: OptionId.MSIInstallTools +:: OptionId.SigningTools +:: OptionId.UWPManaged +:: OptionId.UWPCPP +:: OptionId.UWPLocalized +:: OptionId.DesktopCPPx86 +:: OptionId.DesktopCPPx64 +:: OptionId.DesktopCPParm +:: OptionId.DesktopCPParm64 + +set "WINSDK_URL=https://download.microsoft.com/download/1/c/3/1c3d5161-d9e9-4e4b-9b43-b70fe8be268c/windowssdk/winsdksetup.exe" +set "SDK_FEATURES=OptionId.WindowsPerformanceToolkit OptionId.NetFxSoftwareDevelopmentKit OptionId.DesktopCPPx64 OptionId.DesktopCPPx86" + +powershell -NoProfile -ExecutionPolicy Unrestricted -File "%~dp0install-something.ps1" -Install -Url "%WINSDK_URL%" -InstallerArgs "/features %SDK_FEATURES% /log %CDP_USER_SOURCE_FOLDER_CONTAINER_PATH%\WinSdkInstall\winsdk10install.log /norestart /q" -InstallationDirectory "C:\Program Files (x86)\Windows Kits\10" -HomeVar "APPINSIGHTS_WIN10_SDK_PATH" -CleanOnFinish || exit /B 1 + +echo "C:\Program Files (x86)\Windows Kits\10" +dir "C:\Program Files (x86)\Windows Kits\10" + +echo "%CDP_USER_SOURCE_FOLDER_CONTAINER_PATH%\WinSdkInstall" +dir "%CDP_USER_SOURCE_FOLDER_CONTAINER_PATH%\WinSdkInstall" + +echo "Windows 10 SDK Installed Successfully" \ No newline at end of file diff --git a/.scripts/installWindows81Sdk.cmd b/.scripts/installWindows81Sdk.cmd new file mode 100644 index 00000000000..331dabb395c --- /dev/null +++ b/.scripts/installWindows81Sdk.cmd @@ -0,0 +1,26 @@ +@echo off + +echo "Installing Windows 8.1 SDK..." + +:: --------------------------- +:: Windows Software Development Kit for Windows 8.1 +:: --------------------------- +:: Available features: (Features marked with * can be downloaded but cannot be installed on this computer) +:: OptionId.WindowsDesktopSoftwareDevelopmentKit +:: OptionId.WindowsPerformanceToolkit +:: OptionId.WindowsDesktopDebuggers +:: OptionId.AvrfExternal +:: OptionId.NetFxSoftwareDevelopmentKit +:: OptionId.WindowsSoftwareLogoToolkit +:: OptionId.MSIInstallTools +:: * OptionId.Netfx + +powershell -NoProfile -ExecutionPolicy Unrestricted -File "%~dp0install-something.ps1" -Install -Url "http://download.microsoft.com/download/B/0/C/B0C80BA3-8AD6-4958-810B-6882485230B5/standalonesdk/sdksetup.exe" -InstallerArgs "/features OptionId.WindowsDesktopSoftwareDevelopmentKit OptionId.WindowsPerformanceToolkit OptionId.NetFxSoftwareDevelopmentKit /log %CDP_USER_SOURCE_FOLDER_CONTAINER_PATH%\WinSdkInstall\winsdkinstall.log /norestart /q" -InstallationDirectory "C:\Program Files (x86)\Windows Kits\8.1" -HomeVar "APPINSIGHTS_WIN81_SDK_PATH" -CleanOnFinish || exit /B 1 + +echo "C:\Program Files (x86)\Windows Kits\8.1" +dir "C:\Program Files (x86)\Windows Kits\8.1" + +echo "%CDP_USER_SOURCE_FOLDER_CONTAINER_PATH%\WinSdkInstall" +dir "%CDP_USER_SOURCE_FOLDER_CONTAINER_PATH%\WinSdkInstall" + +echo "Windows 8.1 SDK Installed Successfully" \ No newline at end of file diff --git a/.scripts/installjava11jdk.cmd b/.scripts/installjava11jdk.cmd new file mode 100644 index 00000000000..b56940aa4d9 --- /dev/null +++ b/.scripts/installjava11jdk.cmd @@ -0,0 +1,15 @@ +@echo off + +set JDK_VERSION=11 +set JDK_NAME=zulu-11-azure-jdk_11.45.27-11.0.10-win_x64 +set JDK_ZIP_URL=https://repos.azul.com/azure-only/zulu/packages/zulu-11/11.0.10/zulu-11-azure-jdk_11.45.27-11.0.10-win_x64.zip + +echo "Installing Java %JDK_VERSION% (%JDK_NAME%)..." +powershell -NoProfile -ExecutionPolicy Unrestricted -File "%~dp0install-java.ps1" -Url "%JDK_ZIP_URL%" -Destination "C:\Program Files\Java" -EnvVar "JAVA_HOME" -UpdatePath -Checksum "0bc2ba3066a23e217f0c9a590c3d8a7e17244e849034866606571395877ee7fc" -CleanOnFinish || exit /B 1 + +echo "C:\Program Files\Java\%JDK_NAME%" +dir "C:\Program Files\Java\%JDK_NAME%" + +echo "JAVA_HOME=%JAVA_HOME%" + +echo "Installed Java %JDK_VERSION% Successfully." diff --git a/.scripts/list-programs.ps1 b/.scripts/list-programs.ps1 new file mode 100644 index 00000000000..29ac453c99e --- /dev/null +++ b/.scripts/list-programs.ps1 @@ -0,0 +1,27 @@ +$ErrorActionPreference = "Stop" +$Separator = "--------------------------------------------------------------------------------------------------------------------------------`r`n" +function Trace-Message +{ + param + ( + [Parameter(Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [string]$Message + ) + + $Message = $Message -replace "##vso", "__VSO_DISALLOWED" + $timestamp = Get-Date + Write-Host "[INFO] [$timestamp] $Message" +} + +Trace-Message "Checking disk space" +Get-WmiObject win32_logicaldisk | Format-Table DeviceId, MediaType, {$_.Size /1GB}, {$_.FreeSpace /1GB} +Write-Host $Separator + +Trace-Message "Listing installed 32-bit software" +Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object {$_.DisplayName} | Select-Object DisplayName,DisplayVersion,Publisher,InstallDate | Sort-Object DisplayName,DisplayVersion,Publisher,InstallDate +Write-Host $Separator + +Trace-Message "Listing installed 64-bit software" +Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object {$_.DisplayName} | Select-Object DisplayName,DisplayVersion,Publisher,InstallDate | Sort-Object DisplayName,DisplayVersion,Publisher,InstallDate +Write-Host $Separator diff --git a/.scripts/ot-gradle.cmd b/.scripts/ot-gradle.cmd new file mode 100644 index 00000000000..f1dbb49ff5e --- /dev/null +++ b/.scripts/ot-gradle.cmd @@ -0,0 +1,23 @@ +@echo off +setlocal + +pushd %~dp0 +set SCRIPT_ROOT=%CD% +popd + +pushd %~dp0.. +set PROJECT_ROOT=%CD%\otel + +pushd %PROJECT_ROOT% + +set DEFAULT_OPTIONS=--info --stacktrace --warning-mode=all +set GRADLE_CMD=gradlew.bat %DEFAULT_OPTIONS% %* +echo Running '%GRADLE_CMD%' in '%PROJECT_ROOT%' +call %GRADLE_CMD% +if errorlevel 1 ( + echo Error running '%GRADLE_CMD%' in '%PROJECT_ROOT%' + exit /b 1 +) +popd +popd +endlocal \ No newline at end of file diff --git a/.scripts/version.cmd b/.scripts/version.cmd new file mode 100644 index 00000000000..9fbac8d4364 --- /dev/null +++ b/.scripts/version.cmd @@ -0,0 +1,27 @@ +@echo off +setlocal + +pushd %~dp0 +set SCRIPT_ROOT=%CD% +popd + +pushd %~dp0.. +set PROJECT_ROOT=%CD% + +:: Update this to the tasks you want to run +set GRADLE_TASKS=:core:generateVersionProperties +:: Add any additonal options +set GRADLE_OPTIONS=--info +set GRADLE_CMD=gradlew.bat %GRADLE_TASKS% %GRADLE_OPTIONS% +echo Running '%GRADLE_CMD%' in '%PROJECT_ROOT%' +call %GRADLE_CMD% +if errorlevel 1 ( + echo Error running '%GRADLE_CMD%' in '%PROJECT_ROOT%' + exit /b 1 +) +echo Running using version file to update build number... +powershell.exe -NoProfile -ExecutionPolicy Unrestricted -File "%~dp0GenerateVersion.ps1" +exit /b %ERRORLEVEL% + +popd +endlocal diff --git a/.scripts/win-installer-helper.psm1 b/.scripts/win-installer-helper.psm1 new file mode 100644 index 00000000000..0f443944370 --- /dev/null +++ b/.scripts/win-installer-helper.psm1 @@ -0,0 +1,1376 @@ +$ErrorActionPreference = "Stop" + +$Separator = "--------------------------------------------------------------------------------------------------------------------------------" +$DefaultDownloadFolder = "C:\Downloads" + +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 + + +##################################################################################################### +# Start-Setup +##################################################################################################### + +<# + .SYNOPSIS + Sets up the context for the build script to work. + .DESCRIPTION + Prints out disk size information and sets up the downloaded content folder. +#> +function Start-Setup +{ + Write-Host $Separator + + Trace-Message "Starting installation" + + Trace-Message "Checking disk space" + Get-WmiObject win32_logicaldisk | Format-Table DeviceId, MediaType, {$_.Size /1GB}, {$_.FreeSpace /1GB} + + Trace-Message "Creating download location C:\Downloads" + New-Item -Path $DefaultDownloadFolder -ItemType Container -ErrorAction SilentlyContinue +} + +##################################################################################################### +# Stop-Setup +##################################################################################################### + +<# + .SYNOPSIS + Shuts down the build script. + .DESCRIPTION + Deletes the downloaded content folder. Cleans the contents of the TEMP folder. Prints + out a list of the installed software on the image by querying WMIC. + .PARAMETER PreserveDownloads + Preserves the downloaded content folder. + .PARAMETER PreserveTemp + Preserves the temp folder contents. +#> +function Stop-Setup +{ + param + ( + [Parameter(Mandatory=$false)] + [switch]$PreserveDownloads, + + [Parameter(Mandatory=$false)] + [switch]$PreserveTemp + ) + + Write-Host $Separator + + if (-not $PreserveDownloads) + { + Trace-Message "Deleting download location C:\Downloads" + Remove-Item -Path "C:\Downloads" -Recurse -ErrorAction SilentlyContinue + } + + if (-not $PreserveTemp) + { + Reset-TempFolders + } + + # Trace-Message "Checking disk space" + # gwmi win32_logicaldisk | Format-Table DeviceId, MediaType, {$_.Size /1GB}, {$_.FreeSpace /1GB} + + # Trace-Message "Listing installed 32-bit software" + # Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName,DisplayVersion,Publisher,InstallDate | Sort-Object DisplayName,DisplayVersion,Publisher,InstallDate + + # Trace-Message "Listing installed 64-bit software" + # Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName,DisplayVersion,Publisher,InstallDate | Sort-Object DisplayName,DisplayVersion,Publisher,InstallDate + + Trace-Message "Finished installation." + Write-Host $Separator +} + +##################################################################################################### +# Get-File +##################################################################################################### + +<# + .SYNOPSIS + Downloads a file from a URL to the downloaded contents folder. + .DESCRIPTION + Fetches the contents of a file from a URL to the downloaded contents folder (C:\Downloads). + If a specific FilePath is specified, then skips the cache folder and downloads to the + specified path. + .PARAMETER Url + The URL of the content to fetch. + .PARAMETER FileName + The name of the file to write the fetched content to. + .OUTPUTS + The full path to the downloaded file. +#> +function Get-File +{ + param + ( + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string]$Url, + + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string]$FileName + ) + + Write-Host $Separator + + $file = [System.IO.Path]::Combine("C:\Downloads", $FileName) + + Trace-Message "Downloading from $Url to file $File" + #Invoke-WebRequest -Uri $Url -UseBasicParsing -OutFile $file -UserAgent "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)" + Import-Module BitsTransfer + Start-BitsTransfer -Source $Url -Destination $File + #(New-Object System.Net.WebClient).DownloadFile($Url, $File) + + Trace-Message "Finished download" + Write-Host $Separator + + return $file +} +##################################################################################################### +# Add-EnvironmentVariable +##################################################################################################### + +<# + .SYNOPSIS + Defines a new or redefines an existing environment variable. + .DESCRIPTION + There are many ways to set environment variables. However, the default mechanisms do not + work when the change has to be persisted. This implementation writes the change into + the registry, invokes the .NET SetEnvironmentVariable method with Machine scope and then + invokes setx /m to force persistence of the change. + .PARAMETER Name + The name of the environment variable. + .PARAMETER Value + The value of the environment variable. + .NOTES + This does NOT work with PATH. +#> +function Add-EnvironmentVariable +{ + param + ( + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string]$Name, + + [Parameter(Mandatory=$true)] + [string]$Value + ) + + Write-Host $Separator + + Trace-Message "Setting environment variable $name := $value" + + Set-Item -Path Env:$Name -Value $Value + New-Item -Path "HKLM:\System\CurrentControlSet\Control\Session Manager\Environment" -ItemType String -Force -Name $Name -Value $Value + + [System.Environment]::SetEnvironmentVariable($Name, $Value, [EnvironmentVariableTarget]::Machine) + + &setx.exe /m $Name $Value + + Write-Host $Separator +} + +##################################################################################################### +# Update-Path +##################################################################################################### + +<# + .SYNOPSIS + Redefines the PATH. + .DESCRIPTION + There are many ways to set environment variables. However, the default mechanisms do not + work when the change has to be persisted. This implementation writes the change into + the registry, invokes the .NET SetEnvironmentVariable method with Machine scope and then + invokes setx /m to force persistence of the change. + .PARAMETER PathNodes + An array of changes to the PATH. These values are appended to the existing value of PATH at the end. + .NOTES + This does NOT seem to work at all in Windows containers. Yet to be tested on RS5, but + definitely did not work in RS1 through RS4. +#> +function Update-Path +{ + param + ( + [Parameter(Mandatory=$true)] + [string[]]$PathNodes + ) + + Write-Host $Separator + + $NodeToAppend=$null + + $path = $env:Path + + Trace-Message "Current value of PATH := $path" + Trace-Message "Appending $Update to PATH" + + if (!$path.endswith(";")) + { + $path = $path + ";" + } + + foreach ($PathNode in $PathNodes) + { + if (!$PathNode.endswith(";")) + { + $PathNode = $PathNode + ";" + } + $NodesToAppend += $PathNode + } + # add the new nodes + $path = $path + $NodesToAppend + + #prettify it because there is some cruft from base images and or path typos i.e. foo;; + $path = $path -replace ";+",";" + + #pull these in a hack until remove nodes is implemented + $path = $path.Replace("C:\Program Files\NuGet;","") + $path = $path.Replace("C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin;","") + $path = $path.Replace("C:\Program Files (x86)\Microsoft Visual Studio\2019\TestAgent\Common7\IDE\CommonExtensions\Microsoft\TestWindow;","") + + #and set it + Trace-Message "Setting PATH to $path" + [System.Environment]::SetEnvironmentVariable("PATH", $path, [EnvironmentVariableTarget]::Machine) + + Write-Host $Separator +} + + +##################################################################################################### +# Add-WindowsFeature +##################################################################################################### + +<# + .SYNOPSIS + Simple wrapper around the Install-WindowsFeature cmdlet. + .DESCRIPTION + A simple wrapper around the Install-WindowsFeature cmdlet that writes log lines and + data to help trace what happened. + .PARAMETER Name + The name of the feature to install. + + .PARAMETER SourceString + The full -Source parameter with location to pass into install-WindowsFeature +#> +function Add-WindowsFeature +{ + param + ( + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string]$Name, + + [Parameter(Mandatory=$false)] + [ValidateNotNullOrEmpty()] + [string]$SourceLocation=$null + + + ) + + Write-Host $Separator + + Trace-Message "Installing Windows feature $Name" + + if ($SourceLocation) + { + Install-WindowsFeature -Name $Name -Source $SourceLocation -IncludeAllSubFeature -IncludeManagementTools -Restart:$false -Confirm:$false + } + else + { + Install-WindowsFeature -Name $Name -IncludeAllSubFeature -IncludeManagementTools -Restart:$false -Confirm:$false + } + + Trace-Message "Finished installing Windows feature $Name" + + Write-Host $Separator +} + +##################################################################################################### +# Remove-WindowsFeature +##################################################################################################### + + +<# + .SYNOPSIS + Simple wrapper around the Uninstall-WindowsFeature cmdlet. + .DESCRIPTION + A simple wrapper around the Uninstall-WindowsFeature cmdlet that writes log lines and + data to help trace what happened. + .PARAMETER Name + The name of the feature to uninstall. +#> +function Remove-WindowsFeature +{ + param + ( + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string]$Name + ) + + Write-Host $Separator + + Trace-Message "Removing Windows feature $Name" + + Uninstall-WindowsFeature -Name $Name -IncludeManagementTools -Restart:$false -Confirm:$false + + Trace-Message "Finished removing Windows feature $Name" + + Write-Host $Separator +} + +##################################################################################################### +# Install-FromMSI +##################################################################################################### + +<# + .SYNOPSIS + Executes a Microsoft Installer package (MSI) in quiet mode. + .DESCRIPTION + Uses the msiexec tool with the appropriate arguments to execute the specified installer + package in quiet non-interactive mode with full verbose logging enabled. + .PARAMETER Path + The full path to the installer package file. + .PARAMETER Arguments + The optioal arguments to pass to the MSI installer package. + .PARAMETER IgnoreExitCodes + An array of exit codes to ignore. By default 3010 is always ignored because that indicates + a restart is required. Docker layers are an implied restart. In other scenarios such as + image builds or local runs, a restart can be easily triggered by the invoking script or + user. + .PARAMETER IgnoreFailures + Flag to force all failures (including actual failing exit codes) to be ignored. Notably + 1603 is a very common one that indicates that an actual error occurred. +#> +function Install-FromMSI +{ + param + ( + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string]$Path, + + [Parameter(Mandatory=$false)] + [string[]]$Arguments, + + [Parameter(Mandatory=$false)] + [int[]]$IgnoreExitCodes, + + [switch]$IgnoreFailures + ) + + Write-Host $Separator + + if (-not (Test-Path $Path)) + { + throw "CDPXERROR: Could not find the MSI installer package at $Path" + } + + $fileNameOnly = [System.IO.Path]::GetFileNameWithoutExtension($Path) + + $log = [System.IO.Path]::Combine($env:TEMP, $fileNameOnly + ".log") + + $argsToUse = "/quiet /qn /norestart /lv! `"$log`" /i `"$Path`" $Arguments" + + Trace-Message "Installing from $Path" + Trace-Message "Running msiexec.exe $argsToUse" + + $ex = Start-ExternalProcess -Path "msiexec.exe" -Arguments $argsToUse + + if ($ex -eq 3010) + { + Trace-Message "Install from $Path exited with code 3010. Ignoring since that is just indicating restart required." + Write-Host $Separator + return + } + elseif ($ex -ne 0) + { + foreach ($iex in $IgnoreExitCodes) + { + if ($ex -eq $iex) + { + Trace-Message "Install from $Path succeeded with exit code $ex" + Write-Host $Separator + return + } + } + + Trace-Error "Failed to install from $Path. Process exited with code $ex" + + if (-not $IgnoreFailures) + { + throw "Failed to install from $Path. Process exited with code $ex" + } + } +} + +##################################################################################################### +# Install-FromEXE +##################################################################################################### + +<# + .SYNOPSIS + Executes any arbitrary executable installer. + .DESCRIPTION + A simple wrapper function to kick off an executable installer and handle failures, logging etc. + .PARAMETER Path + The path to the installer package file. + .PARAMETER Arguments + The optioal arguments to pass to the installer package. + .PARAMETER IgnoreExitCodes + An array of exit codes to ignore. By default 3010 is always ignored because that indicates + a restart is required. Docker layers are an implied restart. In other scenarios such as + image builds or local runs, a restart can be easily triggered by the invoking script or + user. + .PARAMETER IgnoreFailures + Flag to force all failures (including actual failing exit codes) to be ignored. Notably + 1603 is a very common one that indicates that an actual error occurred. +#> +function Install-FromEXE +{ + param + ( + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string]$Path, + + [Parameter(Mandatory=$false)] + [int[]]$IgnoreExitCodes, + + [Parameter(Mandatory=$false)] + [string[]]$Arguments, + + [switch]$IgnoreFailures + ) + + Write-Host $Separator + + Trace-Message "Running $Path" + + $ex = Start-ExternalProcess -Path $Path -Arguments $Arguments + + if ($ex -eq 3010) + { + Trace-Message "Install from $Path exited with code 3010. Ignoring since that is just indicating restart required." + Write-Host $Separator + return + } + elseif ($ex -ne 0) + { + foreach ($iex in $IgnoreExitCodes) + { + if ($ex -eq $iex) + { + Trace-Message "Install from $Path succeeded with exit code $ex" + Write-Host $Separator + return + } + } + + Trace-Error "Failed to install from $Path. Process exited with code $ex" + + if (-not $IgnoreFailures) + { + throw "Failed to install from $Path. Process exited with code $ex" + } + } +} + +##################################################################################################### +# Install-FromInnoSetup +##################################################################################################### + +<# + .SYNOPSIS + A shorthand function for running a Inno Setup installer package with the appropriate options. + .DESCRIPTION + Inno Setup installer packages can be run in silent mode with the options + /VERYSILENT /NORESTART /CLOSEAPPLICATIONS /TYPE=full. In most cases, these options are the + same for every Inno Setup installer. This function is hence a short hand for Inno Setup. + .PARAMETER Path + The path to the Inno Setup installer package file. + .PARAMETER Arguments + The optioal arguments to pass to the installer package. + .PARAMETER IgnoreExitCodes + An array of exit codes to ignore. + .PARAMETER IgnoreFailures + Flag to force all failures (including actual failing exit codes) to be ignored. + +#> +function Install-FromInnoSetup +{ + param + ( + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string]$Path, + + [Parameter(Mandatory=$false)] + [int[]]$IgnoreExitCodes, + + [Parameter(Mandatory=$false)] + [string[]]$Arguments, + + [switch]$IgnoreFailures + ) + + $fileNameOnly = [System.IO.Path]::GetFileNameWithoutExtension($Path) + $logName = $fileNameOnly + ".log" + $logFile = Join-Path $Env:TEMP -ChildPath $logName + + $argsToUse = "/QUIET /SP- /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /CLOSEAPPLICATIONS /NOICONS /TYPE=full /LOG `"$logFile`" " + $argsToUse += $Arguments + + Install-FromEXE -Path $Path -Arguments $argsToUse -IgnoreExitCodes $IgnoreExitCodes -IgnoreFailures:$IgnoreFailures +} + +##################################################################################################### +# Install-FromDevToolsInstaller +##################################################################################################### + +<# + .SYNOPSIS + A shorthand function for running a DevDiv Tools installer package with the appropriate options. + .DESCRIPTION + DevDiv Tools installer packages can be run in silent mode with the options + /quiet /install /norestart. In most cases, these options are the + same for every DevDiv Tools installer. This function is hence a short hand for DevDiv Tools + installer packages. + .PARAMETER Path + The path to the DevDiv Tools installer package file. + .PARAMETER Arguments + The optional arguments to pass to the installer package. + .PARAMETER IgnoreExitCodes + An array of exit codes to ignore. 3010 is added by default by this function. + .PARAMETER IgnoreFailures + Flag to force all failures (including actual failing exit codes) to be ignored. + +#> +function Install-FromDevDivToolsInstaller +{ + param + ( + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string]$Path, + + [Parameter(Mandatory=$false)] + [int[]]$IgnoreExitCodes, + + [Parameter(Mandatory=$false)] + [string[]]$Arguments, + + [switch]$IgnoreFailures + ) + + $fileNameOnly = [System.IO.Path]::GetFileNameWithoutExtension($Path) + $logName = $fileNameOnly + ".log" + $logFile = Join-Path $Env:TEMP -ChildPath $logName + + $argsToUse = "/QUIET /INSTALL /NORESTART `"$logFile`" " + $argsToUse += $Arguments + + $iec = (3010) + $iec += $IgnoreExitCodes + + Install-FromEXE -Path $Path -Arguments $argsToUse -IgnoreExitCodes $iec -IgnoreFailures:$IgnoreFailures +} + +##################################################################################################### +# Install-FromChocolatey +##################################################################################################### + +<# + .SYNOPSIS + Installs a Chocolatey package. + .DESCRIPTION + Installs a package using Chocolatey in silent mode with no prompts. + .PARAMETER Name + The name of the package to install. + +#> +function Install-FromChocolatey +{ + param + ( + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string]$Name + ) + + Write-Host $Separator + + Write-Host "Installing chocolatey package $Name" + Start-ExternalProcess -Path "C:\ProgramData\chocolatey\bin\choco.exe" -Arguments @("install","-y",$Name) + + Write-Host $Separator +} + + +##################################################################################################### +# Install-FromEXEAsyncWithDevenvKill +##################################################################################################### + +<# + .SYNOPSIS + Starts an installer asynchronously and waits in the background for rogue child processes + and kills them after letting them finish. + .DESCRIPTION + Visual Studio installers start a number of child processes. Notable amongst them is the devenv.exe + process that attempts to initialize the VS IDE. Containers do not support UIs so this part hangs. + There might be other related processes such as msiexec as well that hang. Invariable, these + child processes complete quite fast, but never exit potentially becuase they are attempting + to display some UI and hang. This helper function will kick off the installer and then monitor + the task list to find those child processes by name and then it will kill them. + .PARAMETER Path + .PARAMETER StuckProcessNames + .PARAMETER IgnoreExitCodes + .PARAMETER IgnoreFailures + .PARAMETER Arguments + .PARAMETER WaitMinutes +#> +function Install-FromEXEAsyncWithDevenvKill +{ + param + ( + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string]$Path, + + [Parameter(Mandatory=$true)] + [string[]]$StuckProcessNames, + + [Parameter(Mandatory=$false)] + [int[]]$IgnoreExitCodes, + + [Parameter()] + [switch]$IgnoreFailures, + + [Parameter(Mandatory=$false)] + [ValidateRange(1, [int]::MaxValue)] + [int]$WaitMinutes = 5, + + [string[]]$Arguments + ) + + Write-Host $Separator + + Trace-Message "Running $Path with $Arguments" + + $process = Start-Process $Path -PassThru -Verbose -NoNewWindow -ArgumentList $Arguments + $thePid = $process.Id + $pn = [System.IO.Path]::GetFileNameWithoutExtension($Path) + + Trace-Message "Started EXE asynchronously. Process ID is $thePid" + + Wait-ForProcess -Process $process -Minutes $WaitMinutes + + Trace-Message "Walking task list and killing any processes in the stuck process list $StuckProcessNames" + + foreach ($stuckProcessName in $StuckProcessNames) + { + Stop-ProcessByName -Name $stuckProcessName -WaitBefore 3 -WaitAfter 3 + } + + Trace-Message "Also killing any rogue msiexec processes" + + Stop-ProcessByName -Name "msiexec" -WaitBefore 3 -WaitAfter 3 + + Wait-WithMessage -Message "Waiting for process with ID $thePid launched from $Path to finish now that children have been killed off" -Minutes 2 + + Stop-ProcessByName -Name $pn -WaitBefore 3 -WaitAfter 3 + + $ex = $process.ExitCode; + + if ($ex -eq 0) + { + Trace-Message "Install from $Path succeeded with exit code 0" + Write-Host $Separator + return + } + + foreach ($iex in $ignoreExitCodes) + { + if ($ex -eq $iex) + { + Trace-Message "Install from $Path succeeded with exit code $ex" + Write-Host $Separator + return; + } + } + + Trace-Error "Failed to install from $Path. Process exited with code $ex" + + if (-not $IgnoreFailures) + { + throw "CDPXERROR: Failed to install from $Path. Process exited with exit code $ex" + } +} +##################################################################################################### +# Stop-ProcessByName +##################################################################################################### + +<# + .SYNOPSIS + Kills all processes with a given name. + .DESCRIPTION + Some installers start multiple instances of other applications to perform various + post-installer or initialization actions. The most notable is devenv.exe. This function + provides a mechanism to brute force kill all such instances. + .PARAMETER Name + The name of the process to kill. + .PARAMETER WaitBefore + The optional number of minutes to wait before killing the process. This provides time for + the process to finish its processes. + .PARAMETER WaitAfter + The optional number of minutes to wait after killing the process. This provides time for + the process to exit and any handles to expire. +#> +function Stop-ProcessByName +{ + param + ( + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string]$Name, + + [Parameter(Mandatory=$false)] + [ValidateRange(1, [int]::MaxValue)] + [int]$WaitBefore = 3, + + [Parameter(Mandatory=$false)] + [ValidateRange(1, [int]::MaxValue)] + [int]$WaitAfter = 3 + ) + + Wait-WithMessage -Message "Waiting for $WaitBefore minutes before killing all processes named $processName" -Minutes $WaitBefore + &tasklist /v + + $count = 0 + + Get-Process -Name $Name -ErrorAction SilentlyContinue | + ForEach-Object + { + $process = $_ + Trace-Warning "Killing process with name $Name and ID $($process.Id)" + $process.Kill() + ++$count + } + + Trace-Warning "Killed $count processes with name $Name" + + Wait-WithMessage -Message "Waiting for $WaitAfter minutes after killing all processes named $Name" -Minutes $WaitAfter + + &tasklist /v +} + +##################################################################################################### +# Wait-WithMessage +##################################################################################################### + +<# + .SYNOPSIS + Performs a synchronous sleep. + .DESCRIPTION + Some asynchronous and other operations require a wait time before + assuming a failure. This function forces the caller to sleep. The sleep is + performed in 1-minute intervals and a message is printed on each wakeup. + .PARAMETER Message + The message to print after each sleep period. + .PARAMETER Minutes + The number of minutes to sleep. +#> +function Wait-WithMessage +{ + param + ( + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string]$Message, + + [Parameter(Mandatory=$true)] + [ValidateRange(1, [int]::MaxValue)] + [int]$Minutes + ) + + $elapsed = 0 + + while ($true) + { + if ($elapsed -ge $Minutes) + { + Write-Host "Done waiting for $elapsed minutes" + break + } + + Trace-Message $Message + Start-Sleep -Seconds 60 + ++$elapsed + } +} + + +##################################################################################################### +# Wait-WithMessageAndMonitor +##################################################################################################### + +<# + .SYNOPSIS + Performs a synchronous sleep and on each wakeup runs a script block that may contain some + monitoring code. + .DESCRIPTION + Some asynchronous and other operations require a wait time before + assuming a failure. This function forces the caller to sleep. The sleep is performed + in 1-minute intervals and a message is printed and a script block is run on each wakeup. + .PARAMETER Message + The message to print after each sleep period. + .PARAMETER Block + The script block to run after each sleep period. + .PARAMETER Minutes + The number of minutes to sleep. +#> +function Wait-WithMessageAndMonitor +{ + param + ( + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string]$Message, + + [Parameter(Mandatory=$true)] + [ValidateNotNull()] + [ScriptBlock]$Monitor, + + [Parameter(Mandatory=$true)] + [ValidateRange(1, [int]::MaxValue)] + [int]$Minutes + ) + + $elapsed = 0 + + while ($true) + { + if ($elapsed -ge $Minutes) + { + Write-Host "Done waiting for $elapsed minutes" + break + } + + Trace-Message $Message + Start-Sleep -Seconds 60 + $Monitor.Invoke() + ++$elapsed + } +} + +##################################################################################################### +# Reset-TempFolders +##################################################################################################### + +<# + .SYNOPSIS + Deletes the contents of well known temporary folders. + .DESCRIPTION + Installing lots of software can leave the TEMP folder built up with crud. This function + wipes the well known temp folders $Env:TEMP and C:\Windows\TEMP of all contentes. The + folders are preserved however. +#> +function Reset-TempFolders +{ + try + { + Trace-Message "Wiping contents of the $($Env:TEMP) and C:\Windows\TEMP folders." + + Get-ChildItem -Directory -Path $Env:TEMP | ForEach-Object { + $p = $_.FullName + Trace-Message "Removing temporary file $p" + Remove-Item -Recurse -Force -Path $p -ErrorAction SilentlyContinue + } + + Get-ChildItem -File -Path $Env:TEMP | ForEach-Object { + $p = $_.FullName + Trace-Message "Removing temporary file $p" + Remove-Item -Force -Path $_.FullName -ErrorAction SilentlyContinue + } + + Get-ChildItem -Directory -Path "C:\Windows\Temp" | ForEach-Object { + $p = $_.FullName + Trace-Message "Removing temporary file $p" + Remove-Item -Recurse -Force -Path $_.FullName -ErrorAction SilentlyContinue + } + + Get-ChildItem -File -Path "C:\Windows\Temp" | ForEach-Object { + $p = $_.FullName + Trace-Message "Removing temporary file $p" + Remove-Item -Force -Path $_.FullName -ErrorAction SilentlyContinue + } + } + catch + { + Trace-Warning "Errors occurred while trying to clean up temporary folders." + $_.Exception | Format-List + } + finally + { + Trace-Message "Cleaned up temporary folders at $Env:TEMP and C:\Windows\Temp" + } +} +##################################################################################################### +# Confirm-FileHash +##################################################################################################### + +<# + .SYNOPSIS + Verifies the content hash of downloaded content. + .DESCRIPTION + By default computes the SHA256 hash of downloaded content and compares it against + a given hash assuming it to be a SHA256 hash as well. + .PARAMETER FileName + The name of the file. If the IsFullPath switch is not specified, assumes a file within + the downloaded content cache. + .PARAMETER ExpectedHash + The expected hash value of the content. + .PARAMETER Algorithm + The optional hash algorithm to hash. Defaults to SHA256. + .OUTPUTS +#> +function Confirm-FileHash +{ + param + ( + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string]$Path, + + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string]$ExpectedHash, + + [Parameter(Mandatory=$false)] + [ValidateNotNullOrEmpty()] + [string]$Algorithm = "sha256" + ) + + Trace-Message "Verifying content hash for file $Path" + + $exists = Test-Path -Path $Path -PathType Leaf + + if (-not $exists) + { + throw "CDPXERROR: Failed to find file $Path in order to verify hash." + } + + $hash = Get-FileHash $Path -Algorithm $Algorithm + + if ($hash.Hash -ne $ExpectedHash) + { + throw "File $Path hash $hash.Hash did not match expected hash $expectedHash" + } +} + +##################################################################################################### +# Start-ExternalProcess +##################################################################################################### + +<# + .SYNOPSIS + Executes an external application + .DESCRIPTION + PowerShell does not deal well with applications or scripts that write to + standard error. This wrapper function handles starting the process, + waiting for output and then captures the standard output/error streams and + reports them without writing them to stderr. + .PARAMETER Path + The path to the application to run. + .PARAMETER Arguments + The array of arguments to pass to the external application. + .OUTPUTS + Returns the exit code that the application exited with. +#> +function Start-ExternalProcess +{ + param + ( + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string]$Path, + + [Parameter(Mandatory=$false)] + [string[]]$Arguments + ) + + Trace-Message "Executing application: $Path $Arguments" + + $guid = [System.Guid]::NewGuid().ToString("N") + $errLogFileName = -join($guid, "-stderr.log") + $outLogFileName = -join($guid, "-stdout.log") + $errLogFile = Join-Path -Path $Env:TEMP -ChildPath $errLogFileName + $outLogFile = Join-Path -Path $Env:TEMP -ChildPath $outLogFileName + [System.Diagnostics.Process]$process = $null + + if (($null -ne $Arguments) -and ($Arguments.Length -gt 0)) + { + $process = Start-Process -FilePath $Path -ArgumentList $Arguments -NoNewWindow -PassThru -RedirectStandardError $errLogFile -RedirectStandardOutput $outLogFile + } + else + { + $process = Start-Process -FilePath $Path -NoNewWindow -PassThru -RedirectStandardError $errLogFile -RedirectStandardOutput $outLogFile + } + + $handle = $process.Handle + $thePid = $process.Id + $ex = 0 + + Trace-Message -Message "Started process from $Path with PID $thePid (and cached handle $handle)" + + while ($true) + { + Trace-Message -Message "Waiting for PID $thePid to exit ..." + + if ($process.HasExited) + { + Trace-Message -Message "PID $thePid has exited!" + break + } + + Start-Sleep -Seconds 60 + } + + Trace-Message "STDERR ---------------------------" + Get-Content $errLogFile | Write-Host + + Trace-Message "STDOUT ---------------------------" + Get-Content $outLogFile | Write-Host + + $ex = $process.ExitCode + + if ($null -eq $ex) + { + Trace-Warning -Message "The process $thePid returned a null or invalid exit code value. Assuming and returning 0" + $ex = 0 + } + else + { + Trace-Message "Process $thePid exited with exit code $ex" + } + + return $ex +} + +##################################################################################################### +# Invoke-ExternalProcessWithWaitAndKill +##################################################################################################### + +<# + .SYNOPSIS + Executes an external application, waits for a specified amount of time and then kills it. + .DESCRIPTION + Some applications get stuck when running for the first time. This function starts the + application, then waits and then kills it so that a subsequent run can succeed. + .PARAMETER Path + The path to the application to run. + .PARAMETER Arguments + The array of arguments to pass to the external application. + .PARAMETER Minutes + The amount of time to wait in minutes before killing the external application. + .OUTPUTS + The exit code if one is available from the process. +#> +function Invoke-ExternalProcessWithWaitAndKill +{ + param + ( + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string]$Path, + + [Parameter(Mandatory=$false)] + [string[]]$Arguments, + + [Parameter(Mandatory=$false)] + [ScriptBlock]$Monitor, + + [Parameter(Mandatory=$false)] + [ValidateRange(1, [int]::MaxValue)] + [int]$Minutes + ) + + Trace-Message "Executing application: $Path $Arguments. Will wait $Minutes minutes before killing it." + + $guid = [System.Guid]::NewGuid().ToString("N") + $errLogFileName = -join($guid, "-stderr.log") + $outLogFileName = -join($guid, "-stdout.log") + $errLogFile = Join-Path -Path $Env:TEMP -ChildPath $errLogFileName + $outLogFile = Join-Path -Path $Env:TEMP -ChildPath $outLogFileName + [System.Diagnostics.Process]$process = $null + + if (-not $Arguments) + { + $process = Start-Process -FilePath $Path -NoNewWindow -PassThru -RedirectStandardError $errLogFile -RedirectStandardOutput $outLogFile + } + else + { + $process = Start-Process -FilePath $Path -ArgumentList $Arguments -NoNewWindow -PassThru -RedirectStandardError $errLogFile -RedirectStandardOutput $outLogFile + } + + $handle = $process.Handle + $thePid = $process.Id + $ex = 0 + + Trace-Message -Message "Started process from $Path with PID $thePid (and cached handle $handle)" + + $exited = Wait-ForProcess -Process $process -Minutes $Minutes -Monitor $Monitor + + if (-not $exited) + { + Trace-Warning "CDPXERROR: Process with ID $thePid failed to exit within $Minutes minutes. Killing it." + + try + { + $process.Kill() + Trace-Warning "Killed PID $thePid" + } + catch + { + Trace-Warning "Exception raised while attempting to kill PID $thePid. Perhaps the process has already exited." + $_.Exception | Format-List + } + } + else + { + $ex = $process.ExitCode + Trace-Message "Application $Path exited with exit code $ex" + } + + Trace-Message "STDERR ---------------------------" + Get-Content $errLogFile | Write-Host + + Trace-Message "STDOUT ---------------------------" + Get-Content $outLogFile | Write-Host + + if ($null -eq $ex) + { + Trace-Warning -Message "The process $thePid returned a null or invalid exit code value. Assuming and returning 0" + return 0 + } + + return $ex +} + +##################################################################################################### +# Wait-ForProcess +##################################################################################################### + +<# + .SYNOPSIS + Waits for a previously started process until it exits or there is a timeout. + .DESCRIPTION + Waits for a started process until it exits or a certain amount of time has elapsed. + .PARAMETER Process + The [System.Process] project to wait for. + .PARAMETER Minutes + The amount of time to wait for in minutes. + .PARAMETER Monitor + An optional script block that will be run after each wait interval. +#> +function Wait-ForProcess +{ + param + ( + [Parameter(Mandatory=$true)] + [ValidateNotNull()] + [System.Diagnostics.Process]$Process, + + [Parameter(Mandatory=$true)] + [ValidateRange(1, [int]::MaxValue)] + [int]$Minutes, + + [Parameter(Mandatory=$false)] + [ScriptBlock]$Monitor + ) + + $waitTime = $Minutes + + $handle = $process.Handle + $thePid = $Process.Id + + while ($waitTime -gt 0) + { + Trace-Message -Message "Waiting for process with ID $thePid to exit in $waitTime minutes (handle: $handle) ." + + if ($Process.HasExited) + { + $ex = $Process.ExitCode + Trace-Message "Process with ID $thePid has already exited with exit code $ex" + return $true + } + + Start-Sleep -Seconds 60 + + if ($Monitor) + { + try + { + Trace-Message "Invoking monitor script: $Monitor" + $Monitor.Invoke() + } + catch + { + Trace-Warning "Exception occurred invoking monitoring script" + $_.Exception | Format-List + } + } + + --$waitTime + } + + return $false +} + +##################################################################################################### +# Trace-Message +##################################################################################################### + +<# + .SYNOPSIS + Logs an informational message to the console. + .DESCRIPTION + Writes a message to the console with the current timestamp and an information tag. + .PARAMETER Message + The message to write. +#> +function Trace-Message +{ + param + ( + [Parameter(Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [string]$Message + ) + + $Message = $Message -replace "##vso", "__VSO_DISALLOWED" + $timestamp = Get-Date + Write-Host "[INFO] [$timestamp] $Message" +} + +##################################################################################################### +# Trace-Warning +##################################################################################################### + +<# + .SYNOPSIS + Logs a warning message to the console. + .DESCRIPTION + Writes a warning to the console with the current timestamp and a warning tag. + .PARAMETER Message + The warning to write. +#> +function Trace-Warning +{ + param + ( + [Parameter(Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [string]$Message + ) + + $timestamp = Get-Date + $Message = $Message -replace "##vso", "__VSO_DISALLOWED" + Write-Host "[WARN] [$timestamp] $Message" -ForegroundColor Yellow + Write-Host "##vso[task.logissue type=warning]$Message" +} + +##################################################################################################### +# Trace-Error +##################################################################################################### + +<# + .SYNOPSIS + Logs an error message to the console. + .DESCRIPTION + Writes an error to the console with the current timestamp and an error tag. + .PARAMETER Message + The error to write. +#> +function Trace-Error +{ + param + ( + [Parameter(Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [string]$Message + ) + + $timestamp = Get-Date + $Message = $Message -replace "##vso", "__VSO_DISALLOWED" + Write-Host "[ERROR] [$timestamp] $Message" -ForegroundColor Red + Write-Host "##vso[task.logissue type=error]$Message" +} + +##################################################################################################### +# Expand-ArchiveWith7Zip +##################################################################################################### + +<# + .SYNOPSIS + Uses 7-Zip to expand an archive instead of the standard Expand-Archive cmdlet. + .DESCRIPTION + The Expand-Archive cmdlet is slow compared to using 7-Zip directly. This function + assumes that 7-Zip is installed at C:\7-Zip. + .PARAMETER -Source + The path to the archive file. + .PARAMETER -Destination + The folder to expand into. + .PARAMETER ToolPath + The path to where the 7z.exe tool is available. +#> +function Expand-ArchiveWith7Zip +{ + param + ( + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string]$Source, + + [Parameter(Mandatory=$false)] + [ValidateNotNullOrEmpty()] + [string]$Destination, + + [Parameter(Mandatory=$false)] + [ValidateNotNullOrEmpty()] + [string]$ToolPath = "C:\7-Zip\7z.exe", + + [Parameter(Mandatory=$false)] + [switch]$IgnoreFailures=$false + ) + + Write-Host $Separator + + if (-not $ToolPath) + { + throw "CDPXERROR: The 7-Zip tool was not found at $ToolPath." + } + + if (-not (Test-Path $Source)) + { + throw "CDPXERROR: The specified archive file $Source could not be found." + } + + if (-not $Destination) + { + $sourceDir = [System.IO.Path]::GetDirectoryName($Source); + $Destination = $sourceDir + + Trace-Message "No destination was specified so the default location $Destination was chosen." + } + + Trace-Message "Uncompressing archive $Source into folder $Destination using 7-Zip at $ToolPath" + + Install-FromEXE -Path $ToolPath -Arguments "x -aoa -y `"$Source`" -o`"$Destination`"" -IgnoreFailures:$IgnoreFailures + + Trace-Message "Successfully uncompressed archive at $Source into $Destination" + Write-Host $Separator +} diff --git a/ApplicationInsightsInternalLogger/gradle/dependency-locks/compileClasspath.lockfile b/ApplicationInsightsInternalLogger/gradle/dependency-locks/compileClasspath.lockfile new file mode 100644 index 00000000000..689800736eb --- /dev/null +++ b/ApplicationInsightsInternalLogger/gradle/dependency-locks/compileClasspath.lockfile @@ -0,0 +1,5 @@ +# This is a Gradle generated file for dependency locking. +# Manual edits can break the build and are not advised. +# This file is expected to be part of source control. +commons-io:commons-io:2.6 +org.apache.commons:commons-lang3:3.7 diff --git a/agent/agent-bootstrap/gradle/dependency-locks/compileClasspath.lockfile b/agent/agent-bootstrap/gradle/dependency-locks/compileClasspath.lockfile new file mode 100644 index 00000000000..e4ac1edddad --- /dev/null +++ b/agent/agent-bootstrap/gradle/dependency-locks/compileClasspath.lockfile @@ -0,0 +1,18 @@ +# This is a Gradle generated file for dependency locking. +# Manual edits can break the build and are not advised. +# This file is expected to be part of source control. +ch.qos.logback.contrib:logback-json-classic:0.1.5 +ch.qos.logback.contrib:logback-json-core:0.1.5 +ch.qos.logback:logback-classic:1.2.3 +ch.qos.logback:logback-core:1.2.3 +com.squareup.moshi:moshi:1.9.3 +com.squareup.okio:okio:1.16.0 +io.opentelemetry.instrumentation:opentelemetry-instrumentation-api-caching:1.0.0+ai.patch.1-alpha +io.opentelemetry.instrumentation:opentelemetry-instrumentation-api:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent:opentelemetry-javaagent-api:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent:opentelemetry-javaagent-bootstrap:1.0.0+ai.patch.1-alpha +io.opentelemetry:opentelemetry-api-metrics:1.0.1-alpha +io.opentelemetry:opentelemetry-api:1.0.1 +io.opentelemetry:opentelemetry-context:1.0.1 +io.opentelemetry:opentelemetry-semconv:1.0.1-alpha +org.slf4j:slf4j-api:1.7.25 diff --git a/agent/agent-bootstrap/gradle/dependency-locks/runtimeClasspath.lockfile b/agent/agent-bootstrap/gradle/dependency-locks/runtimeClasspath.lockfile new file mode 100644 index 00000000000..a4e1670a2d2 --- /dev/null +++ b/agent/agent-bootstrap/gradle/dependency-locks/runtimeClasspath.lockfile @@ -0,0 +1,18 @@ +# This is a Gradle generated file for dependency locking. +# Manual edits can break the build and are not advised. +# This file is expected to be part of source control. +ch.qos.logback.contrib:logback-json-classic:0.1.5 +ch.qos.logback.contrib:logback-json-core:0.1.5 +ch.qos.logback:logback-classic:1.2.3 +ch.qos.logback:logback-core:1.2.3 +com.squareup.moshi:moshi:1.9.3 +com.squareup.okio:okio:1.16.0 +io.opentelemetry.instrumentation:opentelemetry-instrumentation-api-caching:1.0.0+ai.patch.1-alpha +io.opentelemetry.instrumentation:opentelemetry-instrumentation-api:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent:opentelemetry-javaagent-api:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent:opentelemetry-javaagent-bootstrap:1.0.0+ai.patch.1-alpha +io.opentelemetry:opentelemetry-api-metrics:1.0.1-alpha +io.opentelemetry:opentelemetry-api:1.0.1 +io.opentelemetry:opentelemetry-context:1.0.1 +io.opentelemetry:opentelemetry-semconv:1.0.1-alpha +org.slf4j:slf4j-api:1.7.30 diff --git a/agent/agent-tooling/gradle/dependency-locks/compileClasspath.lockfile b/agent/agent-tooling/gradle/dependency-locks/compileClasspath.lockfile new file mode 100644 index 00000000000..d74dcc59a72 --- /dev/null +++ b/agent/agent-tooling/gradle/dependency-locks/compileClasspath.lockfile @@ -0,0 +1,52 @@ +# This is a Gradle generated file for dependency locking. +# Manual edits can break the build and are not advised. +# This file is expected to be part of source control. +ch.qos.logback.contrib:logback-json-classic:0.1.5 +ch.qos.logback.contrib:logback-json-core:0.1.5 +ch.qos.logback:logback-classic:1.2.3 +ch.qos.logback:logback-core:1.2.3 +com.google.code.findbugs:jsr305:3.0.2 +com.google.code.gson:gson:2.8.2 +com.google.errorprone:error_prone_annotations:2.2.0 +com.google.guava:failureaccess:1.0.1 +com.google.guava:guava:27.1-android +com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava +com.google.j2objc:j2objc-annotations:1.1 +com.squareup.moshi:moshi:1.9.3 +com.squareup.okio:okio:1.16.0 +commons-codec:commons-codec:1.11 +commons-io:commons-io:2.6 +commons-logging:commons-logging:1.2 +eu.infomas:annotation-detector:3.0.5 +io.opentelemetry.instrumentation:opentelemetry-instrumentation-api-caching:1.0.0+ai.patch.1-alpha +io.opentelemetry.instrumentation:opentelemetry-instrumentation-api:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent:opentelemetry-javaagent-api:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent:opentelemetry-javaagent-bootstrap:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent:opentelemetry-javaagent-spi:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent:opentelemetry-javaagent-tooling:1.0.0+ai.patch.1-alpha +io.opentelemetry:opentelemetry-api-metrics:1.0.1-alpha +io.opentelemetry:opentelemetry-api:1.0.1 +io.opentelemetry:opentelemetry-context:1.0.1 +io.opentelemetry:opentelemetry-sdk-common:1.0.0 +io.opentelemetry:opentelemetry-sdk-extension-autoconfigure:1.0.0-alpha +io.opentelemetry:opentelemetry-sdk-extension-tracing-incubator:1.0.0-alpha +io.opentelemetry:opentelemetry-sdk-metrics:1.0.0-alpha +io.opentelemetry:opentelemetry-sdk-trace:1.0.0 +io.opentelemetry:opentelemetry-sdk:1.0.0 +io.opentelemetry:opentelemetry-semconv:1.0.1-alpha +net.bytebuddy:byte-buddy:1.10.10 +org.apache.commons:commons-lang3:3.11 +org.apache.commons:commons-text:1.9 +org.apache.httpcomponents:httpclient:4.5.13 +org.apache.httpcomponents:httpcore:4.4.13 +org.apache.logging.log4j:log4j-api:2.11.0 +org.apache.logging.log4j:log4j-core:2.11.0 +org.checkerframework:checker-compat-qual:2.5.2 +org.checkerframework:checker-qual-android:3.1.0 +org.codehaus.mojo:animal-sniffer-annotations:1.17 +org.ow2.asm:asm-analysis:8.0.1 +org.ow2.asm:asm-tree:8.0.1 +org.ow2.asm:asm-util:8.0.1 +org.ow2.asm:asm:8.0.1 +org.slf4j:jcl-over-slf4j:1.7.30 +org.slf4j:slf4j-api:1.7.30 diff --git a/agent/agent-tooling/gradle/dependency-locks/runtimeClasspath.lockfile b/agent/agent-tooling/gradle/dependency-locks/runtimeClasspath.lockfile new file mode 100644 index 00000000000..3ea4659cdcd --- /dev/null +++ b/agent/agent-tooling/gradle/dependency-locks/runtimeClasspath.lockfile @@ -0,0 +1,62 @@ +# This is a Gradle generated file for dependency locking. +# Manual edits can break the build and are not advised. +# This file is expected to be part of source control. +com.blogspot.mydailyjava:weak-lock-free:0.15 +com.google.auto.service:auto-service-annotations:1.0-rc7 +com.google.auto.service:auto-service:1.0-rc7 +com.google.auto:auto-common:0.10 +com.google.code.findbugs:jsr305:3.0.2 +com.google.code.gson:gson:2.8.2 +com.google.errorprone:error_prone_annotations:2.2.0 +com.google.guava:failureaccess:1.0.1 +com.google.guava:guava:27.1-android +com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava +com.google.j2objc:j2objc-annotations:1.1 +com.squareup.moshi:moshi:1.8.0 +com.squareup.okio:okio:1.16.0 +commons-codec:commons-codec:1.11 +commons-io:commons-io:2.6 +commons-logging:commons-logging:1.2 +eu.infomas:annotation-detector:3.0.5 +io.opentelemetry.instrumentation:opentelemetry-instrumentation-api-caching:1.0.0+ai.patch.1-alpha +io.opentelemetry.instrumentation:opentelemetry-instrumentation-api:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent:opentelemetry-javaagent-api:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent:opentelemetry-javaagent-bootstrap:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent:opentelemetry-javaagent-spi:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent:opentelemetry-javaagent-tooling:1.0.0+ai.patch.1-alpha +io.opentelemetry:opentelemetry-api-metrics:1.0.1-alpha +io.opentelemetry:opentelemetry-api:1.0.1 +io.opentelemetry:opentelemetry-context:1.0.1 +io.opentelemetry:opentelemetry-extension-aws:1.0.1 +io.opentelemetry:opentelemetry-extension-kotlin:1.0.1 +io.opentelemetry:opentelemetry-extension-trace-propagators:1.0.1 +io.opentelemetry:opentelemetry-sdk-common:1.0.1 +io.opentelemetry:opentelemetry-sdk-extension-autoconfigure:1.0.1-alpha +io.opentelemetry:opentelemetry-sdk-extension-resources:1.0.1 +io.opentelemetry:opentelemetry-sdk-extension-tracing-incubator:1.0.0-alpha +io.opentelemetry:opentelemetry-sdk-metrics:1.0.1-alpha +io.opentelemetry:opentelemetry-sdk-trace:1.0.1 +io.opentelemetry:opentelemetry-sdk:1.0.1 +io.opentelemetry:opentelemetry-semconv:1.0.1-alpha +io.prometheus:simpleclient:0.9.0 +io.prometheus:simpleclient_common:0.9.0 +io.prometheus:simpleclient_httpserver:0.9.0 +net.bytebuddy:byte-buddy-agent:1.10.18 +net.bytebuddy:byte-buddy:1.10.18 +org.apache.commons:commons-lang3:3.11 +org.apache.commons:commons-text:1.9 +org.apache.httpcomponents:httpclient:4.5.13 +org.apache.httpcomponents:httpcore:4.4.13 +org.apache.logging.log4j:log4j-api:2.11.0 +org.apache.logging.log4j:log4j-core:2.11.0 +org.checkerframework:checker-compat-qual:2.5.2 +org.checkerframework:checker-qual-android:3.1.0 +org.codehaus.mojo:animal-sniffer-annotations:1.17 +org.jetbrains.kotlin:kotlin-bom:1.4.21 +org.ow2.asm:asm-analysis:8.0.1 +org.ow2.asm:asm-tree:8.0.1 +org.ow2.asm:asm-util:8.0.1 +org.ow2.asm:asm:8.0.1 +org.slf4j:jcl-over-slf4j:1.7.30 +org.slf4j:slf4j-api:1.7.30 +org.slf4j:slf4j-simple:1.7.30 diff --git a/agent/agent/gradle/dependency-locks/compileClasspath.lockfile b/agent/agent/gradle/dependency-locks/compileClasspath.lockfile new file mode 100644 index 00000000000..e4ac1edddad --- /dev/null +++ b/agent/agent/gradle/dependency-locks/compileClasspath.lockfile @@ -0,0 +1,18 @@ +# This is a Gradle generated file for dependency locking. +# Manual edits can break the build and are not advised. +# This file is expected to be part of source control. +ch.qos.logback.contrib:logback-json-classic:0.1.5 +ch.qos.logback.contrib:logback-json-core:0.1.5 +ch.qos.logback:logback-classic:1.2.3 +ch.qos.logback:logback-core:1.2.3 +com.squareup.moshi:moshi:1.9.3 +com.squareup.okio:okio:1.16.0 +io.opentelemetry.instrumentation:opentelemetry-instrumentation-api-caching:1.0.0+ai.patch.1-alpha +io.opentelemetry.instrumentation:opentelemetry-instrumentation-api:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent:opentelemetry-javaagent-api:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent:opentelemetry-javaagent-bootstrap:1.0.0+ai.patch.1-alpha +io.opentelemetry:opentelemetry-api-metrics:1.0.1-alpha +io.opentelemetry:opentelemetry-api:1.0.1 +io.opentelemetry:opentelemetry-context:1.0.1 +io.opentelemetry:opentelemetry-semconv:1.0.1-alpha +org.slf4j:slf4j-api:1.7.25 diff --git a/agent/agent/gradle/dependency-locks/runtimeClasspath.lockfile b/agent/agent/gradle/dependency-locks/runtimeClasspath.lockfile new file mode 100644 index 00000000000..a4e1670a2d2 --- /dev/null +++ b/agent/agent/gradle/dependency-locks/runtimeClasspath.lockfile @@ -0,0 +1,18 @@ +# This is a Gradle generated file for dependency locking. +# Manual edits can break the build and are not advised. +# This file is expected to be part of source control. +ch.qos.logback.contrib:logback-json-classic:0.1.5 +ch.qos.logback.contrib:logback-json-core:0.1.5 +ch.qos.logback:logback-classic:1.2.3 +ch.qos.logback:logback-core:1.2.3 +com.squareup.moshi:moshi:1.9.3 +com.squareup.okio:okio:1.16.0 +io.opentelemetry.instrumentation:opentelemetry-instrumentation-api-caching:1.0.0+ai.patch.1-alpha +io.opentelemetry.instrumentation:opentelemetry-instrumentation-api:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent:opentelemetry-javaagent-api:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent:opentelemetry-javaagent-bootstrap:1.0.0+ai.patch.1-alpha +io.opentelemetry:opentelemetry-api-metrics:1.0.1-alpha +io.opentelemetry:opentelemetry-api:1.0.1 +io.opentelemetry:opentelemetry-context:1.0.1 +io.opentelemetry:opentelemetry-semconv:1.0.1-alpha +org.slf4j:slf4j-api:1.7.30 diff --git a/agent/exporter/gradle/dependency-locks/compileClasspath.lockfile b/agent/exporter/gradle/dependency-locks/compileClasspath.lockfile new file mode 100644 index 00000000000..61db88aede5 --- /dev/null +++ b/agent/exporter/gradle/dependency-locks/compileClasspath.lockfile @@ -0,0 +1,31 @@ +# This is a Gradle generated file for dependency locking. +# Manual edits can break the build and are not advised. +# This file is expected to be part of source control. +com.google.code.findbugs:jsr305:3.0.2 +com.google.code.gson:gson:2.8.2 +com.google.errorprone:error_prone_annotations:2.2.0 +com.google.guava:failureaccess:1.0.1 +com.google.guava:guava:27.1-android +com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava +com.google.j2objc:j2objc-annotations:1.1 +com.squareup.moshi:moshi:1.8.0 +com.squareup.okio:okio:1.16.0 +commons-codec:commons-codec:1.11 +commons-io:commons-io:2.6 +commons-logging:commons-logging:1.2 +eu.infomas:annotation-detector:3.0.5 +io.opentelemetry.instrumentation:opentelemetry-instrumentation-api-caching:1.0.0+ai.patch.1-alpha +io.opentelemetry.instrumentation:opentelemetry-instrumentation-api:1.0.0+ai.patch.1-alpha +io.opentelemetry:opentelemetry-api:1.0.1 +io.opentelemetry:opentelemetry-context:1.0.1 +io.opentelemetry:opentelemetry-sdk-common:1.0.0 +io.opentelemetry:opentelemetry-sdk-trace:1.0.0 +io.opentelemetry:opentelemetry-sdk:1.0.0 +io.opentelemetry:opentelemetry-semconv:1.0.1-alpha +org.apache.commons:commons-lang3:3.11 +org.apache.commons:commons-text:1.9 +org.apache.httpcomponents:httpclient:4.5.13 +org.apache.httpcomponents:httpcore:4.4.13 +org.checkerframework:checker-compat-qual:2.5.2 +org.codehaus.mojo:animal-sniffer-annotations:1.17 +org.slf4j:slf4j-api:1.7.26 diff --git a/agent/exporter/gradle/dependency-locks/runtimeClasspath.lockfile b/agent/exporter/gradle/dependency-locks/runtimeClasspath.lockfile new file mode 100644 index 00000000000..1cfeafbfa52 --- /dev/null +++ b/agent/exporter/gradle/dependency-locks/runtimeClasspath.lockfile @@ -0,0 +1,30 @@ +# This is a Gradle generated file for dependency locking. +# Manual edits can break the build and are not advised. +# This file is expected to be part of source control. +com.google.code.findbugs:jsr305:3.0.2 +com.google.code.gson:gson:2.8.2 +com.google.errorprone:error_prone_annotations:2.2.0 +com.google.guava:failureaccess:1.0.1 +com.google.guava:guava:27.1-android +com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava +com.google.j2objc:j2objc-annotations:1.1 +com.squareup.moshi:moshi:1.8.0 +com.squareup.okio:okio:1.16.0 +commons-codec:commons-codec:1.11 +commons-io:commons-io:2.6 +commons-logging:commons-logging:1.2 +eu.infomas:annotation-detector:3.0.5 +io.opentelemetry:opentelemetry-api-metrics:1.0.0-alpha +io.opentelemetry:opentelemetry-api:1.0.0 +io.opentelemetry:opentelemetry-context:1.0.0 +io.opentelemetry:opentelemetry-sdk-common:1.0.0 +io.opentelemetry:opentelemetry-sdk-trace:1.0.0 +io.opentelemetry:opentelemetry-sdk:1.0.0 +io.opentelemetry:opentelemetry-semconv:1.0.0-alpha +org.apache.commons:commons-lang3:3.11 +org.apache.commons:commons-text:1.9 +org.apache.httpcomponents:httpclient:4.5.13 +org.apache.httpcomponents:httpcore:4.4.13 +org.checkerframework:checker-compat-qual:2.5.2 +org.codehaus.mojo:animal-sniffer-annotations:1.17 +org.slf4j:slf4j-api:1.7.26 diff --git a/agent/gradle/dependency-locks/compileClasspath.lockfile b/agent/gradle/dependency-locks/compileClasspath.lockfile new file mode 100644 index 00000000000..644962aa405 --- /dev/null +++ b/agent/gradle/dependency-locks/compileClasspath.lockfile @@ -0,0 +1,21 @@ +# This is a Gradle generated file for dependency locking. +# Manual edits can break the build and are not advised. +# This file is expected to be part of source control. +ch.qos.logback:logback-classic:1.2.3 +ch.qos.logback:logback-core:1.2.3 +com.github.trask:checker-framework-annotations-for-jdk6:1.0.0 +com.google.code.findbugs:jsr305:3.0.2 +com.google.errorprone:error_prone_annotations:2.2.0 +com.google.guava:failureaccess:1.0.1 +com.google.guava:guava:27.1-android +com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava +com.google.j2objc:j2objc-annotations:1.1 +org.checkerframework:checker-compat-qual:2.5.2 +org.codehaus.mojo:animal-sniffer-annotations:1.17 +org.glowroot.instrumentation:instrumentation-api:0.14.9 +org.glowroot.instrumentation:instrumentation-engine:0.14.9 +org.ow2.asm:asm-analysis:7.2 +org.ow2.asm:asm-commons:7.2 +org.ow2.asm:asm-tree:7.2 +org.ow2.asm:asm:7.2 +org.slf4j:slf4j-api:1.7.26 diff --git a/agent/gradle/dependency-locks/runtimeClasspath.lockfile b/agent/gradle/dependency-locks/runtimeClasspath.lockfile new file mode 100644 index 00000000000..b5d9947155a --- /dev/null +++ b/agent/gradle/dependency-locks/runtimeClasspath.lockfile @@ -0,0 +1,33 @@ +# This is a Gradle generated file for dependency locking. +# Manual edits can break the build and are not advised. +# This file is expected to be part of source control. +ch.qos.logback:logback-classic:1.2.3 +ch.qos.logback:logback-core:1.2.3 +com.github.trask:checker-framework-annotations-for-jdk6:1.0.0 +com.google.code.findbugs:jsr305:3.0.2 +com.google.errorprone:error_prone_annotations:2.2.0 +com.google.guava:failureaccess:1.0.1 +com.google.guava:guava:27.1-android +com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava +com.google.j2objc:j2objc-annotations:1.1 +org.checkerframework:checker-compat-qual:2.5.2 +org.codehaus.mojo:animal-sniffer-annotations:1.17 +org.glowroot.instrumentation:instrumentation-apache-http-client:0.14.9 +org.glowroot.instrumentation:instrumentation-api:0.14.9 +org.glowroot.instrumentation:instrumentation-engine:0.14.9 +org.glowroot.instrumentation:instrumentation-executor:0.14.9 +org.glowroot.instrumentation:instrumentation-http-url-connection:0.14.9 +org.glowroot.instrumentation:instrumentation-jaxrs:0.14.9 +org.glowroot.instrumentation:instrumentation-jdbc:0.14.9 +org.glowroot.instrumentation:instrumentation-log4j:0.14.9 +org.glowroot.instrumentation:instrumentation-logback:0.14.9 +org.glowroot.instrumentation:instrumentation-mongodb:0.14.9 +org.glowroot.instrumentation:instrumentation-okhttp:0.14.9 +org.glowroot.instrumentation:instrumentation-redis:0.14.9 +org.glowroot.instrumentation:instrumentation-spring:0.14.9 +org.glowroot.instrumentation:instrumentation-struts:0.14.9 +org.ow2.asm:asm-analysis:7.2 +org.ow2.asm:asm-commons:7.2 +org.ow2.asm:asm-tree:7.2 +org.ow2.asm:asm:7.2 +org.slf4j:slf4j-api:1.7.26 diff --git a/agent/instrumentation/gradle/dependency-locks/compileClasspath.lockfile b/agent/instrumentation/gradle/dependency-locks/compileClasspath.lockfile new file mode 100644 index 00000000000..fe944692fe2 --- /dev/null +++ b/agent/instrumentation/gradle/dependency-locks/compileClasspath.lockfile @@ -0,0 +1,102 @@ +# This is a Gradle generated file for dependency locking. +# Manual edits can break the build and are not advised. +# This file is expected to be part of source control. +com.google.code.findbugs:jsr305:3.0.2 +com.google.code.gson:gson:2.8.2 +com.google.errorprone:error_prone_annotations:2.2.0 +com.google.guava:failureaccess:1.0.1 +com.google.guava:guava:27.1-android +com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava +com.google.j2objc:j2objc-annotations:1.1 +com.squareup.moshi:moshi:1.8.0 +com.squareup.okio:okio:1.16.0 +commons-codec:commons-codec:1.11 +commons-io:commons-io:2.6 +commons-logging:commons-logging:1.2 +eu.infomas:annotation-detector:3.0.5 +io.opentelemetry.instrumentation:opentelemetry-instrumentation-api-caching:1.0.0+ai.patch.1-alpha +io.opentelemetry.instrumentation:opentelemetry-instrumentation-api:1.0.0+ai.patch.1-alpha +io.opentelemetry.instrumentation:opentelemetry-netty-4.1:1.0.0+ai.patch.1-alpha +io.opentelemetry.instrumentation:opentelemetry-servlet-2.2:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-apache-httpasyncclient-4.1:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-apache-httpclient-2.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-apache-httpclient-4.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-apache-httpclient-5.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-applicationinsights-web-2.3:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-azure-functions:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-cassandra-3.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-cassandra-4.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-classloaders:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-eclipse-osgi-3.6:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-executors:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-grpc-1.5:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-http-url-connection:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-java-util-logging-spans:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-jaxrs-1.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-jaxrs-2.0-common:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-jaxrs-2.0-jersey-2.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-jaxrs-2.0-resteasy-3.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-jaxrs-2.0-resteasy-3.1:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-jdbc:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-jedis-1.4:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-jedis-3.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-jetty-8.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-jms-1.1:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-kafka-clients-0.11:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-kafka-streams-0.11:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-kotlinx-coroutines:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-lettuce-4.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-lettuce-5.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-lettuce-5.1:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-lettuce-common:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-log4j-spans-1.2:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-log4j-spans-2.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-logback-spans-1.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-micrometer-1.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-mongo-3.1:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-mongo-3.7:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-mongo-async-3.3:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-mongo-common:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-netty-4.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-netty-4.1:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-okhttp-3.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-opentelemetry-annotations-1.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-opentelemetry-api-1.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-reactor-3.1:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-reactor-netty-0.9:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-reactor-netty-1.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-servlet-2.2:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-servlet-3.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-servlet-common:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-spring-scheduling-3.1:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-spring-webflux-5.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-spring-webmvc-3.1:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-tomcat-7.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent:opentelemetry-javaagent-spi:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent:opentelemetry-javaagent-tooling:1.0.0+ai.patch.1-alpha +io.opentelemetry:opentelemetry-api-metrics:1.0.0-alpha +io.opentelemetry:opentelemetry-api:1.0.1 +io.opentelemetry:opentelemetry-context:1.0.1 +io.opentelemetry:opentelemetry-sdk-common:1.0.0 +io.opentelemetry:opentelemetry-sdk-extension-autoconfigure:1.0.0-alpha +io.opentelemetry:opentelemetry-sdk-extension-tracing-incubator:1.0.0-alpha +io.opentelemetry:opentelemetry-sdk-metrics:1.0.0-alpha +io.opentelemetry:opentelemetry-sdk-trace:1.0.0 +io.opentelemetry:opentelemetry-sdk:1.0.0 +io.opentelemetry:opentelemetry-semconv:1.0.1-alpha +net.bytebuddy:byte-buddy:1.10.10 +org.apache.commons:commons-lang3:3.11 +org.apache.commons:commons-text:1.9 +org.apache.httpcomponents:httpclient:4.5.13 +org.apache.httpcomponents:httpcore:4.4.13 +org.apache.logging.log4j:log4j-api:2.11.0 +org.apache.logging.log4j:log4j-core:2.11.0 +org.checkerframework:checker-compat-qual:2.5.2 +org.checkerframework:checker-qual-android:3.1.0 +org.codehaus.mojo:animal-sniffer-annotations:1.17 +org.ow2.asm:asm-analysis:8.0.1 +org.ow2.asm:asm-tree:8.0.1 +org.ow2.asm:asm-util:8.0.1 +org.ow2.asm:asm:8.0.1 +org.slf4j:jcl-over-slf4j:1.7.30 +org.slf4j:slf4j-api:1.7.30 diff --git a/agent/instrumentation/gradle/dependency-locks/runtimeClasspath.lockfile b/agent/instrumentation/gradle/dependency-locks/runtimeClasspath.lockfile new file mode 100644 index 00000000000..7a76a25d328 --- /dev/null +++ b/agent/instrumentation/gradle/dependency-locks/runtimeClasspath.lockfile @@ -0,0 +1,123 @@ +# This is a Gradle generated file for dependency locking. +# Manual edits can break the build and are not advised. +# This file is expected to be part of source control. +com.blogspot.mydailyjava:weak-lock-free:0.15 +com.google.auto.service:auto-service-annotations:1.0-rc7 +com.google.auto.service:auto-service:1.0-rc7 +com.google.auto:auto-common:0.10 +com.google.code.findbugs:jsr305:3.0.2 +com.google.code.gson:gson:2.8.2 +com.google.errorprone:error_prone_annotations:2.2.0 +com.google.guava:failureaccess:1.0.1 +com.google.guava:guava:27.1-android +com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava +com.google.j2objc:j2objc-annotations:1.1 +com.squareup.moshi:moshi:1.8.0 +com.squareup.okio:okio:1.16.0 +commons-codec:commons-codec:1.11 +commons-io:commons-io:2.6 +commons-logging:commons-logging:1.2 +eu.infomas:annotation-detector:3.0.5 +io.opentelemetry.instrumentation:opentelemetry-grpc-1.5:1.0.0+ai.patch.1-alpha +io.opentelemetry.instrumentation:opentelemetry-instrumentation-api-caching:1.0.0+ai.patch.1-alpha +io.opentelemetry.instrumentation:opentelemetry-instrumentation-api:1.0.0+ai.patch.1-alpha +io.opentelemetry.instrumentation:opentelemetry-lettuce-5.1:1.0.0+ai.patch.1-alpha +io.opentelemetry.instrumentation:opentelemetry-netty-4.1:1.0.0+ai.patch.1-alpha +io.opentelemetry.instrumentation:opentelemetry-okhttp-3.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.instrumentation:opentelemetry-reactor-3.1:1.0.0+ai.patch.1-alpha +io.opentelemetry.instrumentation:opentelemetry-servlet-2.2:1.0.0+ai.patch.1-alpha +io.opentelemetry.instrumentation:opentelemetry-spring-webflux-5.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-apache-httpasyncclient-4.1:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-apache-httpclient-2.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-apache-httpclient-4.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-apache-httpclient-5.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-applicationinsights-web-2.3:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-azure-functions:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-cassandra-3.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-cassandra-4.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-classloaders:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-eclipse-osgi-3.6:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-executors:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-grpc-1.5:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-http-url-connection:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-java-util-logging-spans:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-jaxrs-1.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-jaxrs-2.0-common:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-jaxrs-2.0-jersey-2.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-jaxrs-2.0-resteasy-3.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-jaxrs-2.0-resteasy-3.1:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-jdbc:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-jedis-1.4:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-jedis-3.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-jetty-8.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-jms-1.1:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-kafka-clients-0.11:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-kafka-streams-0.11:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-kotlinx-coroutines:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-lettuce-4.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-lettuce-5.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-lettuce-5.1:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-lettuce-common:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-log4j-spans-1.2:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-log4j-spans-2.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-logback-spans-1.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-micrometer-1.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-mongo-3.1:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-mongo-3.7:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-mongo-async-3.3:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-mongo-common:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-netty-4.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-netty-4.1:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-okhttp-3.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-opentelemetry-annotations-1.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-opentelemetry-api-1.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-reactor-3.1:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-reactor-netty-0.9:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-reactor-netty-1.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-servlet-2.2:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-servlet-3.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-servlet-common:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-spring-scheduling-3.1:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-spring-webflux-5.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-spring-webmvc-3.1:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-tomcat-7.0:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent:opentelemetry-javaagent-api:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent:opentelemetry-javaagent-bootstrap:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent:opentelemetry-javaagent-spi:1.0.0+ai.patch.1-alpha +io.opentelemetry.javaagent:opentelemetry-javaagent-tooling:1.0.0+ai.patch.1-alpha +io.opentelemetry:opentelemetry-api-metrics:1.0.1-alpha +io.opentelemetry:opentelemetry-api:1.0.1 +io.opentelemetry:opentelemetry-context:1.0.1 +io.opentelemetry:opentelemetry-extension-aws:1.0.1 +io.opentelemetry:opentelemetry-extension-kotlin:1.0.1 +io.opentelemetry:opentelemetry-extension-trace-propagators:1.0.1 +io.opentelemetry:opentelemetry-sdk-common:1.0.1 +io.opentelemetry:opentelemetry-sdk-extension-autoconfigure:1.0.1-alpha +io.opentelemetry:opentelemetry-sdk-extension-resources:1.0.1 +io.opentelemetry:opentelemetry-sdk-extension-tracing-incubator:1.0.0-alpha +io.opentelemetry:opentelemetry-sdk-metrics:1.0.1-alpha +io.opentelemetry:opentelemetry-sdk-trace:1.0.1 +io.opentelemetry:opentelemetry-sdk:1.0.1 +io.opentelemetry:opentelemetry-semconv:1.0.1-alpha +io.prometheus:simpleclient:0.9.0 +io.prometheus:simpleclient_common:0.9.0 +io.prometheus:simpleclient_httpserver:0.9.0 +net.bytebuddy:byte-buddy-agent:1.10.18 +net.bytebuddy:byte-buddy:1.10.18 +org.apache.commons:commons-lang3:3.11 +org.apache.commons:commons-text:1.9 +org.apache.httpcomponents:httpclient:4.5.13 +org.apache.httpcomponents:httpcore:4.4.13 +org.apache.logging.log4j:log4j-api:2.11.0 +org.apache.logging.log4j:log4j-core:2.11.0 +org.checkerframework:checker-compat-qual:2.5.2 +org.checkerframework:checker-qual-android:3.1.0 +org.codehaus.mojo:animal-sniffer-annotations:1.17 +org.jetbrains.kotlin:kotlin-bom:1.4.21 +org.ow2.asm:asm-analysis:8.0.1 +org.ow2.asm:asm-tree:8.0.1 +org.ow2.asm:asm-util:8.0.1 +org.ow2.asm:asm:8.0.1 +org.slf4j:jcl-over-slf4j:1.7.30 +org.slf4j:slf4j-api:1.7.30 +org.slf4j:slf4j-simple:1.7.30 diff --git a/azure-application-insights-spring-boot-starter/gradle/dependency-locks/compileClasspath.lockfile b/azure-application-insights-spring-boot-starter/gradle/dependency-locks/compileClasspath.lockfile new file mode 100644 index 00000000000..fae133236c4 --- /dev/null +++ b/azure-application-insights-spring-boot-starter/gradle/dependency-locks/compileClasspath.lockfile @@ -0,0 +1,37 @@ +# This is a Gradle generated file for dependency locking. +# Manual edits can break the build and are not advised. +# This file is expected to be part of source control. +ch.qos.logback:logback-classic:1.1.11 +ch.qos.logback:logback-core:1.1.11 +com.fasterxml.jackson.core:jackson-annotations:2.8.0 +com.fasterxml.jackson.core:jackson-core:2.8.10 +com.fasterxml.jackson.core:jackson-databind:2.8.11.3 +com.fasterxml:classmate:1.3.1 +commons-io:commons-io:2.6 +commons-logging:commons-logging:1.2 +javax.validation:validation-api:1.1.0.Final +org.apache.commons:commons-lang3:3.7 +org.apache.tomcat.embed:tomcat-embed-core:8.5.40 +org.apache.tomcat.embed:tomcat-embed-el:8.5.40 +org.apache.tomcat.embed:tomcat-embed-websocket:8.5.40 +org.apache.tomcat:tomcat-annotations-api:8.5.40 +org.hibernate:hibernate-validator:5.3.6.Final +org.jboss.logging:jboss-logging:3.3.0.Final +org.slf4j:jcl-over-slf4j:1.7.26 +org.slf4j:jul-to-slf4j:1.7.26 +org.slf4j:log4j-over-slf4j:1.7.26 +org.slf4j:slf4j-api:1.7.26 +org.springframework.boot:spring-boot-autoconfigure:1.5.21.RELEASE +org.springframework.boot:spring-boot-configuration-processor:1.5.21.RELEASE +org.springframework.boot:spring-boot-starter-logging:1.5.21.RELEASE +org.springframework.boot:spring-boot-starter-tomcat:1.5.21.RELEASE +org.springframework.boot:spring-boot-starter-web:1.5.21.RELEASE +org.springframework.boot:spring-boot-starter:1.5.21.RELEASE +org.springframework.boot:spring-boot:1.5.21.RELEASE +org.springframework:spring-aop:4.3.24.RELEASE +org.springframework:spring-beans:4.3.24.RELEASE +org.springframework:spring-context:4.3.24.RELEASE +org.springframework:spring-core:4.3.24.RELEASE +org.springframework:spring-expression:4.3.24.RELEASE +org.springframework:spring-web:4.3.24.RELEASE +org.springframework:spring-webmvc:4.3.24.RELEASE diff --git a/azure-application-insights-spring-boot-starter/gradle/dependency-locks/runtimeClasspath.lockfile b/azure-application-insights-spring-boot-starter/gradle/dependency-locks/runtimeClasspath.lockfile new file mode 100644 index 00000000000..689800736eb --- /dev/null +++ b/azure-application-insights-spring-boot-starter/gradle/dependency-locks/runtimeClasspath.lockfile @@ -0,0 +1,5 @@ +# This is a Gradle generated file for dependency locking. +# Manual edits can break the build and are not advised. +# This file is expected to be part of source control. +commons-io:commons-io:2.6 +org.apache.commons:commons-lang3:3.7 diff --git a/build.gradle b/build.gradle index 7c6c5b2dcd7..fcbc486a9e2 100644 --- a/build.gradle +++ b/build.gradle @@ -23,19 +23,14 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar // region Common configurations -buildscript { - repositories { - mavenCentral() - maven { - url "https://plugins.gradle.org/m2/" - } - } - dependencies { - classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.14' - classpath 'org.owasp:dependency-check-gradle:5.2.2' - classpath 'com.github.jengelman.gradle.plugins:shadow:5.0.0' - classpath 'com.github.spotbugs:spotbugs-gradle-plugin:3.0.0' - } +plugins { + id 'idea' + + id "com.github.johnrengelman.shadow" version "6.1.0" apply false + + id "org.owasp.dependencycheck" version "6.1.2" + id "com.diffplug.spotless" version "5.8.2" + id "com.github.spotbugs" version "4.6.0" apply false } ext.buildScriptsDir = "$rootDir/gradle" @@ -46,7 +41,6 @@ apply from: "$buildScriptsDir/common.gradle" // region Root project script -def rootProjectBuildFolder = "$rootDir/build" ext { isBuildServer = (System.properties["isBuildServer"] ?: "false").toBoolean() isRelease = (System.properties["isRelease"] ?: "false").toBoolean() @@ -58,12 +52,6 @@ ext { } } -task clean { - doLast { - delete(rootProjectBuildFolder) - } -} - allprojects { task generateLockfiles { doFirst { @@ -78,6 +66,25 @@ allprojects { } } + tasks.register('resolveDependencies') { + enabled !configurations.isEmpty() + configurations.findAll { c -> + c.allDependencies.findAll { d -> + d instanceof ProjectDependency + }.each { d -> + dependsOn d.getDependencyProject().tasks.named('resolveDependencies') + } + } + doLast { + configurations.findAll { + it.canBeResolved + }.each { + logger.info "Resolving $it" + it.files + } + } + } + tasks.withType(JavaCompile) { doFirst { logger.info("sourceCompatibility = $sourceCompatibility") diff --git a/buildSrc/src/main/groovy/com/microsoft/applicationinsights/build/tasks/PropertiesFileGenerator.groovy b/buildSrc/src/main/groovy/com/microsoft/applicationinsights/build/tasks/PropertiesFileGenerator.groovy index 8d3bfc95352..a81db0b4dfd 100644 --- a/buildSrc/src/main/groovy/com/microsoft/applicationinsights/build/tasks/PropertiesFileGenerator.groovy +++ b/buildSrc/src/main/groovy/com/microsoft/applicationinsights/build/tasks/PropertiesFileGenerator.groovy @@ -44,8 +44,8 @@ class PropsFileGen extends DefaultTask { } Properties oldProps = new Properties(); - targetFile.withInputStream { ifs -> - oldProps.load(ifs); + targetFile.withInputStream { inFileStream -> + oldProps.load(inFileStream); } return oldProps.equals(props); diff --git a/core/build.gradle b/core/build.gradle index 27ca6955210..93c37a49b82 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -46,7 +46,6 @@ clean { // so instead of building the DLLs, we are currently just copying the previously built DLLs from 2.6.2 which work fine // (see copyTheDLL task below) -/* import org.apache.tools.ant.taskdefs.condition.Os boolean skipWinNative = (System.properties['skipWinNative'] ?: 'false').toBoolean() @@ -63,7 +62,6 @@ if (skipWinNative) { logger.warn("Native binaries build is only supported on Windows systems; native components will not be built.") } } -*/ import com.microsoft.applicationinsights.build.tasks.PropsFileGen diff --git a/core/gradle/dependency-locks/compileClasspath.lockfile b/core/gradle/dependency-locks/compileClasspath.lockfile new file mode 100644 index 00000000000..5ad2cbdafa2 --- /dev/null +++ b/core/gradle/dependency-locks/compileClasspath.lockfile @@ -0,0 +1,23 @@ +# This is a Gradle generated file for dependency locking. +# Manual edits can break the build and are not advised. +# This file is expected to be part of source control. +com.google.code.findbugs:jsr305:3.0.2 +com.google.code.gson:gson:2.8.2 +com.google.errorprone:error_prone_annotations:2.2.0 +com.google.guava:failureaccess:1.0.1 +com.google.guava:guava:27.1-android +com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava +com.google.j2objc:j2objc-annotations:1.1 +com.squareup.moshi:moshi:1.8.0 +com.squareup.okio:okio:1.16.0 +commons-codec:commons-codec:1.11 +commons-io:commons-io:2.6 +commons-logging:commons-logging:1.2 +eu.infomas:annotation-detector:3.0.5 +org.apache.commons:commons-lang3:3.11 +org.apache.commons:commons-text:1.9 +org.apache.httpcomponents:httpclient:4.5.13 +org.apache.httpcomponents:httpcore:4.4.13 +org.checkerframework:checker-compat-qual:2.5.2 +org.codehaus.mojo:animal-sniffer-annotations:1.17 +org.slf4j:slf4j-api:1.7.26 diff --git a/core/gradle/dependency-locks/runtimeClasspath.lockfile b/core/gradle/dependency-locks/runtimeClasspath.lockfile new file mode 100644 index 00000000000..5ad2cbdafa2 --- /dev/null +++ b/core/gradle/dependency-locks/runtimeClasspath.lockfile @@ -0,0 +1,23 @@ +# This is a Gradle generated file for dependency locking. +# Manual edits can break the build and are not advised. +# This file is expected to be part of source control. +com.google.code.findbugs:jsr305:3.0.2 +com.google.code.gson:gson:2.8.2 +com.google.errorprone:error_prone_annotations:2.2.0 +com.google.guava:failureaccess:1.0.1 +com.google.guava:guava:27.1-android +com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava +com.google.j2objc:j2objc-annotations:1.1 +com.squareup.moshi:moshi:1.8.0 +com.squareup.okio:okio:1.16.0 +commons-codec:commons-codec:1.11 +commons-io:commons-io:2.6 +commons-logging:commons-logging:1.2 +eu.infomas:annotation-detector:3.0.5 +org.apache.commons:commons-lang3:3.11 +org.apache.commons:commons-text:1.9 +org.apache.httpcomponents:httpclient:4.5.13 +org.apache.httpcomponents:httpcore:4.4.13 +org.checkerframework:checker-compat-qual:2.5.2 +org.codehaus.mojo:animal-sniffer-annotations:1.17 +org.slf4j:slf4j-api:1.7.26 diff --git a/core/native.gradle b/core/native.gradle index f94b155765a..461f305f77e 100644 --- a/core/native.gradle +++ b/core/native.gradle @@ -37,14 +37,16 @@ def javaIncludeDir = new File(System.env.'JAVA_HOME', "include") def programFilesX86 = System.env.'ProgramFiles(x86)' ?: 'C:\\Program Files (x86)' def winSdkDir = "$programFilesX86\\Windows Kits\\8.1" -if (System.env.APPINSIGHTS_WIN_SDK_PATH) { - winSdkDir = System.env.APPINSIGHTS_WIN_SDK_PATH - println "Using custom Windows SDK path: $winSdkDir" +if (System.env.APPINSIGHTS_WIN81_SDK_PATH) { + winSdkDir = System.env.APPINSIGHTS_WIN81_SDK_PATH + logger.info "Using custom Windows SDK path: $winSdkDir" +} else { + logger.info "Using default Windows SDK path: $winSdkDir" } def vsToolsDir = "$programFilesX86\\Microsoft Visual Studio 14.0" if (System.env.APPINSIGHTS_VS_PATH) { vsToolsDir = System.env.APPINSIGHTS_VS_PATH - println "Using custom Visual Studio Tools path: $vsToolsDir" + logger.info "Using custom Visual Studio Tools path: $vsToolsDir" } idea { @@ -57,8 +59,12 @@ idea { model { toolChains { visualCpp(VisualCpp) { + logger.info "Setting custom Windows SDK path: $winSdkDir" windowsSdkDir winSdkDir - installDir vsToolsDir + if (System.env.APPINSIGHTS_VS_PATH) { + logger.info "Setting custom VS Build Tools path: $vsToolsDir" + installDir vsToolsDir + } } } buildTypes { @@ -86,27 +92,26 @@ model { } } - if ((System.properties["isRelease"] ?: "false").toBoolean()) { - targetBuildTypes "release" - } else { - targetBuildTypes "debug" - } - binaries.all { - if (delegate instanceof StaticLibraryBinarySpec) { + // Only build shared libraries + if (!(delegate instanceof SharedLibraryBinarySpec)) { buildable = false - } else { - assert (delegate instanceof SharedLibraryBinarySpec) - sharedLibraryFile = ReconstructFileName(sharedLibraryFile, buildType, targetPlatform) + return + } + + sharedLibraryFile = ReconstructFileName(sharedLibraryFile, targetPlatform) + def shouldExport = project.properties.isRelease.asBoolean() == (buildType == buildTypes.release) + if (shouldExport) { + logger.info "Adding \"$sharedLibraryFile.parentFile\" to sourceSets.main.resources" + sourceSets.main.resources.srcDir sharedLibraryFile.parentFile + } tasks.all { t -> + t.enabled = !project.properties["core.native.artifacts.prebuilt"].asBoolean() + if (shouldExport) { logger.info "Adding \"processResources\".dependsOn \"$t\" (${t.getClass()})" processResources.dependsOn t } - - logger.info "Adding \"$sharedLibraryFile.parentFile\" to sourceSets.main.resources" - sourceSets.main.resources.srcDir sharedLibraryFile.parentFile - } if (toolChain in VisualCpp) { // Visual Studio Compiler Options: https://msdn.microsoft.com/en-us/library/fwkeyyhe.aspx @@ -173,9 +178,13 @@ sourceSets { } } +tasks.register('windowsSharedLibrary') { + dependsOn windowsX64DebugSharedLibrary, windowsX86DebugSharedLibrary, windowsX64ReleaseSharedLibrary, windowsX86ReleaseSharedLibrary +} + // This function will reconstruct the file name based on the buildType and targetPlatform -// New file name structure: <32|64>[dbg]. -def ReconstructFileName(File originalFile, BuildType buildType, NativePlatform targetPlatform) { +// New file name structure: <32|64>. +def ReconstructFileName(File originalFile, NativePlatform targetPlatform) { def originalFileName = originalFile.absolutePath def filePath = FilenameUtils.getFullPath(originalFileName) def baseName = FilenameUtils.getBaseName(originalFileName) @@ -195,7 +204,7 @@ def ReconstructFileName(File originalFile, BuildType buildType, NativePlatform t def newName = "$baseName$bitnessPart.$extension" def newFile = new File(filePath, newName) - logger.info "Reconstructed file name: $originalFile => $newFile" + logger.debug "Reconstructed file name: $originalFile => $newFile" newFile } diff --git a/etw/README.md b/etw/README.md index 8e17cbd6120..627673e382b 100644 --- a/etw/README.md +++ b/etw/README.md @@ -13,7 +13,7 @@ To build the native resources, you'll need Java resources are built with same requirements as the SDK. The build should find the tools and Windows SDK, but if needed these environment variables are provided to locate the necessary tools and libraries: -* `APPINSIGHTS_WIN_SDK_PATH` +* `APPINSIGHTS_WIN10_SDK_PATH` * Location of Windows SDK * Default: `"%ProgramFiles(x86)%/Windows Kits/10"` * `APPINSIGHTS_VS_PATH` @@ -21,7 +21,7 @@ The build should find the tools and Windows SDK, but if needed these environment * Default: `%ProgramFiles(x86)%/Microsoft Visual Studio 14.0` * `APPINSIGHTS_WIN_SDK_LIB_PATH` * Location of Windows 10 SDK library folder (for linker requirements) - * Default: `%APPINSIGHTS_WIN_SDK_PATH%/Lib/10.0.18362.0/um` + * Default: `%APPINSIGHTS_WIN10_SDK_PATH%/Lib/10.0.18362.0/um` ## Native Build Tasks diff --git a/etw/java/gradle/dependency-locks/compileClasspath.lockfile b/etw/java/gradle/dependency-locks/compileClasspath.lockfile new file mode 100644 index 00000000000..fd759ca31a6 --- /dev/null +++ b/etw/java/gradle/dependency-locks/compileClasspath.lockfile @@ -0,0 +1,4 @@ +# This is a Gradle generated file for dependency locking. +# Manual edits can break the build and are not advised. +# This file is expected to be part of source control. +org.slf4j:slf4j-api:1.7.26 diff --git a/etw/java/gradle/dependency-locks/runtimeClasspath.lockfile b/etw/java/gradle/dependency-locks/runtimeClasspath.lockfile new file mode 100644 index 00000000000..fd759ca31a6 --- /dev/null +++ b/etw/java/gradle/dependency-locks/runtimeClasspath.lockfile @@ -0,0 +1,4 @@ +# This is a Gradle generated file for dependency locking. +# Manual edits can break the build and are not advised. +# This file is expected to be part of source control. +org.slf4j:slf4j-api:1.7.26 diff --git a/etw/native/build.gradle b/etw/native/build.gradle index 47caeaca733..9829483ed5d 100644 --- a/etw/native/build.gradle +++ b/etw/native/build.gradle @@ -31,9 +31,9 @@ def programFilesX86 = System.env.'ProgramFiles(x86)' ?: 'C:/Program Files (x86)' // TraceLoggingProvider.h in Windows 10 SDK def winSdkDir = "$programFilesX86/Windows Kits/10" -if (System.env.APPINSIGHTS_WIN_SDK_PATH) { - winSdkDir = System.env.APPINSIGHTS_WIN_SDK_PATH - logger.info "Windows SDK path set with environment variable, APPINSIGHTS_WIN_SDK_PATH" +if (System.env.APPINSIGHTS_WIN10_SDK_PATH) { + winSdkDir = System.env.APPINSIGHTS_WIN10_SDK_PATH + logger.info "Windows SDK path set with environment variable, APPINSIGHTS_WIN10_SDK_PATH" } def vsToolsDir = "$programFilesX86/Microsoft Visual Studio 14.0" if (System.env.APPINSIGHTS_VS_PATH) { diff --git a/gradle.properties b/gradle.properties index f7ff662d66c..5e677380adc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ // Project properties -version=3.0.3-BETA.2 +version=3.0.3-HEYA-TEST group=com.microsoft.azure \ No newline at end of file diff --git a/gradle/common-java.gradle b/gradle/common-java.gradle index 067d6de288b..448ba6737cb 100644 --- a/gradle/common-java.gradle +++ b/gradle/common-java.gradle @@ -45,26 +45,39 @@ checkstyle { configProperties["rootDir"] = rootProject.projectDir showViolations = false } + spotbugs { + ignoreFailures = false effort = 'max' reportLevel = 'medium' - ignoreFailures = false - sourceSets = [sourceSets.main] -} -spotbugsMain.classpath = configurations.compileOnly + sourceSets.main.runtimeClasspath -tasks.withType(JavaCompile) { - dependencies { - // See https://find-sec-bugs.github.io/bugs.htm for bug pattern definitions - spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.9.0' - } def spotbugsExcludeFile = file("$projectDir/spotbugs.exclude.xml") - if (spotbugsExcludeFile.exists() && !spotbugs.excludeFilter) { - logger.info "${project} using spotbugs exclude file ${spotbugsExcludeFile.absolutePath}" - spotbugs.excludeFilter = spotbugsExcludeFile + if (spotbugsExcludeFile.exists()) { + excludeFilter = spotbugsExcludeFile + } +} + +spotbugsTest.enabled = false + +spotbugsMain { + reports { + html.enabled = true + xml.enabled = true + html { + stylesheet = 'fancy-hist.xsl' + } } } +dependencies { + // See https://find-sec-bugs.github.io/bugs.htm for bug pattern definitions + spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.9.0' +} + +tasks.withType(JavaCompile) { + options.release.set(8) +} + tasks.withType(Checkstyle) { reports { xml.enabled true @@ -95,8 +108,6 @@ jacocoTestReport { } } -updateTestDirectories() - sourceSets { integrationTest { java.srcDir file('src/integTest/java') @@ -207,17 +218,3 @@ tasks.withType(Test) { // endregion Shared java configuration - -// region Helper Methods - -def updateTestDirectories() { - if (this.hasProperty("testEnvName")) { - testResultsDirName = testResultsDirName + "/" + testEnvName - logger.info('Test results folder for project "' + project.name + '" set to "' + testResultsDir + '"') - - testReportDirName = testReportDirName + "/" + testEnvName - logger.info('Test report folder for project "' + project.name + '" set to ' + testReportDirName + '"') - } -} - -// endregion Helper Methods diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 5c2d1cf016b..62d4c053550 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 5028f28f8e4..8cf6eb5ad22 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 8e25e6c19d5..fbd7c515832 100755 --- a/gradlew +++ b/gradlew @@ -82,6 +82,7 @@ esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then @@ -125,10 +126,11 @@ if $darwin; then GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath @@ -154,19 +156,19 @@ if $cygwin ; then else eval `echo args$i`="\"$arg\"" fi - i=$((i+1)) + i=`expr $i + 1` done case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; esac fi @@ -175,14 +177,9 @@ save () { for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done echo " " } -APP_ARGS=$(save "$@") +APP_ARGS=`save "$@"` # Collect all arguments for the java command, following the shell quoting and substitution rules eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi - exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index 9618d8d9607..5093609d512 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @@ -81,6 +84,7 @@ set CMD_LINE_ARGS=%* set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + @rem Execute Gradle "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% diff --git a/settings.gradle b/settings.gradle index f96e8481912..67b0be35f6c 100644 --- a/settings.gradle +++ b/settings.gradle @@ -18,6 +18,7 @@ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ +rootProject.name = 'applicationinsights-java' include 'instrumentation:azure-functions' diff --git a/test/smoke/README.md b/test/smoke/README.md index 037673d51ff..6f50d8f2b4c 100644 --- a/test/smoke/README.md +++ b/test/smoke/README.md @@ -227,4 +227,4 @@ See [gradle documentation](gradledocs) for more information. [windock]: https://www.docker.com/docker-windows [dhub]: https://hub.docker.com/ -[gradledocs]: https://docs.gradle.org/current/userguide/userguide.html +[gradledocs]: https://docs.gradle.org/current/userguide/userguide.html \ No newline at end of file diff --git a/test/smoke/appServers/build.gradle b/test/smoke/appServers/build.gradle index 6f68ccbb7d4..96604f71760 100644 --- a/test/smoke/appServers/build.gradle +++ b/test/smoke/appServers/build.gradle @@ -211,4 +211,4 @@ def getConfigSet(File universeFile, File includesFile, File excludesFile) { def resultantSet = includeSet.intersect(universalSet.minus(excludeSet)).plus(uniqueIncludes) return resultantSet -} +} \ No newline at end of file diff --git a/test/smoke/testApps/gRPC/build.gradle b/test/smoke/testApps/gRPC/build.gradle index 44b5e290770..41678fb359c 100644 --- a/test/smoke/testApps/gRPC/build.gradle +++ b/test/smoke/testApps/gRPC/build.gradle @@ -1,14 +1,7 @@ -buildscript { - dependencies { - classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.10' - } -} - plugins { id 'java' id 'org.springframework.boot' version '2.1.7.RELEASE' - id 'com.google.protobuf' - id 'idea' // this adds generated gRPC classes to intellij + id 'com.google.protobuf' version '0.8.14' } sourceCompatibility = 1.8