Skip to content

Commit

Permalink
Merge pull request karlsen-network#11 from Leon1777/dev
Browse files Browse the repository at this point in the history
Fix Deprecations, Wallet Updates and Build Improvements
  • Loading branch information
lemois-1337 authored Sep 1, 2024
2 parents 121b1b1 + ff93116 commit 802ddde
Show file tree
Hide file tree
Showing 251 changed files with 22,159 additions and 7,842 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build and upload assets

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: checkout code
uses: actions/checkout@v4

- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: stable

- name: set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'

- name: install dependencies
run: flutter pub get

- name: generate runtime code
run: dart run build_runner build --delete-conflicting-outputs

- name: build
run: flutter build apk

- name: rename output APK
run: |
mkdir bin
mv build/app/outputs/flutter-apk/app-release.apk bin/karlsen-mobile-${{ github.event.release.tag_name }}.apk
- name: Upload release assets
uses: softprops/action-gh-release@v2
with:
files: bin/*.apk
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
# Karlsen Mobile

Karlsen Mobile is a non-custodial wallet for the [Karlsen](https://karlsennetwork.com)
Karlsen Mobile is a non-custodial wallet for the [Karlsen](https://www.karlsencoin.com/)
BlockDAG, available for Android and iOS. It is written in
[Dart](https://dart.dev) using [Flutter](https://flutter.dev).

| Link | Description |
|:---------------------------------------------------------|:-------------------------|
| [mobile.karlsencoin.com](https://mobile.karlsencoin.com) | Karlsen Mobile Homepage |
| [karlsencoin.com](https://karlsencoin.com) | Karlsen Network Homepage |
| [karlsencoin.com](https://www.karlsencoin.com/) | Karlsen Network Homepage |

## Contributing

* Fork the repository and clone it to your local machine.
* Follow the instructions [here](https://flutter.io/docs/get-started/install)
to install the Flutter SDK
* Setup [Android Studio](https://flutter.io/docs/development/tools/android-studio)
or [Visual Studio Code](https://flutter.io/docs/development/tools/vs-code).
or [Visual Studio Code](https://flutter.io/docs/development/tools/vs-code)

## Building

Expand Down Expand Up @@ -61,18 +60,21 @@ protoc --dart_out="grpc:lib/karlsen/grpc" -I./proto messages.proto p2p.proto rpc
If you need to regenerate the runtime code, please do the following:

```bash
flutter pub run build_runner build --delete-conflicting-outputs
dart run build_runner build --delete-conflicting-outputs
```

## Translations

For some details regarding translations, have a look at
[Translations and translators](./TRANSLATORS.md).
[translations and translators](./TRANSLATORS.md).

## Have a question?
## Need Assistance?

If you need any help, feel free to [file a feature request or an issue](https://github.com/karlsen-network/karlsen-mobile/issues/new/choose)
if you do not manage to find a solution.
If you have any questions or need help, don't hesitate to [submit a feature request or report an issue](https://github.com/karlsen-network/karlsen-mobile/issues/new/choose). If you can't find a solution, we're here to assist you.

You’re also welcome to join our Discord server for additional support and community interaction.

[![Join the Karlsen Discord Server](https://img.shields.io/discord/1169939685280337930.svg?label=&logo=discord&logoColor=ffffff)](https://discord.gg/ZPZRvgMJDT)

## Screenshots

Expand Down
32 changes: 12 additions & 20 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
Expand All @@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) {
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
Expand All @@ -21,10 +22,6 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
Expand All @@ -36,8 +33,8 @@ android {
ndkVersion flutter.ndkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
Expand All @@ -49,12 +46,12 @@ android {
}

defaultConfig {
applicationId "io.karlsen.mobilewallet"
applicationId "karlsen.mobilewallet"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
//minSdkVersion flutter.minSdkVersion
minSdkVersion 26
targetSdkVersion flutter.targetSdkVersion
minSdkVersion 28
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand All @@ -78,9 +75,6 @@ android {
} else {
signingConfig signingConfigs.debug
}
ndk {
abiFilters 'armeabi-v7a','arm64-v8a','x86_64'
}
}
}
}
Expand All @@ -89,6 +83,4 @@ flutter {
source '../..'
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
dependencies {}
2 changes: 1 addition & 1 deletion android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.karlsen.mobilewallet">
package="karlsen.mobilewallet">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.karlsen.mobilewallet"
package="karlsen.mobilewallet"
android:installLocation="auto"
>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.karlsen.mobilewallet
package karlsen.mobilewallet

import io.flutter.embedding.android.FlutterFragmentActivity

Expand Down
2 changes: 1 addition & 1 deletion android/app/src/profile/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.karlsen.mobilewallet">
package="karlsen.mobilewallet">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
Expand Down
1 change: 1 addition & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ allprojects {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}

Expand Down
30 changes: 22 additions & 8 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
include ':app'
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()

def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.4.2" apply false
id "org.jetbrains.kotlin.android" version "1.8.20" apply false
}

include ":app"
Binary file modified fonts/Comfortaa-Bold.ttf
Binary file not shown.
Binary file modified fonts/Comfortaa-Light.ttf
Binary file not shown.
Binary file modified fonts/Comfortaa-Regular.ttf
Binary file not shown.
Binary file modified fonts/OverpassMono-Light.ttf
Binary file not shown.
Binary file modified fonts/OverpassMono-Regular.ttf
Binary file not shown.
Binary file added fonts/RobotoMono-Light.ttf
Binary file not shown.
Binary file added fonts/RobotoMono-Regular.ttf
Binary file not shown.
2 changes: 1 addition & 1 deletion ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>11.0</string>
<string>12.0</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
platform :ios, '11.0'
platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
20 changes: 10 additions & 10 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -342,7 +342,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand All @@ -361,14 +361,14 @@
DEVELOPMENT_TEAM = R6NQ62JHK3;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "Karlsen Mobile";
INFOPLIST_KEY_CFBundleDisplayName = Karlsen Mobile;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.finance";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = "$(FLUTTER_BUILD_NAME)";
PRODUCT_BUNDLE_IDENTIFIER = io.karlsen.mobilewallet;
PRODUCT_BUNDLE_IDENTIFIER = karlsen.mobilewallet;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
Expand Down Expand Up @@ -423,7 +423,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -472,7 +472,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand All @@ -493,14 +493,14 @@
DEVELOPMENT_TEAM = R6NQ62JHK3;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "Karlsen Mobile";
INFOPLIST_KEY_CFBundleDisplayName = Karlsen Mobile;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.finance";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = "$(FLUTTER_BUILD_NAME)";
PRODUCT_BUNDLE_IDENTIFIER = io.karlsen.mobilewallet;
PRODUCT_BUNDLE_IDENTIFIER = karlsen.mobilewallet;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand All @@ -519,14 +519,14 @@
DEVELOPMENT_TEAM = R6NQ62JHK3;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "Karlsen Mobile";
INFOPLIST_KEY_CFBundleDisplayName = Karlsen Mobile;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.finance";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = "$(FLUTTER_BUILD_NAME)";
PRODUCT_BUNDLE_IDENTIFIER = io.karlsen.mobilewallet;
PRODUCT_BUNDLE_IDENTIFIER = karlsen.mobilewallet;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
10 changes: 6 additions & 4 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@
<string>ru</string>
<string>sl</string>
<string>sq</string>
<string>sr</string>
<string>sv</string>
<string>te</string>
<string>tl</string>
<string>tr</string>
<string>uk</string>
Expand All @@ -85,7 +87,7 @@
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>io.karlsen.mobilewallet</string>
<string>karlsen.mobilewallet</string>
<key>CFBundleURLSchemes</key>
<array>
<string>karlsen</string>
Expand All @@ -95,7 +97,7 @@
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>io.karlsen.mobilewallet</string>
<string>karlsen.mobilewallet</string>
<key>CFBundleURLSchemes</key>
<array>
<string>karlsentest</string>
Expand All @@ -105,7 +107,7 @@
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>io.karlsen.mobilewallet</string>
<string>karlsen.mobilewallet</string>
<key>CFBundleURLSchemes</key>
<array>
<string>karlsendev</string>
Expand All @@ -115,7 +117,7 @@
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>io.karlsen.mobilewallet</string>
<string>karlsen.mobilewallet</string>
<key>CFBundleURLSchemes</key>
<array>
<string>karlsensim</string>
Expand Down
Loading

0 comments on commit 802ddde

Please sign in to comment.