-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
80 lines (56 loc) · 1.78 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
SHELL=/bin/bash
VERSION := $(shell grep '^version=' gradle.properties | cut -d'=' -f2)
optimize-drawables:
@avocado app/src/main/res/drawable/*.xml
clean:
@echo "Clean"
@./gradlew clean
lint:
@./gradlew lint
check:
@./gradlew check
format:
@./gradlew ktlintFormat
# ==============
# Building
# ==============
baseline-profile:
@echo "Generate baseline profile"
@./gradlew :app:generateReleaseBaselineProfile
build-aab:
@echo "Build AAB"
@./gradlew :app:bundleRelease
build-apk:
@echo "Build APK"
@./gradlew assembleRelease
# ==============
# Publishing
# ==============
publish-listing:
@./gradlew publishListing --console verbose
publish-to-test-track:
@echo -e "Retrieved Version: ${VERSION}\nHit enter to continue"
@read
@$(MAKE) clean # Required as 'publishBundle' publishes all .aab's in specified archive dir
@$(MAKE) build-aab
@echo "Publish Bundle"
@./gradlew publishBundle --track internal
publish:
@echo -e "Retrieved Version: ${VERSION}\n\n Hit enter if you have\n 1. Incremented the version\n 2. Updated the release notes\n\n Otherwise cancel target now."
@read
@echo "Check"
@$(MAKE) check
@$(MAKE) clean # Required as 'publishBundle' publishes all .aab's in archive dir
@$(MAKE) baseline-profile
@echo "Pushing latest changes";git add .;git commit -m "${VERSION}";git push
@$(MAKE) build-apk
@$(MAKE) create-gh-release
@$(MAKE) build-aab
@$(MAKE) publish-bundle
publish-bundle:
@echo "Publish Bundle"
@./gradlew publishBundle --track production --console verbose
create-gh-release:
@echo "Create GitHub Release"
@gh release create $(VERSION) app/build/outputs/apk/release/$(VERSION).apk -F app/src/main/play/release-notes/en-US/production.txt
# fdroid metadata: https://gitlab.com/fdroid/fdroiddata/-/blob/master/metadata/com.w2sv.wifiwidget.yml