mirror of
https://github.com/JDM170/ReVanced_Builder
synced 2025-11-29 14:41:46 +07:00
Update files
Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
This commit is contained in:
17
.github/workflows/Build.yml
vendored
17
.github/workflows/Build.yml
vendored
@@ -28,10 +28,6 @@ jobs:
|
||||
run: |
|
||||
. Scripts\ReVanced_Patches.ps1
|
||||
|
||||
- name: Download ReVanced Integrations
|
||||
run: |
|
||||
. Scripts\ReVanced_Intergrations.ps1
|
||||
|
||||
- name: Download Vanced MicroG
|
||||
run: |
|
||||
. Scripts\MicroG.ps1
|
||||
@@ -46,12 +42,11 @@ jobs:
|
||||
|
||||
& $JavaPath `
|
||||
-jar "Temp\revanced-cli.jar" patch `
|
||||
--patch-bundle "Temp\revanced-patches.jar" `
|
||||
--merge "Temp\revanced-integrations.apk" `
|
||||
--exclude "Always repeat" `
|
||||
--exclude "Hide captions button" `
|
||||
--exclude "Hide timestamp" `
|
||||
--exclude "Hide seekbar" `
|
||||
--patches "Temp\revanced-patches.rvp" `
|
||||
--disable "Always repeat" `
|
||||
--disable "Disable auto captions" `
|
||||
--disable "Hide timestamp" `
|
||||
--disable "Hide seekbar" `
|
||||
--purge `
|
||||
--out "Temp\revanced.apk" `
|
||||
"Temp\youtube.apk"
|
||||
@@ -71,7 +66,7 @@ jobs:
|
||||
id: read_release
|
||||
run: |
|
||||
# https://en.wikipedia.org/wiki/Percent-encoding
|
||||
(Get-Content -Path ReleaseNotesTemplate.md -Encoding utf8 -Raw).replace("YouTubeTag", "${{ env.LatestSupportedYT }}").replace("CLITag", "${{ env.CLIvtag }}").replace("PatchesTag", "${{ env.Patchesvtag }}").replace("IntegrationsTag", "${{ env.IntegrationsTag }}").replace("MicroGTag", "${{ env.MicroGTag }}").replace("ZuluTag", "${{ env.ZuluTag }}") | Set-Content -Path ReleaseNotesTemplate.md -Encoding utf8 -Force
|
||||
(Get-Content -Path ReleaseNotesTemplate.md -Encoding utf8 -Raw).replace("YouTubeTag", "${{ env.LatestSupportedYT }}").replace("CLITag", "${{ env.CLIvtag }}").replace("PatchesTag", "${{ env.Patchesvtag }}").replace("MicroGTag", "${{ env.MicroGTag }}").replace("ZuluTag", "${{ env.ZuluTag }}") | Set-Content -Path ReleaseNotesTemplate.md -Encoding utf8 -Force
|
||||
# https://trstringer.com/github-actions-multiline-strings/
|
||||
Add-Content -Path $env:GITHUB_OUTPUT -Value "ReleaseBody=ReleaseNotesTemplate.md"
|
||||
$ReleaseName = Get-Date -f "yyyy.MM.dd"
|
||||
|
||||
50
Build.ps1
50
Build.ps1
@@ -35,14 +35,16 @@ if (-not (Test-Path -Path "$WorkingFolder\ReVanced"))
|
||||
}
|
||||
|
||||
# Get the latest supported YouTube version to patch
|
||||
# https://api.revanced.app/docs/swagger
|
||||
# https://api.revanced.app
|
||||
$Parameters = @{
|
||||
Uri = "https://api.revanced.app/v2/patches/latest"
|
||||
Uri = "https://api.revanced.app/v4/patches/list"
|
||||
UseBasicParsing = $true
|
||||
}
|
||||
$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
|
||||
$JSON = (Invoke-Webrequest @Parameters).Content | ConvertFrom-Json
|
||||
$versions = ($JSON | Where-Object -FilterScript {$_.name -eq "Video ads"})
|
||||
$LatestSupported = $versions.compatiblePackages.'com.google.android.youtube' | Sort-Object -Descending -Unique | Select-Object -First 1
|
||||
|
||||
Write-Verbose -Message "Downloading the latest supported YouTube apk" -Verbose
|
||||
|
||||
# We need a NON-bundle version
|
||||
<#
|
||||
@@ -110,6 +112,8 @@ $Parameters = @{
|
||||
}
|
||||
Invoke-Webrequest @Parameters
|
||||
|
||||
Write-Verbose -Message "" -Verbose
|
||||
Write-Verbose -Message "Downloading ReVanced CLI" -Verbose
|
||||
# https://github.com/revanced/revanced-cli
|
||||
$Parameters = @{
|
||||
Uri = "https://api.github.com/repos/revanced/revanced-cli/releases/latest"
|
||||
@@ -125,36 +129,25 @@ $Parameters = @{
|
||||
}
|
||||
Invoke-RestMethod @Parameters
|
||||
|
||||
Write-Verbose -Message "" -Verbose
|
||||
Write-Verbose -Message "Downloading ReVanced patches" -Verbose
|
||||
# https://github.com/revanced/revanced-patches
|
||||
$Parameters = @{
|
||||
Uri = "https://api.github.com/repos/revanced/revanced-patches/releases/latest"
|
||||
UseBasicParsing = $true
|
||||
Verbose = $true
|
||||
}
|
||||
$URL = ((Invoke-RestMethod @Parameters).assets | Where-Object -FilterScript {$_.content_type -eq "application/java-archive"}).browser_download_url
|
||||
$URL = ((Invoke-RestMethod @Parameters).assets | Where-Object -FilterScript {$_.content_type -eq "text/plain"}).browser_download_url
|
||||
$Parameters = @{
|
||||
Uri = $URL
|
||||
Outfile = "$WorkingFolder\ReVanced\revanced-patches.jar"
|
||||
UseBasicParsing = $true
|
||||
Verbose = $true
|
||||
}
|
||||
Invoke-RestMethod @Parameters
|
||||
|
||||
# https://github.com/revanced/revanced-integrations
|
||||
$Parameters = @{
|
||||
Uri = "https://api.github.com/repos/revanced/revanced-integrations/releases/latest"
|
||||
UseBasicParsing = $true
|
||||
Verbose = $true
|
||||
}
|
||||
$URL = ((Invoke-RestMethod @Parameters).assets | Where-Object -FilterScript {$_.content_type -eq "application/vnd.android.package-archive"}).browser_download_url
|
||||
$Parameters = @{
|
||||
Uri = $URL
|
||||
Outfile = "$WorkingFolder\ReVanced\revanced-integrations.apk"
|
||||
Outfile = "$WorkingFolder\ReVanced\revanced-patches.rvp"
|
||||
UseBasicParsing = $true
|
||||
Verbose = $true
|
||||
}
|
||||
Invoke-RestMethod @Parameters
|
||||
|
||||
Write-Verbose -Message "" -Verbose
|
||||
Write-Verbose -Message "Downloading ReVanced GmsCore" -Verbose
|
||||
# https://github.com/ReVanced/GmsCore
|
||||
$Parameters = @{
|
||||
Uri = "https://api.github.com/repos/ReVanced/GmsCore/releases/latest"
|
||||
@@ -183,6 +176,8 @@ if (Test-Path -Path "$WorkingFolder\ReVanced\jdk")
|
||||
Remove-Item -Path "$WorkingFolder\ReVanced\jdk" -Recurse -Force
|
||||
}
|
||||
|
||||
Write-Verbose -Message "" -Verbose
|
||||
Write-Verbose -Message "Downloading Azul Zulu" -Verbose
|
||||
# https://github.com/ScoopInstaller/Java/blob/master/bucket/zulu-jdk.json
|
||||
$Parameters = @{
|
||||
Uri = "https://raw.githubusercontent.com/ScoopInstaller/Java/master/bucket/zulu-jdk.json"
|
||||
@@ -212,12 +207,11 @@ Remove-Item -Path "$WorkingFolder\ReVanced\jdk_windows-x64_bin.zip" -Force
|
||||
# Let's create patched APK
|
||||
& "$WorkingFolder\ReVanced\jdk\zulu*win_x64\bin\java.exe" `
|
||||
-jar "$WorkingFolder\ReVanced\revanced-cli.jar" patch `
|
||||
--patch-bundle "$WorkingFolder\ReVanced\revanced-patches.jar" `
|
||||
--merge "$WorkingFolder\ReVanced\revanced-integrations.apk" `
|
||||
--exclude "Always repeat" `
|
||||
--exclude "Hide captions button" `
|
||||
--exclude "Hide timestamp" `
|
||||
--exclude "Hide seekbar" `
|
||||
--patches "$WorkingFolder\ReVanced\revanced-patches.rvp" `
|
||||
--disable "Always repeat" `
|
||||
--disable "Disable auto captions" `
|
||||
--disable "Hide timestamp" `
|
||||
--disable "Hide seekbar" `
|
||||
--purge `
|
||||
--temporary-files-path "$WorkingFolder\ReVanced\Temp" `
|
||||
--out "$WorkingFolder\ReVanced\revanced.apk" `
|
||||
|
||||
@@ -3,6 +3,5 @@
|
||||
* YouTube YouTubeTag;
|
||||
* ReVanced CLI CLITag;
|
||||
* ReVanced Patches PatchesTag;
|
||||
* ReVanced Integrations IntegrationsTag;
|
||||
* ReVanced MicroG MicroGTag;
|
||||
* Azul Zulu ZuluTag.
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
# https://github.com/revanced/revanced-integrations
|
||||
$Parameters = @{
|
||||
Uri = "https://api.github.com/repos/revanced/revanced-integrations/releases/latest"
|
||||
UseBasicParsing = $true
|
||||
Verbose = $true
|
||||
}
|
||||
$apiResult = Invoke-RestMethod @Parameters
|
||||
$URL = ($apiResult.assets | Where-Object -FilterScript {$_.content_type -eq "application/vnd.android.package-archive"}).browser_download_url
|
||||
$TAG = $apiResult.tag_name
|
||||
$Parameters = @{
|
||||
Uri = $URL
|
||||
Outfile = "Temp\revanced-integrations.apk"
|
||||
UseBasicParsing = $true
|
||||
Verbose = $true
|
||||
}
|
||||
Invoke-RestMethod @Parameters
|
||||
|
||||
echo "IntegrationsTag=$TAG" >> $env:GITHUB_ENV
|
||||
@@ -5,11 +5,11 @@ $Parameters = @{
|
||||
Verbose = $true
|
||||
}
|
||||
$apiResult = Invoke-RestMethod @Parameters
|
||||
$URL = ($apiResult.assets | Where-Object -FilterScript {$_.content_type -eq "application/java-archive"}).browser_download_url
|
||||
$URL = ($apiResult.assets | Where-Object -FilterScript {$_.content_type -eq "text/plain"}).browser_download_url
|
||||
$TAG = $apiResult.tag_name
|
||||
$Parameters = @{
|
||||
Uri = $URL
|
||||
Outfile = "Temp\revanced-patches.jar"
|
||||
Outfile = "Temp\revanced-patches.rvp"
|
||||
UseBasicParsing = $true
|
||||
Verbose = $true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user