clightning4j / lamp

c-Lightning Android Mobile Porting
MIT License
20 stars 10 forks source link

Build iinstructions and self-hosted backend #1

Closed darosior closed 4 years ago

darosior commented 4 years ago

Hi,

I'm eager to test this but have unfortunately no experience building Android Java projects. Could you add the build instructions please ?

I'd also like to make it hit my own Esplora instance, is there an option ?

lvaccaro commented 4 years ago

Yes, of course. For Android, my suggestion is to use Android Studio.

In the hard way, the build command to run in the root of the project is:

./gradlew clean build

You could find the unsigned apk at: app/build/outputs/apk/release/app-release-unsigned.apk to push on the device.

For esplora parameters, you could take a look at the startup lightningd options https://github.com/lvaccaro/lamp/blob/a615d3341420cdb0f91ec4fea76ad611ef66825a/app/src/main/java/com/lvaccaro/lamp/Services/LightningService.kt#L66 More or less they are:

--disable-plugin=bcli
--esplora-cainfo=cacert.pem
--blockchair-api-endpoint=https://api.blockchair.com/bitcoin/testnet
--esplora-api-endpoint=https://blockstream.info/testnet/api
darosior commented 4 years ago

Thanks! Looks like I'm missing the Android SDK, which one should I take and where ?

lvaccaro commented 4 years ago

Android Studio includes the sdk, otherwise in the same page at section "Command line tools only" you can download the sdkmanager to fetch build tools and sdk, the project is currently using api 28 as targetSdkVersion

darosior commented 4 years ago

Thank you !

darosior commented 4 years ago

Built using Android studio as you suggested :tada:

$ ls app/build/outputs/apk/debug/app-debug.apk 
app/build/outputs/apk/debug/app-debug.apk

Closing.