This tutorial is only for building v1.8.2. If you want to build earlier versions, this tutorial may contain unresolved issues, and you should explore on your own.
With the growth of the APP codebase and the introduction of Rust code, a single /gradlew task can no longer fully explain how to build this APP. This post is created specifically to provide explanation.
This page is not suitable for non-developers.
The must-install toolchains are as follows:
Optional installation: msvc, used for Rust build tool selection (may be required on Windows platform).
You can specify the version number by setting the environment variable APP_VERSION_NAME (optional):
Generate AboutLibraries metadata:
Use the following command for building:
Windows users can use ./gradlew light to generate an improved MSI installer:
After building, the flatten package and MSI installer will be generated in the composeApp/build/compose/binaries/main-release/app/ directory.
Before building, you need to install system dependencies:
After building, the flatten package will be generated in the composeApp/build/compose/binaries/main-release/app/ directory.
macOS platform needs to use a specific command to generate DMG installer:
After building, the DMG file will be generated in the composeApp/build/compose/binaries/main-release/dmg/ directory, and the system will automatically open it.
Install Rust target platforms:
Generate AboutLibraries metadata:
After building, the APK file is located at composeApp/build/outputs/apk/release/composeApp-release.apk.
If Rust-related errors occur during the build process, please ensure that the required Rust target platforms are correctly installed. You can check installed target platforms using the rustup target list --installed command.
iOS building can only be performed on macOS machines, and only M-chip Macs are supported. We do not and will not provide support for Intel Macs.
Install Rust target platform:
Generate AboutLibraries metadata:
Minimum Xcode 16.2 is required. Theoretically, you can build without switching versions and setting environment variables.
If the build still fails after selecting Xcode 16.2 with xcode-select, try adding the following environment variables:
After building, the IPA file is located at composeApp/build/archives/release/Pixiv-MultiPlatform.ipa.