Address lint errors

This commit is contained in:
Soitora 2024-01-09 01:53:53 +01:00
parent 2c8675bd22
commit 64135597a6
No known key found for this signature in database
GPG Key ID: A6D711EB4F2CCD97
4 changed files with 11 additions and 11 deletions

View File

@ -10,7 +10,7 @@ description: Compile and run own Tachiyomi extension.
To make local development more convenient, you can use the following run configuration to launch **Tachiyomi** directly at the Browse panel: To make local development more convenient, you can use the following run configuration to launch **Tachiyomi** directly at the Browse panel:
![](https://i.imgur.com/STy0UFY.png) ![Browse panel](/docs/guides/creating-extensions/compiling/BrowsePanel.webp =801x394)
If you're running a Preview or debug build of **Tachiyomi**: If you're running a Preview or debug build of **Tachiyomi**:
@ -38,7 +38,7 @@ You *cannot* simply use **Android Studio**'s `Debug 'module.name'` -> this will
Instead, once you've built and installed your extension on the target device, use `Attach Debugger to Android Process` to start debugging **Tachiyomi**. Instead, once you've built and installed your extension on the target device, use `Attach Debugger to Android Process` to start debugging **Tachiyomi**.
![](https://i.imgur.com/muhXyfu.png) ![Android Debugger](/docs/guides/creating-extensions/compiling/AndroidDebugger.webp =532x474)
### Logs ### Logs
@ -64,7 +64,7 @@ If you want to take a deeper look into the network flow, such as taking a look i
#### Setup your proxy server #### Setup your proxy server
We are going to use [mitm-proxy](https://mitmproxy.org/) but you can replace it with any other Web Debugger (i.e. Charles, Burp Suite, Fiddler etc). To install and execute, follow the commands bellow. We are going to use [mitm-proxy](https://mitmproxy.org/) but you can replace it with any other Web Debugger (i.e. Charles, Burp Suite, Fiddler etc). To install and execute, follow the commands bellow.
```console ```bash
Install the tool. Install the tool.
$ sudo pip3 install mitmproxy $ sudo pip3 install mitmproxy
Execute the web interface and the proxy. Execute the web interface and the proxy.
@ -73,14 +73,14 @@ $ mitmweb
Alternatively, you can also use the Docker image: Alternatively, you can also use the Docker image:
``` ```bash
$ docker run --rm -it -p 8080:8080 \ $ docker run --rm -it -p 8080:8080 \
-p 127.0.0.1:8081:8081 \ -p 127.0.0.1:8081:8081 \
--web-host 0.0.0.0 \ --web-host 0.0.0.0 \
mitmproxy/mitmproxy mitmweb mitmproxy/mitmproxy mitmweb
``` ```
After installing and running, open your browser and navigate to http://127.0.0.1:8081. After installing and running, open your browser and navigate to `http://127.0.0.1:8081`.
#### OkHttp proxy setup #### OkHttp proxy setup
Since most of the manga sources are going to use HTTPS, we need to disable SSL verification in order to use the web debugger. For that, add this code to inside your source class: Since most of the manga sources are going to use HTTPS, we need to disable SSL verification in order to use the web debugger. For that, add this code to inside your source class:

View File

@ -25,7 +25,7 @@ To adjust which modules are loaded, make adjustments to the `settings.gradle.kts
The simplest extension structure looks like this: The simplest extension structure looks like this:
```console ```bash
$ tree src/<lang>/<mysourcename>/ $ tree src/<lang>/<mysourcename>/
src/<lang>/<mysourcename>/ src/<lang>/<mysourcename>/
├── AndroidManifest.xml ├── AndroidManifest.xml
@ -60,7 +60,7 @@ A minimal [Android manifest file](https://developer.android.com/guide/topics/man
### build.gradle ### build.gradle
Make sure that your new extension's `build.gradle` file follows the following structure: Make sure that your new extension's `build.gradle` file follows the following structure:
```gradle ```kotlin
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
apply plugin: 'kotlin-android' apply plugin: 'kotlin-android'
@ -96,7 +96,7 @@ Extensions rely on [extensions-lib](https://github.com/tachiyomiorg/extensions-l
[`lib-dataimage`](https://github.com/tachiyomiorg/extensions/tree/main/lib/dataimage) is a library for handling [base 64 encoded image data](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) using an [OkHttp interceptor](https://square.github.io/okhttp/interceptors/). [`lib-dataimage`](https://github.com/tachiyomiorg/extensions/tree/main/lib/dataimage) is a library for handling [base 64 encoded image data](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) using an [OkHttp interceptor](https://square.github.io/okhttp/interceptors/).
```gradle ```kotlin
dependencies { dependencies {
implementation(project(':lib-dataimage')) implementation(project(':lib-dataimage'))
} }
@ -106,7 +106,7 @@ dependencies {
[`lib-i18n`](https://github.com/tachiyomiorg/extensions/tree/main/lib/i18n) is a library for handling internationalization in the sources. It allows loading `.properties` files with messages located under the `assets/i18n` folder of each extension, that can be used to translate strings under the source. [`lib-i18n`](https://github.com/tachiyomiorg/extensions/tree/main/lib/i18n) is a library for handling internationalization in the sources. It allows loading `.properties` files with messages located under the `assets/i18n` folder of each extension, that can be used to translate strings under the source.
```gradle ```kotlin
dependencies { dependencies {
implementation(project(':lib-i18n')) implementation(project(':lib-i18n'))
} }
@ -267,8 +267,8 @@ Extensions can define URL intent filters by defining it inside a custom `Android
To test if the URL intent filter is working as expected, you can try opening the website in a browser and navigating to the endpoint that was added as a filter or clicking a hyperlink. Alternatively, you can use the `adb` command below. To test if the URL intent filter is working as expected, you can try opening the website in a browser and navigating to the endpoint that was added as a filter or clicking a hyperlink. Alternatively, you can use the `adb` command below.
```console ```bash
$ adb shell am start -d "<your-link>" -a android.intent.action.VIEW adb shell am start -d "<your-link>" -a android.intent.action.VIEW
``` ```
::: warning CAUTION ::: warning CAUTION
The activity does not support any Kotlin Intrinsics specific methods or calls, and using them will causes crashes in the activity. The activity does not support any Kotlin Intrinsics specific methods or calls, and using them will causes crashes in the activity.

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB