Skip to content

Commit

Permalink
Update build
Browse files Browse the repository at this point in the history
  • Loading branch information
anddea committed Mar 19, 2024
1 parent 17a514e commit 2b5f64d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,4 @@ node_modules/
# gradle properties, due to Github token
./gradle.properties
.DS_Store
local.properties
16 changes: 16 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,18 @@ tasks {
}
}

register("updatePrefsXml") {
description = "Update revanced_prefs.xml with the new version"

doLast {
val prefsFile = file("src/main/resources/youtube/settings/xml/revanced_prefs.xml")
val old = Regex("""Patches" (.*)summary="[^"]*"""")
val new = """Patches" $1summary="$version""""

prefsFile.writeText(prefsFile.readText().replace(old, new))
}
}

register("buildDexJar") {
description = "Build and add a DEX to the JAR file"
group = "build"
Expand Down Expand Up @@ -144,3 +156,7 @@ signing {

sign(publishing.publications["revanced-patches-publication"])
}

tasks.named("processResources") {
dependsOn("updatePrefsXml")
}

0 comments on commit 2b5f64d

Please sign in to comment.