Files
coco 723ce1af5c a
2026-07-03 15:12:48 +08:00

35 lines
1.2 KiB
Makefile

SHELL := /bin/bash
path := ./
detekt:
$(path)gradlew detektAll --no-configuration-cache
buildApp:
./gradlew :app:assemble --no-configuration-cache
buildWear:
./gradlew :wear:assemble --no-configuration-cache
localCheck: detekt buildApp buildWear
compose_metrics:
$(path)gradlew :app:assembleRelease \-Pmyapp.enableComposeCompilerReports=true --no-configuration-cache
# https://github.com/PatilShreyas/compose-report-to-html
compose_report:
java -jar composeReport2Html.jar \
-app Coffeegram \
-overallStatsReport app/build/compose_metrics/app_release-module.json \
-detailedStatsMetrics app/build/compose_metrics/app_release-composables.csv \
-composableMetrics app/build/compose_metrics/app_release-composables.txt \
-classMetrics app/build/compose_metrics/app_release-classes.txt \
-o app/build/compose_report/
# Удаляет локальные ветки которые отсутствуют на remote
# from: https://stackoverflow.com/a/17029936/981330
unsafe_clear_branches:
git fetch --prune && \
git branch -r | awk '{print $$1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | \
awk '{print $$1}' | xargs git branch -D