- Network nodes tech-style icon (dark theme, cyan accents) - Feature graphic for Play Store (1024x500) - PNG icons for all densities - Justfile with build, release, icons, install tasks
72 lines
2.7 KiB
Makefile
72 lines
2.7 KiB
Makefile
# Tether API build tasks
|
|
|
|
# Docker image for Android builds
|
|
android_image := "cimg/android:2025.12"
|
|
gradle_cache := "gradle-cache"
|
|
|
|
# Default task
|
|
default:
|
|
@just --list
|
|
|
|
# Build debug APK
|
|
build:
|
|
docker run --rm \
|
|
-v {{justfile_directory()}}:/project \
|
|
-v {{gradle_cache}}:/home/circleci/.gradle \
|
|
-w /project \
|
|
{{android_image}} \
|
|
./gradlew assembleDebug --no-daemon
|
|
@echo "APK: app/build/outputs/apk/debug/app-debug.apk"
|
|
|
|
# Build release APK (requires keystore and env vars)
|
|
release:
|
|
docker run --rm \
|
|
-v {{justfile_directory()}}:/project \
|
|
-v {{gradle_cache}}:/home/circleci/.gradle \
|
|
-w /project \
|
|
-e KEYSTORE_PASSWORD \
|
|
-e KEY_ALIAS \
|
|
-e KEY_PASSWORD \
|
|
{{android_image}} \
|
|
./gradlew assembleRelease --no-daemon
|
|
@echo "APK: app/build/outputs/apk/release/app-release.apk"
|
|
|
|
# Clean build artifacts
|
|
clean:
|
|
rm -rf app/build build .gradle
|
|
@echo "Cleaned"
|
|
|
|
# Run gradle tasks
|
|
gradle *ARGS:
|
|
docker run --rm \
|
|
-v {{justfile_directory()}}:/project \
|
|
-v {{gradle_cache}}:/home/circleci/.gradle \
|
|
-w /project \
|
|
{{android_image}} \
|
|
./gradlew {{ARGS}} --no-daemon
|
|
|
|
# Generate icons from SVG
|
|
icons:
|
|
inkscape assets/icon.svg -w 512 -h 512 -o assets/icon-512.png
|
|
inkscape assets/icon.svg -w 192 -h 192 -o app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
|
|
inkscape assets/icon.svg -w 144 -h 144 -o app/src/main/res/mipmap-xxhdpi/ic_launcher.png
|
|
inkscape assets/icon.svg -w 96 -h 96 -o app/src/main/res/mipmap-xhdpi/ic_launcher.png
|
|
inkscape assets/icon.svg -w 72 -h 72 -o app/src/main/res/mipmap-hdpi/ic_launcher.png
|
|
inkscape assets/icon.svg -w 48 -h 48 -o app/src/main/res/mipmap-mdpi/ic_launcher.png
|
|
cp app/src/main/res/mipmap-xxxhdpi/ic_launcher.png app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
|
|
cp app/src/main/res/mipmap-xxhdpi/ic_launcher.png app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
|
|
cp app/src/main/res/mipmap-xhdpi/ic_launcher.png app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
|
|
cp app/src/main/res/mipmap-hdpi/ic_launcher.png app/src/main/res/mipmap-hdpi/ic_launcher_round.png
|
|
cp app/src/main/res/mipmap-mdpi/ic_launcher.png app/src/main/res/mipmap-mdpi/ic_launcher_round.png
|
|
inkscape assets/feature-graphic.svg -w 1024 -h 500 -o assets/feature-graphic.png
|
|
@echo "Generated all icons"
|
|
|
|
# Install APK on connected device
|
|
install: build
|
|
adb install -r app/build/outputs/apk/debug/app-debug.apk
|
|
|
|
# Generate keystore for release signing
|
|
keystore:
|
|
keytool -genkey -v -keystore keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias release
|
|
@echo "Created keystore.jks - keep this safe!"
|