forked from lightsail-network/java-stellar-sdk
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
38 lines (32 loc) · 1.24 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
# XDR files from https://github.com/stellar/stellar-xdr
XDRS = xdr/Stellar-SCP.x \
xdr/Stellar-ledger-entries.x \
xdr/Stellar-ledger.x \
xdr/Stellar-overlay.x \
xdr/Stellar-transaction.x \
xdr/Stellar-types.x \
xdr/Stellar-contract-env-meta.x \
xdr/Stellar-contract-meta.x \
xdr/Stellar-contract-spec.x \
xdr/Stellar-contract.x \
xdr/Stellar-internal.x \
xdr/Stellar-contract-config-setting.x
XDRGEN_COMMIT=7c9349c62844e376bc637be678695387e88d125f # xdrgen commit to use, see https://github.com/stellar/xdrgen
XDRNEXT_COMMIT=6a620d160aab22609c982d54578ff6a63bfcdc01 # stellar-xdr commit to use, see https://github.com/stellar/stellar-xdr
.PHONY: xdr xdr-clean xdr-update
xdr-generate: $(XDRS)
docker run -it --rm -v $$PWD:/wd -w /wd ruby /bin/bash -c '\
gem install specific_install -v 0.3.8 && \
gem specific_install https://github.com/stellar/xdrgen.git -b $(XDRGEN_COMMIT) && \
xdrgen \
--language java \
--namespace org.stellar.sdk.xdr \
--output src/main/java/org/stellar/sdk/xdr/ \
$(XDRS)'
./gradlew :spotlessApply
xdr/%.x:
curl -Lsf -o $@ https://raw.githubusercontent.com/stellar/stellar-xdr/$(XDRNEXT_COMMIT)/$(@F)
xdr-clean:
rm xdr/*.x || true
rm src/main/java/org/stellar/sdk/xdr/*.java || true
xdr-update: xdr-clean xdr-generate