Skip to content

Commit b06cc39

Browse files
committed
feat: Move implementation from the manager repo
1 parent c102f74 commit b06cc39

File tree

11 files changed

+61
-124
lines changed

11 files changed

+61
-124
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ body:
1111
<source
1212
width="256px"
1313
media="(prefers-color-scheme: dark)"
14-
srcset="https://raw.githubusercontent.com/revanced/revanced-manager-downloader-template/main/assets/revanced-headline/revanced-headline-vertical-dark.svg"
14+
srcset="https://raw.githubusercontent.com/revanced/revanced-manager-apkmirror-downloader/main/assets/revanced-headline/revanced-headline-vertical-dark.svg"
1515
>
16-
<img
16+
<img
1717
width="256px"
18-
src="https://raw.githubusercontent.com/revanced/revanced-manager-downloader-template/main/assets/revanced-headline/revanced-headline-vertical-light.svg"
18+
src="https://raw.githubusercontent.com/revanced/revanced-manager-apkmirror-downloader/main/assets/revanced-headline/revanced-headline-vertical-light.svg"
1919
>
2020
</picture>
2121
<br>
2222
<a href="https://revanced.app/">
2323
<picture>
24-
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/revanced/revanced-manager-downloader-template/main/assets/revanced-logo/revanced-logo.svg" />
25-
<img height="24px" src="https://raw.githubusercontent.com/revanced/revanced-manager-downloader-template/main/assets/revanced-logo/revanced-logo.svg" />
24+
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/revanced/revanced-manager-apkmirror-downloader/main/assets/revanced-logo/revanced-logo.svg" />
25+
<img height="24px" src="https://raw.githubusercontent.com/revanced/revanced-manager-apkmirror-downloader/main/assets/revanced-logo/revanced-logo.svg" />
2626
</picture>
2727
</a>&nbsp;&nbsp;&nbsp;
2828
<a href="https://github.com/ReVanced">
@@ -66,12 +66,10 @@ body:
6666
Continuing the legacy of Vanced
6767
</p>
6868
69-
# ReVanced Manager downloader template bug report
70-
7169
Before creating a new bug report, please keep the following in mind:
7270
73-
- **Do not submit a duplicate bug report**: Search for existing bug reports [here](https://github.com/ReVanced/revanced-manager-downloader-template/issues?q=label%3A%22Bug+report%22).
74-
- **Review the contribution guidelines**: Make sure your bug report adheres to it. You can find the guidelines [here](https://github.com/ReVanced/revanced-manager-downloader-template/blob/main/CONTRIBUTING.md).
71+
- **Do not submit a duplicate bug report**: Search for existing bug reports [here](https://github.com/ReVanced/revanced-manager-apkmirror-downloader/issues?q=label%3A%22Bug+report%22).
72+
- **Review the contribution guidelines**: Make sure your bug report adheres to it. You can find the guidelines [here](https://github.com/ReVanced/revanced-manager-apkmirror-downloader/blob/main/CONTRIBUTING.md).
7573
- **Do not use the issue page for support**: If you need help or have questions, check out other platforms on [revanced.app](https://revanced.app).
7674
- type: textarea
7775
attributes:
@@ -85,7 +83,7 @@ body:
8583
- type: textarea
8684
attributes:
8785
label: Error logs
88-
description: Exceptions can be captured by running `logcat | grep AndroidRuntime` in a shell.
86+
description: These can be exported from the Patcher screen or from the Manager settings.
8987
render: shell
9088
- type: textarea
9189
attributes:

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ blank_issues_enabled: false
22
contact_links:
33
- name: 🗨 Discussions
44
url: https://github.com/revanced/revanced-suggestions/discussions
5-
about: Have something unspecific to ReVanced Manager downloader in mind? Search for or start a new discussion!
5+
about: Have something unspecific to this plugin in mind? Search for or start a new discussion!

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ body:
1111
<source
1212
width="256px"
1313
media="(prefers-color-scheme: dark)"
14-
srcset="https://raw.githubusercontent.com/revanced/revanced-manager-downloader-template/main/assets/revanced-headline/revanced-headline-vertical-dark.svg"
14+
srcset="https://raw.githubusercontent.com/revanced/revanced-manager-apkmirror-downloader/main/assets/revanced-headline/revanced-headline-vertical-dark.svg"
1515
>
16-
<img
16+
<img
1717
width="256px"
18-
src="https://raw.githubusercontent.com/revanced/revanced-manager-downloader-template/main/assets/revanced-headline/revanced-headline-vertical-light.svg"
18+
src="https://raw.githubusercontent.com/revanced/revanced-manager-apkmirror-downloader/main/assets/revanced-headline/revanced-headline-vertical-light.svg"
1919
>
2020
</picture>
2121
<br>
2222
<a href="https://revanced.app/">
2323
<picture>
24-
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/revanced/revanced-manager-downloader-template/main/assets/revanced-logo/revanced-logo.svg" />
25-
<img height="24px" src="https://raw.githubusercontent.com/revanced/revanced-manager-downloader-template/main/assets/revanced-logo/revanced-logo.svg" />
24+
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/revanced/revanced-manager-apkmirror-downloader/main/assets/revanced-logo/revanced-logo.svg" />
25+
<img height="24px" src="https://raw.githubusercontent.com/revanced/revanced-manager-apkmirror-downloader/main/assets/revanced-logo/revanced-logo.svg" />
2626
</picture>
2727
</a>&nbsp;&nbsp;&nbsp;
2828
<a href="https://github.com/ReVanced">
@@ -66,12 +66,10 @@ body:
6666
Continuing the legacy of Vanced
6767
</p>
6868
69-
# ReVanced Manager downloader template feature request
70-
7169
Before creating a new feature request, please keep the following in mind:
7270
73-
- **Do not submit a duplicate feature request**: Search for existing feature requests [here](https://github.com/ReVanced/revanced-manager-downloader-template/issues?q=label%3A%22Feature+request%22).
74-
- **Review the contribution guidelines**: Make sure your feature request adheres to it. You can find the guidelines [here](https://github.com/ReVanced/revanced-manager-downloader-template/blob/main/CONTRIBUTING.md).
71+
- **Do not submit a duplicate feature request**: Search for existing feature requests [here](https://github.com/ReVanced/revanced-manager-apkmirror-downloader/issues?q=label%3A%22Feature+request%22).
72+
- **Review the contribution guidelines**: Make sure your feature request adheres to it. You can find the guidelines [here](https://github.com/ReVanced/revanced-manager-apkmirror-downloader/blob/main/CONTRIBUTING.md).
7573
- **Do not use the issue page for support**: If you need help or have questions, check out other platforms on [revanced.app](https://revanced.app).
7674
- type: textarea
7775
attributes:
@@ -82,10 +80,10 @@ body:
8280
- type: textarea
8381
attributes:
8482
label: Motivation
85-
description: |
83+
description: |
8684
A strong motivation is necessary for a feature request to be considered.
87-
88-
- Why should this feature be implemented?
85+
86+
- Why should this feature be implemented?
8987
- What is the explicit use case?
9088
- What are the benefits?
9189
- What makes this feature important?

README.md

Lines changed: 14 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
media="(prefers-color-scheme: dark)"
66
srcset="assets/revanced-headline/revanced-headline-vertical-dark.svg"
77
>
8-
<img
8+
<img
99
width="256px"
1010
src="assets/revanced-headline/revanced-headline-vertical-light.svg"
1111
>
@@ -58,70 +58,34 @@
5858
Continuing the legacy of Vanced
5959
</p>
6060

61-
# 👋🔌 ReVanced Manager downloader template
61+
# 👋🔌 ReVanced Manager APKMirror downloader
6262

63-
![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/ReVanced/revanced-manager-downloader-template/release.yml)
63+
![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/ReVanced/revanced-manager-apkmirror-downloader/release.yml)
6464
![GPLv3 License](https://img.shields.io/badge/License-GPL%20v3-yellow.svg)
6565

66-
Template repository for ReVanced Manager downloader plugins.
67-
68-
## ❓ About
69-
70-
This is a template to create a new ReVanced Manager downloader repository. An example implementation is included.
71-
72-
## 🚀 Get started
73-
74-
To start using this template, follow these steps:
75-
76-
1. [Create a new repository using this template](https://github.com/new?template_name=revanced-manager-downloader-template&template_owner=ReVanced)
77-
2. Set up the [build.gradle.kts](build.gradle.kts) file (Specifically, the [package nme](build.gradle.kts#L21).
78-
3. Update dependencies in the [libs.versions.toml](gradle/libs.versions.toml) file
79-
4. [Create a pass-phrased GPG master key and subkey](https://mikeross.xyz/create-gpg-key-pair-with-subkeys/)
80-
1. Add the private key as a secret named [GPG_PRIVATE_KEY](.github/workflows/release.yml#L51) to your repository
81-
2. Add the passphrase as a secret named [GPG_PASSPHRASE](.github/workflows/release.yml#L52) to your repository
82-
3. Add the fingerprint of the GPG subkey as a secret named [GPG_FINGERPRINT](.github/workflows/release.yml#L53)
83-
to your repository
84-
5. [Generate a keystore](https://developer.android.com/studio/publish/app-signing#generate-key)
85-
1. Add the Base64 encoded key store as a secret named [KEYSTORE](.github/workflows/release.yml#L57) to your repository
86-
2. Add the keystore password as a secret named [KEYSTORE_PASSWORD](.github/workflows/release.yml#L62) to your repository
87-
3. Add the keystore entry alias as a secret named [KEYSTORE_ENTRY_ALIAS](.github/workflows/release.yml#L63) to your repository
88-
4. Add the keystore entry password as a secret named [KEYSTORE_ENTRY_PASSWORD](.github/workflows/release.yml#L64) to your repository
89-
7. Set up the [README.md](README.md) file[^1] (e.g, title, description, license, summary),
90-
the [issue templates](.github/ISSUE_TEMPLATE)[^2] and the [contribution guidelines](CONTRIBUTING.md)[^3]
91-
92-
🎉 You are now ready to develop and release a ReVanced Manager downloader!
93-
94-
[^1]: [Example README.md file](https://github.com/ReVanced/revanced-manager/blob/main/README.md)
95-
[^2]: [Example issue templates](https://github.com/ReVanced/revanced-manager/tree/main/.github/ISSUE_TEMPLATE)
96-
[^3]: [Example contribution guidelines](https://github.com/ReVanced/revanced-manager/blob/main/CONTRIBUTING.md)
66+
An [APKMirror](https://www.apkmirror.com/) plugin for ReVanced Manager.
9767

9868
## 🧑‍💻 Usage
9969

100-
To develop and release ReVanced Manager downloader using this template, some things need to be considered:
70+
- Plugins are managed as Android apps. Download and install the APK file from the releases page.
71+
- After installing, restart ReVanced Manager and enable the plugin in the settings.
72+
- The plugin will now be usable.
10173

102-
- Development starts in feature branches. Once a feature branch is ready, it is squashed and merged into the `dev` branch
103-
- The `dev` branch is merged into the `main` branch once it is ready for release
104-
- Semantic versioning is used to version ReVanced Manager downloader.
105-
- Semantic commit messages are used for commits
106-
- Commits on the `dev` branch and `main` branch are automatically released
107-
via the [release.yml](.github/workflows/release.yml) workflow, which is also responsible for generating the changelog
108-
and updating the version of ReVanced Manager downloader. It is triggered by pushing to the `dev` or `main` branch.
109-
The workflow uses the `publish` task to publish the release.
110-
- The `publish` task depends on the `assembleRelease` task, so it will be run automatically when publishing a release.
74+
The plugin works by opening the APKMirror website in an embedded browser. If the search string contains a version, you must select that version. Selecting another version in that situation will cause patching to fail.
11175

11276
## 📚 Everything else
11377

11478
### 📙 Contributing
11579

116-
Thank you for considering contributing to ReVanced Manager downloader.
80+
Thank you for considering contributing to ReVanced Manager APKMirror downloader.
11781
You can find the contribution guidelines [here](CONTRIBUTING.md).
11882

11983
### 🛠️ Building
12084

121-
To build ReVanced Manager downloader template, a Java Development Kit (JDK) and Git must be installed.
85+
To build ReVanced Manager downloader template, a Java Development Kit (JDK) and Git must be installed.
12286
Follow the steps below to build ReVanced Manager downloader template:
12387

124-
1. Run `git clone [email protected]:ReVanced/revanced-manager-downloader-template.git` to clone the repository
88+
1. Run `git clone [email protected]:ReVanced/revanced-manager-apkmirror-downloader.git` to clone the repository
12589
2. Run `gradlew assembleRelease` to build the project
12690

12791
> [!NOTE]
@@ -137,9 +101,9 @@ Follow the steps below to build ReVanced Manager downloader template:
137101
138102
## 📜 Licence
139103
140-
ReVanced Manager downloader template is licensed under the GPLv3 licence.
104+
This project is licensed under the GPLv3 licence.
141105
Please see the [license file](LICENSE) for more information.
142106
[tl;dr](https://www.tldrlegal.com/license/gnu-general-public-license-v3-gpl-3) you may copy, distribute
143-
and modify ReVanced Manager downloader template as long as you track changes/dates in source files.
144-
Any modifications to ReVanced Manager downloader template must also be made available under the GPL,
107+
and modify the plugin as long as you track changes/dates in source files.
108+
Any modifications must also be made available under the GPL,
145109
along with build & install instructions.

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ dependencies {
1010
}
1111

1212
android {
13-
val packageName = "app.revanced.manager.plugin.downloader.example"
13+
val packageName = "app.revanced.manager.plugin.downloader.apkmirror"
1414

1515
namespace = packageName
1616
compileSdk = 35

proguard-rules.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-keep public class app.revanced.manager.plugin.downloader.example.*
1+
-keep public class app.revanced.manager.plugin.downloader.apkmirror.*

settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
rootProject.name = "revanced-manager-downloader-template"
1+
rootProject.name = "revanced-manager-apkmirror-downloader"
22

33
pluginManagement.repositories {
44
gradlePluginPortal()

src/main/AndroidManifest.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,8 @@
99
android:label="@string/app_name"
1010
tools:targetApi="35">
1111

12-
<!--
13-
ReVanced Manager will look for a plugin definition in this class.
14-
CHeck the file for more information.
15-
-->
1612
<meta-data
1713
android:name="app.revanced.manager.plugin.downloader.class"
18-
android:value="app.revanced.manager.plugin.downloader.example.ExampleDownloaderKt" />
14+
android:value="app.revanced.manager.plugin.downloader.apkmirror.APKMirrorDownloaderKt" />
1915
</application>
2016
</manifest>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
@file:Suppress("Unused")
2+
3+
package app.revanced.manager.plugin.downloader.apkmirror
4+
5+
import android.net.Uri
6+
import app.revanced.manager.plugin.downloader.webview.WebViewDownloader
7+
8+
val apkMirrorDownloader = WebViewDownloader { packageName, version ->
9+
with(Uri.Builder()) {
10+
scheme("https")
11+
authority("www.apkmirror.com")
12+
mapOf(
13+
"post_type" to "app_release",
14+
"searchtype" to "apk",
15+
"s" to (version?.let { "$packageName $it" } ?: packageName),
16+
"bundles%5B%5D" to "apk_files" // bundles[]
17+
).forEach { (key, value) ->
18+
appendQueryParameter(key, value)
19+
}
20+
21+
build().toString()
22+
}
23+
}

src/main/kotlin/app/revanced/manager/plugin/downloader/example/ExampleDownloader.kt

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)