Skip to content

Commit

Permalink
add(lndmobile): add lndmobile in to sdk.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhangguiguang committed Nov 10, 2024
1 parent ec59c95 commit 834e995
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@ pkgDmens=${moduleDmens}/dmens
moduleRune=github.com/coming-chat/go-runes-api
pkgRune=${moduleRune}/rune

pkgAll = ${pkgWalletSDK} ${pkgDefi} ${pkgAptosClient} ${pkgRedpacket} ${pkgDmens} ${pkgRune}
# Lnd mobile
moduleLnd=github.com/lightningnetwork/lnd
pkgLndmobile=${moduleLnd}/mobile
lndDevTag=dev
lndRpcTags=autopilotrpc chainrpc invoicesrpc neutrinorpc peersrpc routerrpc signrpc verrpc walletrpc watchtowerrpc wtclientrpc

pkgAll = ${pkgWalletSDK} ${pkgDefi} ${pkgAptosClient} ${pkgRedpacket} ${pkgDmens} ${pkgRune} ${pkgLndmobile}

iosSdkName=Wallet
andSdkName=wallet
Expand All @@ -55,9 +61,9 @@ BuilderRefer=https://github.com/coming-chat/app-sdk-build/commit/$(BuilderHash)

buildAllSDKAndroid:
ifndef t
gomobile bind -ldflags "-s -w" -v -target=android/arm,android/arm64,android/amd64 -o=${outdir}/${andSdkName}.aar ${pkgAll}
gomobile bind -tags="mobile ${lndDevTag} ${lndRpcTags}" -ldflags "-s -w" -v -target=android/arm,android/arm64,android/amd64 -o=${outdir}/${andSdkName}.aar ${pkgAll}
else
docker run --net=host ${PWD}:/module -v ${HOME}/.gitconfig:/root/.gitconfig -v ${HOME}/.ssh:/root/.ssh --entrypoint /bin/sh makeworld/gomobile-android -c 'export GOPRIVATE=github.com/coming-chat/go-defi-sdk && export GOPROXY=https://goproxy.cn && go mod download && gomobile bind -ldflags "-s -w" -target=android/arm,android/arm64 -o=${outdir}/${andSdkName}.aar ${pkgAll}'
docker run --net=host ${PWD}:/module -v ${HOME}/.gitconfig:/root/.gitconfig -v ${HOME}/.ssh:/root/.ssh --entrypoint /bin/sh makeworld/gomobile-android -c 'export GOPRIVATE=github.com/coming-chat/go-defi-sdk && export GOPROXY=https://goproxy.cn && go mod download && gomobile bind -tags="mobile ${lndDevTag} ${lndRpcTags}" -ldflags "-s -w" -target=android/arm,android/arm64 -o=${outdir}/${andSdkName}.aar ${pkgAll}'
endif

androidReposity=${outdir}/wallet-sdk-android
Expand Down Expand Up @@ -88,7 +94,7 @@ endif
#### IOS build

buildAllSDKIOS:
GOOS=ios gomobile bind -ldflags "-s -w" -v -target=ios/arm64 -o=${outdir}/${iosSdkName}.xcframework ${pkgAll}
GOOS=ios gomobile bind -tags="mobile ${lndDevTag} ${lndRpcTags}" -ldflags "-s -w" -v -target=ios/arm64 -o=${outdir}/${iosSdkName}.xcframework ${pkgAll}

iosPackageName=${iosSdkName}.xcframework
iosReposity=${outdir}/Wallet-iOS
Expand Down

0 comments on commit 834e995

Please sign in to comment.