mirror of
https://github.com/ReVanced/revanced-patches-template.git
synced 2026-01-17 16:33:57 +00:00
Compare commits
35 Commits
v1.0.0
...
v1.0.2-dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d670762cce | ||
|
|
ccc222c1ba | ||
|
|
624a4964c1 | ||
|
|
afde3145e6 | ||
|
|
afd7f3b99b | ||
|
|
9e9b90678c | ||
|
|
c61c2cfebf | ||
|
|
464ed6333d | ||
|
|
ff407c8f4a | ||
|
|
989c3f1a3e | ||
|
|
540fe504c7 | ||
|
|
6dc4cf08e5 | ||
|
|
7ff9985401 | ||
|
|
0338a66e26 | ||
|
|
e4220b2a65 | ||
|
|
a4c0d231cf | ||
|
|
568edafefe | ||
|
|
9b0e35ee21 | ||
|
|
45e50488ea | ||
|
|
513bf5d57d | ||
|
|
ccb3d79584 | ||
|
|
6b7bbff623 | ||
|
|
ad21c69549 | ||
|
|
73f6506bcc | ||
|
|
c9ef930a8c | ||
|
|
5454c33185 | ||
|
|
53a9627cb2 | ||
|
|
c441a2ddf5 | ||
|
|
cdab0e6a53 | ||
|
|
526d901146 | ||
|
|
908ccaed87 | ||
|
|
a092eb6e54 | ||
|
|
6b4cd509c5 | ||
|
|
21e2b6d183 | ||
|
|
5f71dec911 |
3
.editorconfig
Normal file
3
.editorconfig
Normal file
@@ -0,0 +1,3 @@
|
||||
[*.{kt,kts}]
|
||||
ktlint_code_style = intellij_idea
|
||||
ktlint_standard_no-wildcard-imports = disabled
|
||||
31
.github/workflows/build_pull_request.yml
vendored
Normal file
31
.github/workflows/build_pull_request.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
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: Setup Java
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: "temurin"
|
||||
java-version: "17"
|
||||
|
||||
- name: Cache Gradle
|
||||
uses: burrunan/gradle-cache-action@v1
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: ./gradlew build --no-daemon
|
||||
19
.github/workflows/release.yml
vendored
19
.github/workflows/release.yml
vendored
@@ -6,10 +6,6 @@ on:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
|
||||
jobs:
|
||||
release:
|
||||
@@ -24,10 +20,16 @@ jobs:
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: "temurin"
|
||||
java-version: "17"
|
||||
|
||||
- name: Cache Gradle
|
||||
uses: burrunan/gradle-cache-action@v1
|
||||
|
||||
- name: Build with Gradle
|
||||
- name: Build
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: ./gradlew build clean
|
||||
@@ -41,6 +43,13 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Import GPG key
|
||||
uses: crazy-max/ghaction-import-gpg@v6
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
passphrase: ${{ secrets.GPG_PASSPHRASE }}
|
||||
fingerprint: ${{ vars.GPG_FINGERPRINT }}
|
||||
|
||||
- name: Release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.REPOSITORY_PUSH_ACCESS }}
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
"README.md",
|
||||
"CHANGELOG.md",
|
||||
"gradle.properties",
|
||||
"patches.json"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -33,10 +32,7 @@
|
||||
{
|
||||
"assets": [
|
||||
{
|
||||
"path": "build/libs/*.jar"
|
||||
},
|
||||
{
|
||||
"path": "patches.json"
|
||||
"path": "patches/build/libs/*.rvp"
|
||||
}
|
||||
],
|
||||
successComment: false
|
||||
|
||||
16
CHANGELOG.md
16
CHANGELOG.md
@@ -1,3 +1,19 @@
|
||||
## [1.0.2-dev.1](https://github.com/ReVanced/revanced-patches-template/compare/v1.0.1...v1.0.2-dev.1) (2024-08-08)
|
||||
|
||||
## [1.0.1](https://github.com/ReVanced/revanced-patches-template/compare/v1.0.0...v1.0.1) (2024-02-21)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Compile DEX without debugging information ([73f6506](https://github.com/ReVanced/revanced-patches-template/commit/73f6506bccc01e5622a6e19bedcf6d54d3f701c7))
|
||||
|
||||
## [1.0.1-dev.1](https://github.com/ReVanced/revanced-patches-template/compare/v1.0.0...v1.0.1-dev.1) (2024-02-21)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Compile DEX without debugging information ([73f6506](https://github.com/ReVanced/revanced-patches-template/commit/73f6506bccc01e5622a6e19bedcf6d54d3f701c7))
|
||||
|
||||
# 1.0.0 (2024-01-26)
|
||||
|
||||
|
||||
|
||||
48
README.md
48
README.md
@@ -10,10 +10,17 @@ For an example repository, see [ReVanced Patches](https://github.com/revanced/re
|
||||
To start using this template, follow these steps:
|
||||
|
||||
1. [Create a new repository using this template](https://github.com/new?template_name=revanced-patches-template&template_owner=ReVanced)
|
||||
2. Set up the [build.gradle.kts](build.gradle.kts) file (Match the [group of the project](build.gradle.kts#L8), [manifest attributes](build.gradle.kts#L35-L43), and the [POM](build.gradle.kts#L84-L106) that will be published to yours)
|
||||
3. Update the dependencies in the [libs.versions.toml](gradle/libs.versions.toml) file
|
||||
4. [Add a secret](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) to your repository named [REPOSITORY_PUSH_ACCESS](.github/workflows/release.yml#L47) containing a GitHub access token with [push access](https://github.com/semantic-release/semantic-release/blob/master/docs/usage/ci-configuration.md#authentication)
|
||||
5. Set up the [README.md](README.md) file[^1] (e.g, title, description, license, summary of the patches that are included in the repository)
|
||||
2. Set up the [build.gradle.kts](patches/build.gradle.kts) file (Specifically, the [group of the project](patches/build.gradle.kts#L1),
|
||||
and the [About](patches/build.gradle.kts#L5-L11))
|
||||
3. Update dependencies in the [libs.versions.toml](gradle/libs.versions.toml) file
|
||||
4. [Create a pass-phrased GPG master key and subkey](https://mikeross.xyz/create-gpg-key-pair-with-subkeys/)
|
||||
1. Add the private key as a secret named [GPG_PRIVATE_KEY](.github/workflows/release.yml#L48) to your repository
|
||||
2. Add the passphrase as a secret named [GPG_PASSPHRASE](.github/workflows/release.yml#L49) to your repository
|
||||
3. Add the fingerprint of the GPG subkey as a secret named [GPG_FINGERPRINT](.github/workflows/release.yml#L50) to your repository
|
||||
6. [Create a PAT](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) with [push access](https://github.com/semantic-release/semantic-release/blob/master/docs/usage/ci-configuration.md#authentication)
|
||||
1. Add it as a secret named [REPOSITORY_PUSH_ACCESS](.github/workflows/release.yml#L54) to your repository
|
||||
7. Set up the [README.md](README.md) file[^1] (e.g, title, description, license, summary of the patches
|
||||
that are included in the repository)
|
||||
|
||||
🎉 You are now ready to start creating patches!
|
||||
|
||||
@@ -23,20 +30,39 @@ You can also add the following things to the repository:
|
||||
|
||||
- [Issue templates](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository)[^2]
|
||||
- Contribution guidelines[^3]
|
||||
- Documentation, if you want to publish your patches as a library[^4]
|
||||
- API documentation, if you want to publish your patches as a library
|
||||
|
||||
[^1]: [Example README.md file](https://github.com/ReVanced/revanced-patches/blob/main/README.md)
|
||||
[^2]: [Example issue templates](https://github.com/ReVanced/revanced-patches/tree/main/.github/ISSUE_TEMPLATE)
|
||||
[^3]: [Example contribution guidelines](https://github.com/ReVanced/revanced-patches/blob/main/CONTRIBUTING.md)
|
||||
[^4]: [Example documentation](https://github.com/ReVanced/revanced-patches/tree/docs/docs)
|
||||
|
||||
## 🧑💻 Usage
|
||||
|
||||
In order to develop and release ReVanced Patches using this template, some things need to be considered:
|
||||
To develop and release ReVanced Patches using this template, some things need to be considered:
|
||||
|
||||
- Development originates in feature branches. Once a feature branch is ready, it is squshed and merged into the `dev` branch
|
||||
- Development occurs in feature branches. Once a feature branch is ready, it is squashed and merged into the `dev` branch
|
||||
- The `dev` branch is merged into the `main` branch once it is ready for release
|
||||
- Semantic versioning is used for versioning ReVanced Patches. ReVanced Patches have a public API for other patches to use
|
||||
- Semantic versioning is used to version ReVanced Patches. ReVanced Patches have a public API for other patches to use
|
||||
- Semantic commit messages are used for commits
|
||||
- Commits on the `dev` branch and `main` branch are automatically released via the [release.yml](.github/workflows/release.yml) workflow, which is also responsible for generating the changelog and updating the version of ReVanced Patches. It is triggered by pushing to the `dev` or `main` branch. The workflow uses the `publish` task to publish the release of ReVanced Patches
|
||||
- In order to build ReVanced Patches, that can be used on Android, the [`generateBundle`](build.gradle.kts#L48-L70) task needs to be run. The [`publish` task depends on the `generateBundle`](build.gradle.kts#L74-L76) task, so it will be run automatically when publishing a release.
|
||||
- Commits on the `dev` branch and `main` branch are automatically released
|
||||
via the [release.yml](.github/workflows/release.yml) workflow, which is also responsible for generating the changelog
|
||||
and updating the version of ReVanced Patches. It is triggered by pushing to the `dev` or `main` branch.
|
||||
The workflow uses the `publish` task to publish the release of ReVanced Patches
|
||||
- The `buildAndroid` task is used to build ReVanced Patches so that it can be used on Android.
|
||||
The `publish` task depends on the `buildAndroid` task, so it will be run automatically when publishing a release.
|
||||
|
||||
## 📚 Everything else
|
||||
|
||||
### 🛠️ Building
|
||||
|
||||
To build ReVanced Patches template,
|
||||
you can follow the [ReVanced documentation](https://github.com/ReVanced/revanced-documentation).
|
||||
|
||||
## 📜 Licence
|
||||
|
||||
ReVanced Patches template is licensed under the GPLv3 licence.
|
||||
Please see the [license file](LICENSE) for more information.
|
||||
[tl;dr](https://www.tldrlegal.com/license/gnu-general-public-license-v3-gpl-3) you may copy, distribute
|
||||
and modify ReVanced Patches template as long as you track changes/dates in source files.
|
||||
Any modifications to ReVanced Patches template must also be made available under the GPL,
|
||||
along with build & install instructions.
|
||||
|
||||
110
build.gradle.kts
110
build.gradle.kts
@@ -1,110 +0,0 @@
|
||||
import org.gradle.kotlin.dsl.support.listFilesOrdered
|
||||
|
||||
plugins {
|
||||
kotlin("jvm") version "1.9.10"
|
||||
`maven-publish`
|
||||
}
|
||||
|
||||
group = "your.org"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
google()
|
||||
maven { url = uri("https://jitpack.io") }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(libs.revanced.patcher)
|
||||
implementation(libs.smali)
|
||||
// TODO: Required because build fails without it. Find a way to remove this dependency.
|
||||
implementation(libs.guava)
|
||||
// Used in JsonGenerator.
|
||||
implementation(libs.gson)
|
||||
|
||||
// A dependency to the Android library unfortunately fails the build, which is why this is required.
|
||||
compileOnly(project("dummy"))
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(11)
|
||||
}
|
||||
|
||||
tasks.withType(Jar::class) {
|
||||
manifest {
|
||||
attributes["Name"] = "Your Patches"
|
||||
attributes["Description"] = "Patches for ReVanced."
|
||||
attributes["Version"] = version
|
||||
attributes["Timestamp"] = System.currentTimeMillis().toString()
|
||||
attributes["Source"] = "git@github.com:you/revanced-patches.git"
|
||||
attributes["Author"] = "You"
|
||||
attributes["Contact"] = "contact@your.homepage"
|
||||
attributes["Origin"] = "https://your.homepage"
|
||||
attributes["License"] = "GNU General Public License v3.0"
|
||||
}
|
||||
}
|
||||
|
||||
tasks {
|
||||
register<DefaultTask>("generateBundle") {
|
||||
description = "Generate DEX files and add them in the JAR file"
|
||||
|
||||
dependsOn(build)
|
||||
|
||||
doLast {
|
||||
val d8 = File(System.getenv("ANDROID_HOME")).resolve("build-tools")
|
||||
.listFilesOrdered().last().resolve("d8").absolutePath
|
||||
|
||||
val artifacts = configurations.archives.get().allArtifacts.files.files.first().absolutePath
|
||||
val workingDirectory = layout.buildDirectory.dir("libs").get().asFile
|
||||
|
||||
exec {
|
||||
workingDir = workingDirectory
|
||||
commandLine = listOf(d8, artifacts)
|
||||
}
|
||||
|
||||
exec {
|
||||
workingDir = workingDirectory
|
||||
commandLine = listOf("zip", "-u", artifacts, "classes.dex")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Required to run tasks because Gradle semantic-release plugin runs the publish task.
|
||||
// Tracking: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435
|
||||
named("publish") {
|
||||
dependsOn("generateBundle")
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
create<MavenPublication>("revanced-patches-publication") {
|
||||
from(components["java"])
|
||||
|
||||
pom {
|
||||
name = "Your Patches"
|
||||
description = "Patches for ReVanced."
|
||||
url = "https://your.homepage"
|
||||
|
||||
licenses {
|
||||
license {
|
||||
name = "GNU General Public License v3.0"
|
||||
url = "https://www.gnu.org/licenses/gpl-3.0.en.html"
|
||||
}
|
||||
}
|
||||
developers {
|
||||
developer {
|
||||
id = "Your ID"
|
||||
name = "Your Name"
|
||||
email = "contact@your.homepage"
|
||||
}
|
||||
}
|
||||
scm {
|
||||
connection = "scm:git:git://github.com/you/revanced-patches.git"
|
||||
developerConnection = "scm:git:git@github.com:you/revanced-patches.git"
|
||||
url = "https://github.com/you/revanced-patches"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
plugins {
|
||||
id("java")
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(11))
|
||||
}
|
||||
}
|
||||
7
extensions/extension/build.gradle.kts
Normal file
7
extensions/extension/build.gradle.kts
Normal file
@@ -0,0 +1,7 @@
|
||||
extension {
|
||||
name = "extensions/extension.rve"
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "app.revanced.extension"
|
||||
}
|
||||
1
extensions/extension/src/main/AndroidManifest.xml
Normal file
1
extensions/extension/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1 @@
|
||||
<manifest/>
|
||||
@@ -0,0 +1,7 @@
|
||||
package app.revanced.extension;
|
||||
|
||||
public class ExampleExtension {
|
||||
public static void get() {
|
||||
// TODO("Not yet implemented")
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
org.gradle.parallel = true
|
||||
org.gradle.caching = true
|
||||
kotlin.code.style = official
|
||||
version = 1.0.0
|
||||
version = 1.0.2-dev.1
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
[versions]
|
||||
revanced-patcher = "19.0.0"
|
||||
smali = "3.0.3"
|
||||
guava = "32.1.2-jre"
|
||||
gson = "2.10.1"
|
||||
|
||||
[libraries]
|
||||
revanced-patcher = { module = "app.revanced:revanced-patcher", version.ref = "revanced-patcher" }
|
||||
smali = { module = "com.android.tools.smali:smali", version.ref = "smali" }
|
||||
guava = { module = "com.google.guava:guava", version.ref = "guava" }
|
||||
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
|
||||
revanced-patcher = "20.0.0"
|
||||
# Tracking https://github.com/google/smali/issues/64.
|
||||
#noinspection GradleDependency
|
||||
smali = "3.0.5"
|
||||
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
8
gradle/wrapper/gradle-wrapper.properties
vendored
8
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,8 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
|
||||
distributionSha256Sum=3e1af3ae886920c3ac87f7a91f816c0c7c436f276a6eefdb3da152100fef72ae
|
||||
distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dist
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
22
gradlew
vendored
22
gradlew
vendored
@@ -15,6 +15,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
@@ -55,7 +57,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
@@ -83,7 +85,9 @@ done
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
||||
' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
@@ -144,7 +148,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
@@ -152,7 +156,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
@@ -201,11 +205,11 @@ fi
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
|
||||
22
gradlew.bat
vendored
22
gradlew.bat
vendored
@@ -13,6 +13,8 @@
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
@rem SPDX-License-Identifier: Apache-2.0
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
@@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
|
||||
3275
package-lock.json
generated
3275
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -4,6 +4,6 @@
|
||||
"@semantic-release/changelog": "^6.0.3",
|
||||
"@semantic-release/git": "^10.0.1",
|
||||
"gradle-semantic-release-plugin": "^1.9.1",
|
||||
"semantic-release": "^23.0.0"
|
||||
"semantic-release": "^23.0.8"
|
||||
}
|
||||
}
|
||||
|
||||
4
patches/api/patches.api
Normal file
4
patches/api/patches.api
Normal file
@@ -0,0 +1,4 @@
|
||||
public final class app/revanced/patches/example/ExamplePatchKt {
|
||||
public static final fun getExamplePatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
13
patches/build.gradle.kts
Normal file
13
patches/build.gradle.kts
Normal file
@@ -0,0 +1,13 @@
|
||||
group = "app.revanced"
|
||||
|
||||
patches {
|
||||
about {
|
||||
name = "ReVanced Patches template"
|
||||
description = "Patches template for ReVanced"
|
||||
source = "git@github.com:revanced/revanced-patches-template.git"
|
||||
author = "ReVanced"
|
||||
contact = "contact@revanced.app"
|
||||
website = "https://revanced.app"
|
||||
license = "GNU General Public License v3.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package app.revanced.patches.example
|
||||
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
|
||||
@Suppress("unused")
|
||||
val examplePatch = bytecodePatch(
|
||||
name = "Example Patch",
|
||||
description = "This is an example patch to start with.",
|
||||
) {
|
||||
compatibleWith("com.example.app"("1.0.0"))
|
||||
|
||||
extendWith("extensions/extension.rve")
|
||||
|
||||
execute {
|
||||
// TODO("Not yet implemented")
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,20 @@
|
||||
include("dummy")
|
||||
rootProject.name = "revanced-patches-template"
|
||||
|
||||
rootProject.name = "revanced-patches"
|
||||
|
||||
buildCache {
|
||||
local {
|
||||
isEnabled = !System.getenv().containsKey("CI")
|
||||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
google()
|
||||
maven {
|
||||
name = "GitHubPackages"
|
||||
url = uri("https://maven.pkg.github.com/revanced/registry")
|
||||
credentials {
|
||||
username = providers.gradleProperty("gpr.user").orNull ?: System.getenv("GITHUB_ACTOR")
|
||||
password = providers.gradleProperty("gpr.key").orNull ?: System.getenv("GITHUB_TOKEN")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id("app.revanced.patches") version "1.0.0-dev.4"
|
||||
}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
package your.org.patches.example
|
||||
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
|
||||
@Patch(
|
||||
name = "Example Patch",
|
||||
description = "This is an example patch to start with.",
|
||||
compatiblePackages = [
|
||||
CompatiblePackage("com.example.app", ["1.0.0"]),
|
||||
],
|
||||
)
|
||||
@Suppress("unused")
|
||||
object ExamplePatch : BytecodePatch() {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
// TODO("Not yet implemented")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user