Skip to content

Commit

Permalink
refactor: Update to Privacy ReVanced Patches
Browse files Browse the repository at this point in the history
  • Loading branch information
jkennethcarino committed Mar 3, 2024
1 parent 6957220 commit 41ee15c
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 97 deletions.
2 changes: 1 addition & 1 deletion .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
{
"assets": [
{
"path": "build/libs/revanced-patches*"
"path": "build/libs/privacy-revanced-patches*"
}
],
successComment: false
Expand Down
27 changes: 0 additions & 27 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,27 +0,0 @@
## [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)


### Features

* Init ([66be625](https://github.com/ReVanced/revanced-patches-template/commit/66be625f25ee2d678dac62a5bf4daa631284f8f6))

# 1.0.0-dev.1 (2024-01-26)


### Features

* Init ([66be625](https://github.com/ReVanced/revanced-patches-template/commit/66be625f25ee2d678dac62a5bf4daa631284f8f6))
61 changes: 19 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,36 @@
# 👋🧩 ReVanced Patches template
# 🩹 Privacy ReVanced Patches

This is a template for creating a new ReVanced Patches repository.
The repository can have multiple patches, and patches from other repositories can be used together.
![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/jkennethcarino/privacy-revanced-patches/release.yml)
![GPLv3 License](https://img.shields.io/badge/License-GPL%20v3-yellow.svg)

For an example repository, see [ReVanced Patches](https://github.com/revanced/revanced-patches).
This repository contains my personal collection of ReVanced Patches.

## 🚀 Get started
## ❓ About

To start using this template, follow these steps:
Patches are small modifications to Android apps that allow you to change the behavior of or add new features,
block analytics and trackers, and much more.

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 (Specifically, the [group of the project](build.gradle.kts#L10), [manifest attributes](build.gradle.kts#L37-L47), and the [POM](build.gradle.kts#L98-L121))
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#L47) to your repository
2. Add the passphrase as a secret named [GPG_PASSPHRASE](.github/workflows/release.yml#L48) to your repository
3. Add the fingerprint of the GPG subkey as a secret named [GPG_FINGERPRINT](.github/workflows/release.yml#L49) 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#L53) 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)
## 💪 Features

🎉 You are now ready to start creating patches!
Some of the features the patches provide are:

## 🔘 Optional steps
***Block analytics and trackers**: Say goodbye to analytics and trackers
* 🚫 **Remove internet permission**: Remove unnecessary internet permission
***And much more!**

You can also add the following things to the repository:
## 🚀 How to get started

- [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]

[^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:

- Development occurs in feature branches. Once a feature branch is ready, it is squshed 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 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 [`buildDexJar`](build.gradle.kts#L50-L73) task needs to be run. The [`publish` task depends on the `buildDexJar`](build.gradle.kts#L78) task, so it will be run automatically when publishing a release.
You can use [ReVanced CLI](https://github.com/ReVanced/revanced-cli) or [ReVanced Manager](https://github.com/ReVanced/revanced-manager) to use ReVanced Patches.

## 📚 Everything else

### 🛠️ Building

In order to build ReVanced Patches template, you can follow the [ReVanced documentation](https://github.com/ReVanced/revanced-documentation).
To build Privacy ReVanced Patches, 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 [licence 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.
Privacy ReVanced Patches is licensed under the GPLv3 license. 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 Privacy ReVanced Patches as long as you track changes/dates in source files.
Any modifications to Privacy ReVanced Patches must also be made available under the GPL,
along with build & install instructions.
6 changes: 6 additions & 0 deletions api/privacy-revanced-patches.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
public final class dev/jkcarino/revanced/patches/example/ExamplePatch : app/revanced/patcher/patch/BytecodePatch {
public static final field INSTANCE Ldev/jkcarino/revanced/patches/example/ExamplePatch;
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
}

6 changes: 0 additions & 6 deletions api/revanced-patches-template.api

This file was deleted.

34 changes: 17 additions & 17 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
signing
}

group = "app.revanced"
group = "dev.jkcarino"

repositories {
mavenCentral()
Expand Down Expand Up @@ -35,14 +35,14 @@ kotlin {
tasks {
withType(Jar::class) {
manifest {
attributes["Name"] = "ReVanced Patches template"
attributes["Description"] = "Patches template for ReVanced."
attributes["Name"] = "Privacy ReVanced Patches"
attributes["Description"] = "Patches for ReVanced."
attributes["Version"] = version
attributes["Timestamp"] = System.currentTimeMillis().toString()
attributes["Source"] = "git@github.com:revanced/revanced-patches-template.git"
attributes["Author"] = "ReVanced"
attributes["Contact"] = "contact@revanced.app"
attributes["Origin"] = "https://revanced.app"
attributes["Source"] = "git@github.com:jkennethcarino/privacy-revanced-patches.git"
attributes["Author"] = "Ken"
attributes["Contact"] = "6307355+jkennethcarino@users.noreply.github.com"
attributes["Origin"] = "https://github.com/jkennethcarino"
attributes["License"] = "GNU General Public License v3.0"
}
}
Expand Down Expand Up @@ -83,7 +83,7 @@ publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/revanced/revanced-patches-template")
url = uri("https://maven.pkg.github.com/jkennethcarino/privacy-revanced-patches")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
Expand All @@ -96,9 +96,9 @@ publishing {
from(components["java"])

pom {
name = "ReVanced Patches template"
description = "Patches template for ReVanced."
url = "https://revanced.app"
name = "Privacy ReVanced Patches"
description = "Patches for ReVanced."
url = "https://github.com/jkennethcarino"

licenses {
license {
Expand All @@ -108,15 +108,15 @@ publishing {
}
developers {
developer {
id = "ReVanced"
name = "ReVanced"
email = "contact@revanced.app"
id = "jkennethcarino"
name = "Ken"
email = "6307355+jkennethcarino@users.noreply.github.com"
}
}
scm {
connection = "scm:git:git://github.com/revanced/revanced-patches-template.git"
developerConnection = "scm:git:git@github.com:revanced/revanced-patches-template.git"
url = "https://github.com/revanced/revanced-patches-template"
connection = "scm:git:git://github.com/jkennethcarino/privacy-revanced-patches.git"
developerConnection = "scm:git:git@github.com:jkennethcarino/privacy-revanced-patches.git"
url = "https://github.com/jkennethcarino/privacy-revanced-patches"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
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 = 1.0.1
version = 1.0.0
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
rootProject.name = "revanced-patches-template"
rootProject.name = "privacy-revanced-patches"

buildCache {
local {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package app.revanced.patches.example
package dev.jkcarino.revanced.patches.example

import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.patch.BytecodePatch
Expand Down

0 comments on commit 41ee15c

Please sign in to comment.