Template for an Aliucord plugins repo
This template uses Java 11 which requires gradle alpha which is only supported by Android Studio Beta or later. To use it, you must change your Android Studio updater branch to beta or canary.
Alternatively, you can change JavaVersion.VERSION_11
to JavaVersion.VERSION_1_8
in all build.gradle files and follow
the Android Studio instructions to downgrade to Java 8
- Generate a repo based on this template
- Create a new folder that will hold everything needed
- Inside this folder, create a folder called buildtool
- Save the latest buildtool binary and example config to the buildtools folder
- Rename the config to
config.json
and correct the androidSDK path in it - Clone Aliucord:
git clone https://github.com/Aliucord/Aliucord repo
- Clone your generated repo and change the plugins field in buildtool's config.json to the name of your plugin folder
- Optional but highly recommended (You will need this sooner or later): Download and decompile the latest Discord apk
- Download the correct discord apk from https://aliucord.tk/download/discord?v=VERSION, for example https://aliucord.tk/download/discord?v=80202
- Decompile it using jadx:
jadx --show-bad-code --no-replace-consts the.apk
- Your resulting folder structure should look something like this:
Plugins ├── buildtool │ ├── buildtool │ └── config.json ├── discord.apk ├── discord_decompiled │ ├── resources │ └── sources ├── plugins │ ├── build.gradle │ ├── build.sh │ ├── ExamplePlugins │ ├── gradle │ ├── gradle.properties │ ├── gradlew │ ├── gradlew.bat │ ├── local.properties │ ├── README.md │ ├── settings.gradle │ └── updater.json └── repo ├── Aliucord ├── build.gradle ├── DiscordStubs ├── gradle ├── gradle.properties ├── gradlew ├── gradlew.bat ├── installer ├── LICENSE ├── local.properties ├── manifest.patch ├── README.md └── settings.gradle
This template includes 4 example plugins which you can find in the ExamplePlugins folder.
- Copy the
HelloWorld
example plugin into the root of this folder as MyFirstPlugin and fix all values in the plugin Manifest method - Uncomment the first line in settings.gradle to tell gradle to include it. Whenever you add a new plugin you have to add it here
- Inspect the updater.json file and uncomment the MyFirstPlugin section. Whenever you add a new plugin you have to add it to updater.json similar to the MyFirstPlugin block
- Run
./build.sh MyFirstPlugin
to build and deploy the plugin to your phone and try it out
Everything in this repo is released into the public domain. You may use it however you want with no conditions whatsoever