Skip to content

Latest commit

 

History

History
122 lines (76 loc) · 2.96 KB

Build_Instructions.md

File metadata and controls

122 lines (76 loc) · 2.96 KB

Build Instructions For Beginners / 入门构建指南

This part is not written very well.

See also Developer Guide.

Last Update: 2024.11.01

Requirement

Build:

  1. a PC : any desktop operate system platform (only Windows and Ubuntu 20.04 are tested), I am not sure if it works on Android(Termux) because jvm version.
  2. JDK 17 (we are using AGP 8.7.2 with gradle 8.10.2).
  3. The connected and fast network.

Development:

Plus Android Studio with correspond Android Gradle Plugin (currently Ladybug | 2024.2.1 Patch 2). (IDEA might be not compatible because Android Gradle Plugin is too new)

Instructions (Build with commandline)

bash(on Linux) and powershell (on Windows) are tested.

1) Download source code

a. go to release page to download parked release code

b. use git

git clone <REPO-URL> --depth=1 -b <VERSION>

2) install JDK

on Windows

winget install --id EclipseAdoptium.Temurin.17.JDK
# or JDK by other vendor

on Linux (Debian based)

apt-get install temurin-17-jdk

on Linux ( Fedora / RedHat / SUSE )

yum install temurin-17-jdk

3) change your shell to repository's root

4) generate a new signing key or use your own

See Also Appendix Generate A New Keystore for Signing

5) configure Signing Config

create file signing.properties on repository's root:

(Replace <*> with yours.)

storeFile=<your-signing-key-file-path->
storePassword=<keystore-password>
keyAlias=<key-alias>
keyPassword=<key-password>

See Also Appendix Generate A New Keystore for Signing

6) build

Now, we can build project in variant of Modern and Stable with Build Type Release now. 1

 ./gradlew assembleModernStableRelease --parallel

7) pick up file

Built apk is in ./app/build/outputs/apk/modernStable/release/ with name PhonographPlus_<VERSION>-modern-stable-release.apk

You can run

./gradlew PublishModernStableRelease

to move apk to ./products/ModernStableRelease and rename to Phonograph Plus_<VERSION>_ModernStableRelease.apk

Appendix

Generate A New Keystore for Signing

Use keytool from JDK:

keytool -genkeypair -storepass <keystore-password> -alias <key-alias> -keypass <key-password> -keyalg RSA -keysize 2048 -keystore <your-signing-key-file-path->

Generate signing.properties

You can create signing.properties by command:

(Replace <*> with yours.)

echo "storeFile=<your-signing-key-file-path->" >> ./signing.properties
echo "storePassword=<keystore-password>" >> ./signing.properties
echo "keyAlias=<key-alias>" >> ./signing.properties
echo "keyPassword=<key-password>" >> ./signing.properties

Footnotes

  1. See more in section Build Variant from Development Guild.