-
Notifications
You must be signed in to change notification settings - Fork 19
/
Makefile
50 lines (43 loc) · 1.37 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
.PHONY: clean build-debug build-release \
publish-snapshot-to-local-maven \
publish-snapshot-to-local-nexus
GRADLE = ./gradlew
clean:
-rm -rf build
$(GRADLE) clean
build-debug:
$(GRADLE) assembleDebug
build-release:
$(GRADLE) \
-PsqlcipherAndroidVersion="$(SQLCIPHER_ANDROID_VERSION)" \
assembleRelease
publish-snapshot-to-local-maven:
@ $(collect-signing-info) \
$(GRADLE) \
-PpublishSnapshot=true \
-Psigning.keyId="$$gpgKeyId" \
-Psigning.secretKeyRingFile="$$gpgKeyRingFile" \
-Psigning.password="$$gpgPassword" \
publishReleasePublicationToMavenLocal
publish-remote-release:
@ $(collect-signing-info) \
$(collect-nexus-info) \
$(GRADLE) \
-PpublishSnapshot=false \
-PpublishLocal=false \
-PdebugBuild=false \
-PsigningKeyId="$$gpgKeyId" \
-PsigningKeyRingFile="$$gpgKeyRingFile" \
-PsigningKeyPassword="$$gpgPassword" \
-PnexusUsername="$$nexusUsername" \
-PnexusPassword="$$nexusPassword" \
-PsqlcipherAndroidVersion="$(SQLCIPHER_ANDROID_VERSION)" \
sqlcipher:publish
collect-signing-info := \
read -p "Enter GPG signing key id:" gpgKeyId; \
read -p "Enter full path to GPG keyring file \
(possibly ${HOME}/.gnupg/secring.gpg)" gpgKeyRingFile; stty -echo; \
read -p "Enter GPG password:" gpgPassword; stty echo;
collect-nexus-info := \
read -p "Enter Nexus username:" nexusUsername; \
stty -echo; read -p "Enter Nexus password:" nexusPassword; stty echo;