-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
61 lines (43 loc) · 1.53 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
SHELL=/bin/bash
clean:
@echo "Clean"
@./gradlew clean
build-aab:
@echo "Build AAB"
@./gradlew :app:bundleRelease --console verbose
build-apk:
@echo "Build APK"
@./gradlew assembleRelease --console verbose
compose-compiler-reports:
@echo ./gradlew assembleRelease -PcomposeCompilerReports=true
generate-proto:
@./gradlew generateDebugProto
# ==============
# Publishing
# ==============
VERSION := $(shell grep -Po '^version=\K.*' gradle.properties)
build-and-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 --console verbose
build-and-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
@./gradlew check
@$(MAKE) clean # Required as 'publishBundle' publishes all .aab's in specified archive dir
@git add .; git commit -m "$(VERSION)"; git push;
@$(MAKE) build-apk
@$(MAKE) create-gh-release
@$(MAKE) build-aab
@$(MAKE) publish-bundle
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
publish-bundle:
@echo "Publish Bundle"
@./gradlew publishBundle --track production --console verbose
publish-listing:
@./gradlew publishListing --console verbose