-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove the phoenix-legacy module (#671)
This commits removes the old 1.x Android legacy code, which was using the eclair-core Scala library. This version has been deprecated 18 months ago and all legacy channels have now been closed. This includes code that was added in the modern android app to manage the switch to the legacy app, as well as the migration. Gone as well is the special init TLV sent to the peer to check for legacy channels.
- Loading branch information
Showing
413 changed files
with
130 additions
and
479,096 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
# Building | ||
|
||
This document explains how to build Phoenix for iOS or for Android. Phoenix is a [Kotlin Multiplatform Mobile](https://kotlinlang.org/docs/mobile/home.html) application. It can run on many different platforms, including mobile devices (iOS and Android). | ||
|
||
Note: that the legacy Android app is now a library within a new Android app. To build the old versions of this app, checkout one of the `android-legacy-vXX` tags, and follow the build instructions. | ||
This document explains how to build Phoenix for iOS or for Android. | ||
|
||
## Requirements | ||
|
||
|
@@ -12,9 +10,11 @@ You'll need to install the following: | |
|
||
## Build lightning-kmp | ||
|
||
Phoenix is an actual lightning node running on your phone. It contains much of the bitcoin/lightning protocol. For that, Phoenix relies on the [lightning-kmp](https://github.com/ACINQ/lightning-kmp) library. Tags of this library are released on public maven repository, but this repository may from time to time use a SNAPSHOT development version. | ||
Phoenix is an actual lightning node running on your phone. It contains much of the bitcoin/lightning protocol, contained in the [lightning-kmp](https://github.com/ACINQ/lightning-kmp) library, also developed by ACINQ. | ||
|
||
Tags of the lightning-kmp library are released on public Maven repository, so you'll likely not have to build it yourself. | ||
|
||
When that happens, you will have to build this library yourself on your local machine. To do that, follow those [instructions](https://github.com/ACINQ/lightning-kmp/blob/master/BUILD.md). | ||
However, from time to time, Phoenix uses a SNAPSHOT development version of lightning-kmp. When that happens, you will have to build this library yourself on your local machine. To do that, follow [the lightning-kmp build instructions](https://github.com/ACINQ/lightning-kmp/blob/master/BUILD.md). | ||
|
||
## Build the application | ||
|
||
|
@@ -25,39 +25,16 @@ git clone [email protected]:ACINQ/phoenix.git | |
cd phoenix | ||
``` | ||
|
||
### The `phoenix-legacy` module | ||
|
||
This module contains an older version of the Android application. This version is now an AAR, that is a Android library (and not a standalone application). It is embedded within the new `phoenix-android` app and must be built if you want to run the Android application. | ||
|
||
Follow [those instructions](https://github.com/ACINQ/phoenix/blob/master/phoenix-legacy/BUILD.md) to build the legacy app. | ||
|
||
Note: | ||
- in the future, the legacy app code will be removed and the modern Android app won't have this dependency anymore. | ||
- iOS developers who don't need the Android app and wish to save time can do so by [skipping the Android app altogether](#skipping-the-android-app). | ||
|
||
### The `phoenix-shared` module | ||
|
||
This module is where [Kotlin Multiplatform Mobile](https://kotlinlang.org/docs/mobile/home.html) is used. The code written in Kotlin is shared between the Android and the iOS application. It contains common logic, such as the database queries, or the MVI controllers. Development on this module should be done with Android Studio. | ||
Like the lightning-kmp library, Phoenix shares some logic between the Android and the iOS application, thanks to [Kotlin Multiplatform](https://www.jetbrains.com/kotlin-multiplatform/). This includes database queries, or the some view controllers, and more (but not the UI!). The `phoenix-shared` module is where this cross-platform code is contained. | ||
|
||
You do not need to run a command to build this module. It will be built automatically whether you're building the Android or the iOS app: | ||
|
||
- the `phoenix-android` module has a direct gradle dependency to this module, so Android Studio will build it automatically when building the Android app. | ||
|
||
- when building the iOS app, XCode will automatically call this command: | ||
|
||
``` | ||
./gradlew :phoenix-shared:packForXCode -PXCODE_CONFIGURATION=Debug -PXCODE_PLATFORM_NAME=iphoneos -PskipAndroid=true | ||
``` | ||
Development on this module should be done with Android Studio. | ||
|
||
which will generate the required phoenix-ios-framework used by iOS. | ||
This module will be built automatically when you build the Android or the iOS app: | ||
|
||
### Skipping the Android app | ||
|
||
If you are only interested in the iOS application, create a `local.properties` file at the root of the project, and add the following line: | ||
|
||
``` | ||
skip.android=true | ||
``` | ||
- on Android, because the `phoenix-android` module has a direct gradle dependency to this module; | ||
- on iOS, because a build phase in iOS is set up to build a `PhoenixShared.framework` whenever needed. | ||
|
||
### Building the iOS app | ||
|
||
|
@@ -69,6 +46,12 @@ If the project builds successfully, you can then run it on a device or an emulat | |
|
||
Open the entire phoenix project in Android Studio, then build the `phoenix-android` application. | ||
|
||
If you are only interested in building the iOS application, create a `local.properties` file at the root of the project, and add the following line: | ||
|
||
``` | ||
skip.android=true | ||
``` | ||
|
||
## Troubleshooting | ||
|
||
### Lightning-kmp versions | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
repositories { | ||
jcenter() | ||
mavenCentral() | ||
} | ||
plugins { | ||
`kotlin-dsl` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.