mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2026-01-19 09:13:57 +00:00
Compare commits
5 Commits
v1.24.1-de
...
v1.24.1-de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
10f35eb727 | ||
|
|
5c7d52c8e9 | ||
|
|
841d61278b | ||
|
|
534e4c2453 | ||
|
|
062f28387f |
85
.github/workflows/build_pull_request.yml
vendored
85
.github/workflows/build_pull_request.yml
vendored
@@ -3,42 +3,18 @@ name: Build pull request
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
# Select pull request
|
|
||||||
pr-number:
|
pr-number:
|
||||||
description: PR number (Without hashtag)
|
description: PR number
|
||||||
required: true
|
required: true
|
||||||
# Select app flavor
|
|
||||||
app-flavor:
|
app-flavor:
|
||||||
description: App flavor
|
description: App flavor
|
||||||
default: 'release'
|
default: release
|
||||||
type: choice
|
type: choice
|
||||||
options:
|
options:
|
||||||
- release
|
- release
|
||||||
- debug
|
- debug
|
||||||
- profile
|
- profile
|
||||||
|
|
||||||
# Flutter Configurations,
|
|
||||||
# it's recommended to be set when you have problem regarding with flutter itself
|
|
||||||
# For most part you do not need to change this.
|
|
||||||
|
|
||||||
# Flutter version to use, note that the version had to exist in whether channel
|
|
||||||
# to grab
|
|
||||||
# Try using exact version or particular version on a specific branch instead of "any"
|
|
||||||
flutter-channel:
|
|
||||||
description: Flutter channel
|
|
||||||
default: 'stable'
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- stable
|
|
||||||
- beta
|
|
||||||
- dev
|
|
||||||
- any
|
|
||||||
flutter-version:
|
|
||||||
description: Flutter version
|
|
||||||
default: '3.29.x'
|
|
||||||
|
|
||||||
run-name: "Build pull request ${{ inputs.pr-number }}"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
@@ -62,76 +38,27 @@ jobs:
|
|||||||
- name: Set up Flutter
|
- name: Set up Flutter
|
||||||
uses: subosito/flutter-action@v2
|
uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
channel: ${{ inputs.flutter-channel }}
|
channel: stable
|
||||||
flutter-version: ${{ inputs.flutter-version }}
|
|
||||||
|
|
||||||
- name: Get dependencies
|
- name: Get dependencies
|
||||||
continue-on-error: true
|
|
||||||
run: flutter pub get
|
run: flutter pub get
|
||||||
|
|
||||||
- name: Generate translations
|
- name: Generate translations
|
||||||
continue-on-error: true
|
|
||||||
run: dart run slang
|
run: dart run slang
|
||||||
|
|
||||||
- name: Generate code files
|
- name: Generate code files
|
||||||
continue-on-error: true
|
|
||||||
run: dart run build_runner build --delete-conflicting-outputs
|
run: dart run build_runner build --delete-conflicting-outputs
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
continue-on-error: true
|
|
||||||
id: flutter-build
|
id: flutter-build
|
||||||
run: flutter build apk --${{ inputs.app-flavor }}
|
run: flutter build apk --${{ inputs.app-flavor }}
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Prepare comment
|
- name: Upload artifacts
|
||||||
id: prepare-comment # This should work now?
|
|
||||||
run: |
|
|
||||||
echo "COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
|
||||||
if [[ "${{ steps.flutter-build.outcome }}" == "success" ]]; then
|
|
||||||
MESSAGE="✅ Succeeded build on $COMMIT_HASH."
|
|
||||||
else
|
|
||||||
MESSAGE="🚫 Failed build on $COMMIT_HASH."
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: "Comment on pull request #${{ inputs.pr-number }}"
|
|
||||||
uses: thollander/actions-comment-pull-request@v3
|
|
||||||
with:
|
|
||||||
github-token: ${{ github.token }}
|
|
||||||
pr-number: ${{ inputs.pr-number }}
|
|
||||||
mode: recreate
|
|
||||||
comment-tag: execution
|
|
||||||
message: |
|
|
||||||
## ⚒️ Build status
|
|
||||||
|
|
||||||
🧪 Workflow triggered by: ${{ github.actor }}
|
|
||||||
|
|
||||||
${{ steps.prepare-comment.outputs.MESSAGE }}
|
|
||||||
|
|
||||||
Details: [_Job execution **${{ github.run_id }}** / attempt **${{ github.run_attempt }}**_](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})!
|
|
||||||
|
|
||||||
### ⚙️ Workflow Steps
|
|
||||||
|
|
||||||
| Step | Status |
|
|
||||||
| :------------------------ | :------------------------------------------------------- |
|
|
||||||
| **Get dependencies** | ${{ steps.get-dependencies.outcome || job.status }} |
|
|
||||||
| **Generate translations** | ${{ steps.generate-translations.outcome || job.status }} |
|
|
||||||
| **Generate code files** | ${{ steps.generate-code-files.outcome || job.status }} |
|
|
||||||
| **Build** | ${{ steps.flutter-build.outcome }} |
|
|
||||||
|
|
||||||
### ⚙️ Workflow Configuration
|
|
||||||
|
|
||||||
| Parameter | Value |
|
|
||||||
| :--------------- | :--------------------------------------- |
|
|
||||||
| App flavor | ${{ inputs.app-flavor }} |
|
|
||||||
| Flutter version | ${{ inputs.flutter-version }} |
|
|
||||||
| Flutter channel | ${{ inputs.flutter-channel }} |
|
|
||||||
|
|
||||||
- name: Upload Artifact
|
|
||||||
if: steps.flutter-build.outcome == 'success'
|
if: steps.flutter-build.outcome == 'success'
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: revanced-manager-(${{ env.COMMIT_HASH }}-${{ inputs.pr-number }}-${{ inputs.app-flavor }}-${{ inputs.flutter-version }})
|
name: revanced-manager-(${{ env.COMMIT_HASH }}
|
||||||
path: |
|
path: |
|
||||||
build/app/outputs/flutter-apk/app-${{ inputs.app-flavor }}.apk
|
build/app/outputs/flutter-apk/app-*.apk
|
||||||
build/app/outputs/flutter-apk/app-${{ inputs.app-flavor }}.apk.sha1
|
|
||||||
|
|||||||
3
.github/workflows/open_pull_request.yml
vendored
3
.github/workflows/open_pull_request.yml
vendored
@@ -12,6 +12,8 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
pull-request:
|
pull-request:
|
||||||
name: Open pull request
|
name: Open pull request
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -25,4 +27,3 @@ jobs:
|
|||||||
pr_body: |
|
pr_body: |
|
||||||
This pull request will ${{ env.MESSAGE }}.
|
This pull request will ${{ env.MESSAGE }}.
|
||||||
pr_draft: true
|
pr_draft: true
|
||||||
github_token: ${{ secrets.REPOSITORY_PUSH_ACCESS }}
|
|
||||||
|
|||||||
31
.github/workflows/release.yml
vendored
31
.github/workflows/release.yml
vendored
@@ -6,19 +6,13 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- dev
|
- dev
|
||||||
paths:
|
|
||||||
- ".github/workflows/release.yml"
|
|
||||||
- "android/**"
|
|
||||||
- "assets/**"
|
|
||||||
- "lib/**"
|
|
||||||
- "pubspec.yaml"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
name: Release
|
name: Release
|
||||||
permissions:
|
permissions:
|
||||||
id-token: write
|
|
||||||
contents: write
|
contents: write
|
||||||
|
id-token: write
|
||||||
attestations: write
|
attestations: write
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -28,7 +22,10 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
run: echo "JAVA_HOME=$JAVA_HOME_17_X64" >> $GITHUB_ENV
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '17'
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
@@ -40,6 +37,12 @@ jobs:
|
|||||||
uses: subosito/flutter-action@v2
|
uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
channel: stable
|
channel: stable
|
||||||
|
cache: true
|
||||||
|
|
||||||
|
- name: Cache Gradle
|
||||||
|
uses: burrunan/gradle-cache-action@v1
|
||||||
|
with:
|
||||||
|
home-directory: ${{ github.workspace }}/android
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
@@ -57,17 +60,17 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.KEYSTORE }}" | base64 --decode > "android/app/keystore.jks"
|
echo "${{ secrets.KEYSTORE }}" | base64 --decode > "android/app/keystore.jks"
|
||||||
|
|
||||||
- name: Release
|
- name: Semantic Release
|
||||||
|
uses: cycjimmy/semantic-release-action@v4
|
||||||
|
id: semantic
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
|
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
|
||||||
KEYSTORE_ENTRY_ALIAS: ${{ secrets.KEYSTORE_ENTRY_ALIAS }}
|
KEYSTORE_ENTRY_ALIAS: ${{ secrets.KEYSTORE_ENTRY_ALIAS }}
|
||||||
KEYSTORE_ENTRY_PASSWORD: ${{ secrets.KEYSTORE_ENTRY_PASSWORD }}
|
KEYSTORE_ENTRY_PASSWORD: ${{ secrets.KEYSTORE_ENTRY_PASSWORD }}
|
||||||
run: |
|
|
||||||
npx semantic-release
|
|
||||||
|
|
||||||
- name: Generate artifact attestation
|
- name: Attest
|
||||||
if: github.ref == 'refs/heads/main'
|
if: steps.semantic.outputs.new_release_published == 'true'
|
||||||
uses: actions/attest-build-provenance@v1
|
uses: actions/attest-build-provenance@v2
|
||||||
with:
|
with:
|
||||||
subject-path: build/app/outputs/apk/release/revanced-manager-*.apk
|
subject-path: build/app/outputs/apk/release/revanced-manager-*.apk
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ analyzer:
|
|||||||
- lib/app/app.router.dart
|
- lib/app/app.router.dart
|
||||||
- lib/models/patch.g.dart
|
- lib/models/patch.g.dart
|
||||||
- lib/models/patched_application.g.dart
|
- lib/models/patched_application.g.dart
|
||||||
|
- lib/gen/
|
||||||
|
|
||||||
linter:
|
linter:
|
||||||
rules:
|
rules:
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import android.os.Handler
|
|||||||
import android.os.Looper
|
import android.os.Looper
|
||||||
import app.revanced.library.ApkUtils
|
import app.revanced.library.ApkUtils
|
||||||
import app.revanced.library.ApkUtils.applyTo
|
import app.revanced.library.ApkUtils.applyTo
|
||||||
import app.revanced.library.installation.installer.LocalInstaller
|
|
||||||
import app.revanced.manager.flutter.utils.Aapt
|
import app.revanced.manager.flutter.utils.Aapt
|
||||||
import app.revanced.manager.flutter.utils.packageInstaller.InstallerReceiver
|
import app.revanced.manager.flutter.utils.packageInstaller.InstallerReceiver
|
||||||
import app.revanced.manager.flutter.utils.packageInstaller.UninstallerReceiver
|
import app.revanced.manager.flutter.utils.packageInstaller.UninstallerReceiver
|
||||||
@@ -169,7 +168,8 @@ class MainActivity : FlutterActivity() {
|
|||||||
putValue(option.default)
|
putValue(option.default)
|
||||||
|
|
||||||
option.values?.let { values ->
|
option.values?.let { values ->
|
||||||
put("values",
|
put(
|
||||||
|
"values",
|
||||||
JSONObject().apply {
|
JSONObject().apply {
|
||||||
values.forEach { (key, value) ->
|
values.forEach { (key, value) ->
|
||||||
putValue(value, key)
|
putValue(value, key)
|
||||||
@@ -257,16 +257,19 @@ class MainActivity : FlutterActivity() {
|
|||||||
|
|
||||||
// Setup logger
|
// Setup logger
|
||||||
Logger.getLogger("").apply {
|
Logger.getLogger("").apply {
|
||||||
handlers.forEach {
|
handlers.forEach { handler ->
|
||||||
it.close()
|
handler.close()
|
||||||
removeHandler(it)
|
removeHandler(handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
object : java.util.logging.Handler() {
|
object : java.util.logging.Handler() {
|
||||||
override fun publish(record: LogRecord) {
|
override fun publish(record: LogRecord) {
|
||||||
if (record.loggerName?.startsWith("app.revanced") != true || cancel) return
|
if (cancel) return
|
||||||
|
if (
|
||||||
updateProgress(-1.0, "", record.message)
|
record.loggerName?.startsWith("app.revanced") == true ||
|
||||||
|
// Logger in class brut.util.OS.
|
||||||
|
record.loggerName == ""
|
||||||
|
) updateProgress(-1.0, "", record.message)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun flush() = Unit
|
override fun flush() = Unit
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ homepage: https://revanced.app
|
|||||||
|
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
|
|
||||||
version: 1.24.1-dev.3+101800058
|
version: 1.24.1-dev.4+101800059
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=3.7.0'
|
sdk: '>=3.7.0'
|
||||||
|
|||||||
Reference in New Issue
Block a user