Update CONTRIBUTING.md (#11399)
* update running * update running and debugging * update text * update text * add alternative * address comments
This commit is contained in:
parent
8f13e4185c
commit
d7444787be
108
CONTRIBUTING.md
108
CONTRIBUTING.md
@ -10,31 +10,54 @@ or fixing it directly by submitting a Pull Request.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
1. [Prerequisites](#prerequisites)
|
||||
1. [Tools](#tools)
|
||||
2. [Cloning the repository](#cloning-the-repository)
|
||||
2. [Getting help](#getting-help)
|
||||
3. [Writing an extension](#writing-an-extension)
|
||||
1. [Setting up a new Gradle module](#setting-up-a-new-gradle-module)
|
||||
2. [Core dependencies](#core-dependencies)
|
||||
3. [Extension main class](#extension-main-class)
|
||||
4. [Extension call flow](#extension-call-flow)
|
||||
5. [Misc notes](#misc-notes)
|
||||
6. [Advanced extension features](#advanced-extension-features)
|
||||
4. [Multi-source themes](#multi-source-themes)
|
||||
1. [The directory structure](#the-directory-structure)
|
||||
2. [Development workflow](#development-workflow)
|
||||
3. [Scaffolding overrides](#scaffolding-overrides)
|
||||
4. [Additional Notes](#additional-notes)
|
||||
5. [Running](#running)
|
||||
6. [Debugging](#debugging)
|
||||
1. [Android Debugger](#android-debugger)
|
||||
2. [Logs](#logs)
|
||||
3. [Inspecting network calls](#inspecting-network-calls)
|
||||
4. [Using external network inspecting tools](#using-external-network-inspecting-tools)
|
||||
7. [Building](#building)
|
||||
8. [Submitting the changes](#submitting-the-changes)
|
||||
1. [Pull Request checklist](#pull-request-checklist)
|
||||
- [Contributing](#contributing)
|
||||
- [Table of Contents](#table-of-contents)
|
||||
- [Prerequisites](#prerequisites)
|
||||
- [Tools](#tools)
|
||||
- [Cloning the repository](#cloning-the-repository)
|
||||
- [Getting help](#getting-help)
|
||||
- [Writing an extension](#writing-an-extension)
|
||||
- [Setting up a new Gradle module](#setting-up-a-new-gradle-module)
|
||||
- [Loading a subset of Gradle modules](#loading-a-subset-of-gradle-modules)
|
||||
- [Extension file structure](#extension-file-structure)
|
||||
- [AndroidManifest.xml (optional)](#androidmanifestxml-optional)
|
||||
- [build.gradle](#buildgradle)
|
||||
- [Core dependencies](#core-dependencies)
|
||||
- [Extension API](#extension-api)
|
||||
- [DataImage library](#dataimage-library)
|
||||
- [i18n library](#i18n-library)
|
||||
- [Additional dependencies](#additional-dependencies)
|
||||
- [Extension main class](#extension-main-class)
|
||||
- [Main class key variables](#main-class-key-variables)
|
||||
- [Extension call flow](#extension-call-flow)
|
||||
- [Popular Manga](#popular-manga)
|
||||
- [Latest Manga](#latest-manga)
|
||||
- [Manga Search](#manga-search)
|
||||
- [Filters](#filters)
|
||||
- [Manga Details](#manga-details)
|
||||
- [Chapter](#chapter)
|
||||
- [Chapter Pages](#chapter-pages)
|
||||
- [Misc notes](#misc-notes)
|
||||
- [Advanced Extension features](#advanced-extension-features)
|
||||
- [URL intent filter](#url-intent-filter)
|
||||
- [Update strategy](#update-strategy)
|
||||
- [Renaming existing sources](#renaming-existing-sources)
|
||||
- [Multi-source themes](#multi-source-themes)
|
||||
- [The directory structure](#the-directory-structure)
|
||||
- [Development workflow](#development-workflow)
|
||||
- [Scaffolding overrides](#scaffolding-overrides)
|
||||
- [Additional Notes](#additional-notes)
|
||||
- [Running](#running)
|
||||
- [Debugging](#debugging)
|
||||
- [Android Debugger](#android-debugger)
|
||||
- [Logs](#logs)
|
||||
- [Inspecting network calls](#inspecting-network-calls)
|
||||
- [Using external network inspecting tools](#using-external-network-inspecting-tools)
|
||||
- [Setup your proxy server](#setup-your-proxy-server)
|
||||
- [OkHttp proxy setup](#okhttp-proxy-setup)
|
||||
- [Building](#building)
|
||||
- [Submitting the changes](#submitting-the-changes)
|
||||
- [Pull Request checklist](#pull-request-checklist)
|
||||
|
||||
## Prerequisites
|
||||
|
||||
@ -692,43 +715,46 @@ with open(f"{package}/src/{source}.kt", "w") as f:
|
||||
|
||||
## Running
|
||||
|
||||
To make local development more convenient, you can use the following run configuration to launch
|
||||
Tachiyomi directly at the Browse panel:
|
||||
For local development, use the following run configuration to launch the app directly into the Browse panel.
|
||||
|
||||

|
||||

|
||||
|
||||
If you're running a Preview or debug build of Tachiyomi:
|
||||
Copy the following into `Launch Flags` for the Debug build of Mihon:
|
||||
|
||||
```
|
||||
-W -S -n eu.kanade.tachiyomi.debug/eu.kanade.tachiyomi.ui.main.MainActivity -a eu.kanade.tachiyomi.SHOW_CATALOGUES
|
||||
-W -S -n app.mihon.dev/eu.kanade.tachiyomi.ui.main.MainActivity -a eu.kanade.tachiyomi.SHOW_CATALOGUES
|
||||
```
|
||||
|
||||
And for a release build of Tachiyomi:
|
||||
For other builds, replace `app.mihon.dev` with the corresponding package IDs:
|
||||
- Release build: `app.mihon`
|
||||
- Preview build: `app.mihon.debug`
|
||||
|
||||
```
|
||||
-W -S -n eu.kanade.tachiyomi/eu.kanade.tachiyomi.ui.main.MainActivity -a eu.kanade.tachiyomi.SHOW_CATALOGUES
|
||||
```
|
||||
If the extension builds and runs successfully then the code changes should be ready to test in your local app.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> If you're deploying to Android 11 or higher, enable the "Always install with package manager" option in the run configurations. Without this option enabled, you might face issues such as Android Studio running an older version of the extension without the modifications you might have done.
|
||||
> If you're deploying to Android 11 or higher, enable the `Always install with package manager` option in the run configurations. Without this option enabled, you might face issues such as Android Studio running an older version of the extension without the modifications you might have done.
|
||||
|
||||
## Debugging
|
||||
|
||||
### Android Debugger
|
||||
|
||||
> [!IMPORTANT]
|
||||
> If you didn't build the main app from source with debug enabled and are using a release/beta APK, you **need** a rooted device.
|
||||
> If you are using an emulator instead, make sure you choose a profile **without** Google Play.
|
||||
> If you didn't **build the main app** from source with **debug enabled** and are using a release/beta APK, you **need a rooted device**.
|
||||
> If you are using an **emulator** instead, make sure you choose a profile **without Google Play**.
|
||||
|
||||
You can leverage the Android Debugger to step through your extension while debugging.
|
||||
Follow the steps above for building and running locally if you haven't already. Debugging will not work if you did not follow the steps above.
|
||||
|
||||
You can leverage the Android Debugger to add breakpoints and step through your extension while debugging.
|
||||
|
||||
You *cannot* simply use Android Studio's `Debug 'module.name'` -> this will most likely result in an
|
||||
error while launching.
|
||||
|
||||
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 the app.
|
||||
|
||||

|
||||
Inside the `Attach Debugger to Android Process` window, once the app is running on your device and `Show all processes` is checked, you should be able to select `app.mihon.dev` and press OK.
|
||||
|
||||

|
||||
|
||||
|
||||
### Logs
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user