From 82cfc6d1f6fac475f061732fd7013728ad0897a5 Mon Sep 17 00:00:00 2001 From: Lev Rusanov <30170278+JDM170@users.noreply.github.com> Date: Sun, 31 Mar 2024 12:42:25 +0700 Subject: [PATCH] Update Build.ps1 Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com> --- Build.ps1 | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Build.ps1 b/Build.ps1 index c33d830..d3aa0d1 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -5,7 +5,7 @@ * ReVanced CLI; * ReVanced Patches; * ReVanced Integrations; - * microG GmsCore; + * ReVanced microG GmsCore; * Azul Zulu. .NOTES @@ -34,14 +34,13 @@ if (-not (Test-Path -Path "$WorkingFolder\ReVanced")) New-Item -Path "$WorkingFolder\ReVanced" -ItemType Directory -Force } -# Get latest supported YouTube client version via ReVanced JSON -# It will let us to download always latest YouTube apk supported by ReVanced team -# https://github.com/revanced/revanced-patches/blob/main/patches.json +# Get the latest supported YouTube version to patch +# https://api.revanced.app/docs/swagger $Parameters = @{ - Uri = "https://raw.githubusercontent.com/revanced/revanced-patches/main/patches.json" + Uri = "https://api.revanced.app/v2/patches/latest" UseBasicParsing = $true } -$JSON = Invoke-RestMethod @Parameters +$JSON = (Invoke-RestMethod @Parameters).patches $versions = ($JSON | Where-Object -FilterScript {$_.compatiblePackages.name -eq "com.google.android.youtube"}).compatiblePackages.versions $LatestSupported = $versions | Sort-Object -Descending -Unique | Select-Object -First 1 @@ -107,9 +106,9 @@ $Parameters = @{ } Invoke-RestMethod @Parameters -# https://github.com/inotia00/VancedMicroG +# https://github.com/ReVanced/GmsCore $Parameters = @{ - Uri = "https://api.github.com/repos/inotia00/VancedMicroG/releases/latest" + Uri = "https://api.github.com/repos/ReVanced/GmsCore/releases/latest" UseBasicParsing = $true Verbose = $true } @@ -164,7 +163,7 @@ Remove-Item -Path "$WorkingFolder\ReVanced\jdk_windows-x64_bin.zip" -Force --exclude "Hide timestamp" ` --exclude "Hide seekbar" ` --purge ` ---resource-cache "$WorkingFolder\ReVanced\Temp" ` +--temporary-files-path "$WorkingFolder\ReVanced\Temp" ` --out "$WorkingFolder\ReVanced\revanced.apk" ` "$WorkingFolder\ReVanced\youtube.apk"