forked from ReVanced/revanced-cli
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
35 changed files
with
1,633 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Delete old workflow runs | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
days: | ||
description: 'Number of days.' | ||
required: true | ||
default: 0 | ||
minimum_runs: | ||
description: 'The minimum runs to keep for each workflow.' | ||
required: true | ||
default: 0 | ||
delete_workflow_pattern: | ||
description: 'The name of the workflow. if not set then it will target all workflows.' | ||
required: false | ||
|
||
jobs: | ||
del_runs: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Delete workflow runs | ||
uses: Mattraks/delete-workflow-runs@v2 | ||
with: | ||
token: ${{ github.token }} | ||
repository: ${{ github.repository }} | ||
retain_days: ${{ github.event.inputs.days }} | ||
keep_minimum_runs: ${{ github.event.inputs.minimum_runs }} | ||
delete_workflow_pattern: ${{ github.event.inputs.delete_workflow_pattern }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Sync upstream | ||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 */8 * * *" | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.GH_PAT }} | ||
|
||
- name: sync | ||
id: sync | ||
shell: bash | ||
run: | | ||
git config --global user.name 'E85Addict' | ||
git config --global user.email '77761710+E85Addict@users.noreply.github.com' | ||
if [[ $(git log | grep Author | head -1) == *"semantic"* ]]; then | ||
git reset --hard HEAD~1 | ||
fi | ||
T=$(git tag --sort=creatordate | tail -1) | ||
git remote add upstream https://github.com/revanced/revanced-cli | ||
git tag -d $(git tag -l) | ||
git fetch upstream --tags -f | ||
LatestRemoteTag=$(curl -s https://api.github.com/repos/revanced/revanced-cli/releases/latest | jq -r '.tag_name') | ||
C=$(git rev-list --left-right --count origin/main...remotes/upstream/main | awk '{print$2}') | ||
echo "Ahead $C commits." | ||
if [ "$C" -gt 0 ]; then | ||
echo "Rebasing" | ||
# git push origin --delete $T | ||
git rebase -X ours upstream/main | ||
git push --tags -f | ||
git push origin --delete $LatestRemoteTag | ||
git push -f | ||
else | ||
echo "in sync" | ||
fi |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,7 @@ | ||
plugins { | ||
kotlin("jvm") version "1.9.10" | ||
alias(libs.plugins.shadow) | ||
kotlin("jvm") version "1.9.10" apply false | ||
} | ||
|
||
group = "app.revanced" | ||
|
||
repositories { | ||
mavenCentral() | ||
mavenLocal() | ||
google() | ||
maven { url = uri("https://jitpack.io") } | ||
} | ||
|
||
dependencies { | ||
implementation(libs.revanced.patcher) | ||
implementation(libs.revanced.library) | ||
implementation(libs.kotlinx.coroutines.core) | ||
implementation(libs.picocli) | ||
|
||
testImplementation(libs.kotlin.test) | ||
} | ||
|
||
kotlin { jvmToolchain(11) } | ||
|
||
tasks { | ||
test { | ||
useJUnitPlatform() | ||
testLogging { | ||
events("PASSED", "SKIPPED", "FAILED") | ||
} | ||
} | ||
|
||
processResources { | ||
expand("projectVersion" to project.version) | ||
} | ||
|
||
shadowJar { | ||
manifest { | ||
attributes("Main-Class" to "app.revanced.cli.command.MainCommandKt") | ||
} | ||
minimize { | ||
exclude(dependency("org.jetbrains.kotlin:.*")) | ||
exclude(dependency("org.bouncycastle:.*")) | ||
exclude(dependency("app.revanced:.*")) | ||
} | ||
} | ||
|
||
build { | ||
dependsOn(shadowJar) | ||
} | ||
|
||
/* | ||
Dummy task to hack gradle-semantic-release-plugin to release this project. | ||
Explanation: | ||
SemVer is a standard for versioning libraries. | ||
For that reason the semantic-release plugin uses the "publish" task to publish libraries. | ||
However, this subproject is not a library, and the "publish" task is not available for this subproject. | ||
Because semantic-release is not designed to handle this case, we need to hack it. | ||
RE: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435 | ||
*/ | ||
|
||
register<DefaultTask>("publish") { | ||
group = "publishing" | ||
description = "Dummy task to hack gradle-semantic-release-plugin to release ReVanced CLI" | ||
dependsOn(build) | ||
} | ||
} | ||
allprojects { | ||
group = "app.revanced" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,25 @@ | ||
[versions] | ||
shadow = "8.1.1" | ||
apksig = "8.1.4" | ||
bcpkix-jdk18on = "1.76" | ||
jackson-module-kotlin = "2.14.3" | ||
jadb = "1.2.1" | ||
kotlin-reflect = "1.9.10" | ||
kotlin-test = "1.9.20" | ||
kotlinx-coroutines-core = "1.7.3" | ||
picocli = "4.7.3" | ||
picocli = "4.7.5" | ||
revanced-patcher = "19.0.0" | ||
revanced-library = "1.3.0" | ||
|
||
[libraries] | ||
apksig = { module = "com.android.tools.build:apksig", version.ref = "apksig" } | ||
bcpkix-jdk18on = { module = "org.bouncycastle:bcpkix-jdk18on", version.ref = "bcpkix-jdk18on" } | ||
jackson-module-kotlin = { module = "com.fasterxml.jackson.module:jackson-module-kotlin", version.ref = "jackson-module-kotlin" } | ||
jadb = { module = "app.revanced:jadb", version.ref = "jadb" } | ||
kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin-reflect" } | ||
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin-test" } | ||
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines-core" } | ||
picocli = { module = "info.picocli:picocli", version.ref = "picocli" } | ||
revanced-patcher = { module = "app.revanced:revanced-patcher", version.ref = "revanced-patcher" } | ||
revanced-library = { module = "app.revanced:revanced-library", version.ref = "revanced-library" } | ||
|
||
[plugins] | ||
shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow" } |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip | ||
distributionSha256Sum=3e1af3ae886920c3ac87f7a91f816c0c7c436f276a6eefdb3da152100fef72ae | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
plugins { | ||
kotlin("jvm") version "1.9.10" | ||
alias(libs.plugins.shadow) | ||
} | ||
|
||
dependencies { | ||
implementation(project(":revanced-lib")) | ||
implementation(libs.revanced.patcher) | ||
implementation(libs.kotlinx.coroutines.core) | ||
implementation(libs.picocli) | ||
|
||
testImplementation(libs.kotlin.test) | ||
} | ||
|
||
kotlin { jvmToolchain(11) } | ||
|
||
tasks { | ||
test { | ||
useJUnitPlatform() | ||
testLogging { | ||
events("PASSED", "SKIPPED", "FAILED") | ||
} | ||
} | ||
|
||
processResources { | ||
expand("projectVersion" to project.version) | ||
} | ||
|
||
shadowJar { | ||
manifest { | ||
attributes("Main-Class" to "app.revanced.cli.command.MainCommandKt") | ||
} | ||
minimize { | ||
exclude(dependency("org.jetbrains.kotlin:.*")) | ||
exclude(dependency("org.bouncycastle:.*")) | ||
exclude(dependency("app.revanced:.*")) | ||
} | ||
} | ||
|
||
build { | ||
dependsOn(shadowJar) | ||
} | ||
|
||
// Dummy task to fix the Gradle semantic-release plugin. | ||
// Remove this if you forked it to support building only. | ||
// Tracking issue: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435 | ||
register<DefaultTask>("publish") { | ||
group = "publish" | ||
description = "Dummy task" | ||
dependsOn(build) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
rootProject.name = "revanced-cli" | ||
|
||
buildCache { | ||
local { | ||
isEnabled = !System.getenv().containsKey("CI") | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.