A Gradle plugin for Morphe Patches projects.
Β
Morphe Patches Gradle plugin configures a project to develop Morphe Patches.
For that, the plugin provides:
- The settings plugin:
Applied to the
settings.gradle.ktsfile, configures the project repositories and subprojects - The patches plugin: Applied to the patches subproject by the settings plugin
- The extension plugin: Applied to extension subprojects by the settings plugin
Caution
This plugin is a hard fork and was not originally created by Morphe. This plugin functionality may dramatically change at any time.
Morphe Patches Gradle Plugin is based off the prior work of ReVanced. All modifications made by Morphe, along with their dates, can be found in the Git history.
Tip
The Morphe Patches template repository uses this plugin and is a good starting point to create a new Morphe Patches project.
Add the following to the settings.gradle.kts file:
pluginManagement {
repositories {
`mavenLocal()`
gradlePluginPortal()
google()
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/MorpheApp/registry")
credentials {
username = providers.gradleProperty("gpr.user")
password = providers.gradleProperty("gpr.key")
}
}
}
}
plugins {
id("app.morphe.patches") version "<version>"
}Note
The plugin is published to the GitHub Package Registry, so you need to authenticate with GitHub.
More information
here.
Create the patches project and configure the build.gradle.kts file:
patches {
about {
name = "Morphe custom patches" // Use your own name if desired.
description = "Custom patches for Morphe"
// ...
}
}Note
By default, the plugin expects the patches project to be in the patches directory.
Create the extension project and configure the build.gradle.kts file:
extension {
name = "extensions/extension.mpe"
}
android {
namespace = "app.morphe.extension"
}Note
By default, the plugin expects extension projects to be under the extensions directory.
To build Morphe Patches Gradle plugin, follow these steps:
- Clone the repository and navigate to the project directory.
- Authenticate with GitHub. More information here.
- Run
./gradlew buildto build the plugin. - Optionally, run
./gradlew publishToMavenLocalto publish the plugin to your local Maven repository for development.
Morphe Patches are licensed under the GNU GPL v3.0, with additional conditions under Section 7:
- Name Restriction (7c): The name "Morphe" may not be used for derivative works.
Derivatives must adopt a distinct identity unrelated to "Morphe."
See the LICENSE file for full terms.