Files
ScoreKeeper/tools/powershell/Build-Plugin.ps1
2025-08-06 19:55:54 -07:00

20 lines
536 B
PowerShell

#!/usr/bin/env pwsh
# Set strict mode for better error handling
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
# Find project root (two directories above this script)
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
$ProjectRoot = Split-Path -Parent (Split-Path -Parent $ScriptDir)
# Save current location and change to project root
Push-Location $ProjectRoot
try {
# Build the project using Gradle
& ".\gradlew.bat" build
} finally {
# Always restore the original location
Pop-Location
}