Skip to content

MorpheApp/morphe-patches-gradle-plugin

Repository files navigation

Website badge Documentation badge Subreddit badge X badge Crowdin badge

🐘 Morphe Patches Gradle plugin

A Gradle plugin for Morphe Patches projects.

Β 

❓ About

Morphe Patches Gradle plugin configures a project to develop Morphe Patches.

For that, the plugin provides:

  • The settings plugin: Applied to the settings.gradle.kts file, 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.

πŸš€ How to get started

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.

πŸ“š Everything else

πŸ› οΈ Building

To build Morphe Patches Gradle plugin, follow these steps:

  1. Clone the repository and navigate to the project directory.
  2. Authenticate with GitHub. More information here.
  3. Run ./gradlew build to build the plugin.
  4. Optionally, run ./gradlew publishToMavenLocal to publish the plugin to your local Maven repository for development.

πŸ“œ Licence

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.

Sponsor this project

Packages

 
 
 

Contributors

Languages