-
Notifications
You must be signed in to change notification settings - Fork 44
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
1,249 changed files
with
49,775 additions
and
37,852 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,25 @@ | ||
name: Build pull request | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- dev | ||
|
||
jobs: | ||
release: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Cache Gradle | ||
uses: burrunan/gradle-cache-action@v1 | ||
|
||
- name: Build | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: ./gradlew build --no-daemon |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Update Gradle wrapper | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 1 * *" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
update: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Update Gradle Wrapper | ||
uses: gradle-update/update-gradle-wrapper-action@v1 | ||
with: | ||
target-branch: dev |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
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
Large diffs are not rendered by default.
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,4 +1,4 @@ | ||
org.gradle.parallel = true | ||
org.gradle.caching = true | ||
kotlin.code.style = official | ||
version = 2.225.0-dev.7 | ||
version = 2.225.0-dev.10 |
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
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,8 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip | ||
distributionSha256Sum=9d926787066a081739e8200858338b4a69e837c3a821a33aca9db09dd4a41026 | ||
distributionSha256Sum=544c35d6bd849ae8a5ed0bcea39ba677dc40f49df7d1835561582da2009b961d | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dist | ||
zipStorePath=wrapper/dists |
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 |
---|---|---|
|
@@ -6,4 +6,4 @@ | |
"gradle-semantic-release-plugin": "^1.9.1", | ||
"semantic-release": "^23.0.2" | ||
} | ||
} | ||
} |
Large diffs are not rendered by default.
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
49 changes: 49 additions & 0 deletions
49
src/main/kotlin/app/revanced/generator/JsonPatchesFileGenerator.kt
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,49 @@ | ||
package app.revanced.generator | ||
|
||
import app.revanced.patcher.PatchSet | ||
import app.revanced.patcher.patch.Patch | ||
import com.google.gson.GsonBuilder | ||
import java.io.File | ||
|
||
internal class JsonPatchesFileGenerator : PatchesFileGenerator { | ||
override fun generate(patches: PatchSet) = patches.sortedBy { it.name }.map { | ||
JsonPatch( | ||
it.name!!, | ||
it.description, | ||
it.compatiblePackages, | ||
it.use, | ||
it.requiresIntegrations, | ||
it.options.values.map { option -> | ||
JsonPatch.Option( | ||
option.key, | ||
option.default, | ||
option.values, | ||
option.title, | ||
option.description, | ||
option.required, | ||
) | ||
}, | ||
) | ||
}.let { | ||
File("patches.json").writeText(GsonBuilder().serializeNulls().create().toJson(it)) | ||
} | ||
|
||
@Suppress("unused") | ||
private class JsonPatch( | ||
val name: String? = null, | ||
val description: String? = null, | ||
val compatiblePackages: Set<Patch.CompatiblePackage>? = null, | ||
val use: Boolean = true, | ||
val requiresIntegrations: Boolean = false, | ||
val options: List<Option>, | ||
) { | ||
class Option( | ||
val key: String, | ||
val default: Any?, | ||
val values: Map<String, Any?>?, | ||
val title: String?, | ||
val description: String?, | ||
val required: Boolean, | ||
) | ||
} | ||
} |
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,12 @@ | ||
package app.revanced.generator | ||
|
||
import app.revanced.patcher.PatchBundleLoader | ||
import java.io.File | ||
|
||
internal fun main() = PatchBundleLoader.Jar( | ||
File("build/libs/").listFiles { it -> it.name.endsWith(".jar") }!!.first(), | ||
).also { loader -> | ||
if (loader.isEmpty()) throw IllegalStateException("No patches found") | ||
}.let { bundle -> | ||
arrayOf(JsonPatchesFileGenerator(), ReadMeFileGenerator()).forEach { generator -> generator.generate(bundle) } | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/kotlin/app/revanced/generator/PatchesFileGenerator.kt
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 @@ | ||
package app.revanced.generator | ||
|
||
import app.revanced.patcher.PatchSet | ||
|
||
internal interface PatchesFileGenerator { | ||
fun generate(patches: PatchSet) | ||
} |
Oops, something went wrong.