Skip to content

Commit

Permalink
fix building with haven
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarHatem28 committed Nov 25, 2024
1 parent 8ceaa01 commit 83cfc7d
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 6 deletions.
18 changes: 15 additions & 3 deletions cw_haven/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ group 'com.cakewallet.cw_haven'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.7.10'
ext.kotlin_version = '2.0.21'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
classpath 'com.android.tools.build:gradle:8.7.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -25,8 +25,20 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 28
compileSdkVersion 33

if (project.android.hasProperty("namespace")) {
namespace 'com.cakewallet.cw_haven'
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = '17'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
Expand Down
15 changes: 14 additions & 1 deletion cw_shared_external/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,20 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 30
compileSdkVersion 33

if (project.android.hasProperty("namespace")) {
namespace 'com.cakewallet.cw_shared_external'
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = '17'
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand Down
1 change: 1 addition & 0 deletions linux/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
)

list(APPEND FLUTTER_FFI_PLUGIN_LIST
sp_scanner
)

set(PLUGIN_BUNDLED_LIBRARIES)
Expand Down
2 changes: 2 additions & 0 deletions macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import FlutterMacOS
import Foundation

import connectivity_plus
import cw_mweb
import device_info_plus
import devicelocale
import fast_scanner
Expand All @@ -23,6 +24,7 @@ import wakelock_plus

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin"))
CwMwebPlugin.register(with: registry.registrar(forPlugin: "CwMwebPlugin"))
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
DevicelocalePlugin.register(with: registry.registrar(forPlugin: "DevicelocalePlugin"))
MobileScannerPlugin.register(with: registry.registrar(forPlugin: "MobileScannerPlugin"))
Expand Down
2 changes: 1 addition & 1 deletion pubspec_base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies:
share_plus: ^10.0.0
# date_range_picker: ^1.0.6
#https://api.flutter.dev/flutter/material/showDateRangePicker.html
dio: ^4.0.6
dio: ^5.7.0
hive: ^2.2.3
hive_flutter: ^1.1.0
local_auth_android: ^1.0.46
Expand Down
2 changes: 1 addition & 1 deletion scripts/android/inject_app_details.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ if [ -z "$APP_ANDROID_TYPE" ]; then
fi

cd ../..
set -x
universal_sed "1,/version:/ {s/version:.*/version: ${APP_ANDROID_VERSION}+${APP_ANDROID_BUILD_NUMBER}/;}" ./pubspec.yaml
universal_sed "1,/version:/ {s/__APP_PACKAGE__/${APP_ANDROID_PACKAGE}/;}" ./android/app/src/main/AndroidManifest.xml
universal_sed "1,/__APP_SCHEME__/ {s/__APP_SCHEME__/${APP_ANDROID_SCHEME}/;}" ./android/app/src/main/AndroidManifest.xml
universal_sed "1,/version:/ {s/__versionCode__/${APP_ANDROID_BUILD_NUMBER}/;}" ./android/app/src/main/AndroidManifest.xml
universal_sed "1,/version:/ {s/__versionName__/${APP_ANDROID_VERSION}/;}" ./android/app/src/main/AndroidManifest.xml

cd scripts/android
1 change: 1 addition & 0 deletions windows/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
)

list(APPEND FLUTTER_FFI_PLUGIN_LIST
sp_scanner
)

set(PLUGIN_BUNDLED_LIBRARIES)
Expand Down

0 comments on commit 83cfc7d

Please sign in to comment.