Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
MONERO_C_TAG=v0.18.4.0-RC7
COIN=monero
MONERO_C_TAG=218e34c4ad7aaa3ef01ac1e869999c309588502b
COIN=monero
2 changes: 1 addition & 1 deletion .fvmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"flutter": "3.32.0"
"flutter": "3.41.2"
}
78 changes: 40 additions & 38 deletions .github/workflows/build_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,43 @@ run-name: Build cupcake for supported targets
on: [push]

jobs:
app_android:
runs-on: ubuntu-latest
env:
ANDROID_NDK_VERSION: 28.2.13676358
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- uses: kuhnroyal/flutter-fvm-config-action@v2
id: fvm-config-action
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- name: Git submodule update
run: |
git submodule update --init --recursive
- name: Build monero_c
run: |
make libs_android_download
- name: Flutter pub get
run: |
flutter pub get
- name: Prepare dev
run: make prepare_dev
- name: Build apk
run: |
flutter build apk --profile
- name: Upload lib
uses: actions/upload-artifact@v4
with:
name: android apk
path: build/app/outputs/flutter-apk/*.apk
app_android:
runs-on: ubuntu-latest
env:
ANDROID_NDK_VERSION: 28.2.13676358
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- uses: kuhnroyal/flutter-fvm-config-action@v2
id: fvm-config-action
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
- uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "17"
- name: Git submodule update
run: |
git submodule update --init --recursive
- name: Build monero_c
run: |
git config --global user.email "builds@cakewallet.com"
git config --global user.name "cakewallet CI"
make libs_android_build_ci
- name: Flutter pub get
run: |
flutter pub get
- name: Prepare dev
run: make prepare_dev
- name: Build apk
run: |
flutter build apk --profile
- name: Upload lib
uses: actions/upload-artifact@v4
with:
name: android apk
path: build/app/outputs/flutter-apk/*.apk
21 changes: 13 additions & 8 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
format:
runs-on: ubuntu-latest
env:
ANDROID_NDK_VERSION: 28.2.13676358
ANDROID_NDK_VERSION: 28.2.13676358
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -20,14 +20,19 @@ jobs:
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
distribution: "zulu"
java-version: "17"
- name: Git submodule update
run: |
git submodule update --init --recursive
- name: Build monero_c
run: |
make libs_android_download
source .env
mkdir -p ${PWD}/.cache/monero_c/
cd ${PWD}/.cache/monero_c/
git clone https://github.com/mrcyjanek/monero_c ${MONERO_C_TAG}
cd ${MONERO_C_TAG}
git checkout ${MONERO_C_TAG}

- name: Flutter pub get
run: |
Expand All @@ -36,9 +41,9 @@ jobs:
run: ./.tooling/format.sh
- name: check if git tree is clean
run: |
if [ -z "$(git status --porcelain)" ]; then
if [ -z "$(git status --porcelain)" ]; then
exit 0
else
else
git status --porcelain
exit 1
fi
Expand All @@ -50,6 +55,6 @@ jobs:
exit 0
else
echo "There are missing translations:"
cat missing_translations.txt
cat missing_translations.txt
exit 1
fi
fi
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,6 @@ missing_translations.txt

# FVM Version Cache
.fvm/
*.g.dart
*.g.dart

android/.kotlin/sessions/*.salive
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"dart.flutterSdkPath": ".fvm/versions/3.32.0"
"dart.flutterSdkPath": ".fvm/versions/3.41.2"
}
17 changes: 7 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
include .env
UNAME := $(shell uname)

all: libs_android_build libs_ios_build prepare_dev

init:
git submodule update --init --recursive

libs_android_download: mwebd_android
./build_moneroc.sh --prebuild --coin ${COIN} --tag ${MONERO_C_TAG} --triplet x86_64-linux-android --location android/app/src/main/jniLibs/x86_64
./build_moneroc.sh --prebuild --coin ${COIN} --tag ${MONERO_C_TAG} --triplet aarch64-linux-android --location android/app/src/main/jniLibs/arm64-v8a
./build_moneroc.sh --prebuild --coin ${COIN} --tag ${MONERO_C_TAG} --triplet armv7a-linux-androideabi --location android/app/src/main/jniLibs/armeabi-v7a

libs_android_build: mwebd_android
ifneq ($(UNAME), Linux)
echo Only Linux hosts can build for android, try $(MAKE) libs_android_download
exit 1
endif
./build_moneroc.sh --coin ${COIN} --tag ${MONERO_C_TAG} --triplet x86_64-linux-android --location android/app/src/main/jniLibs/x86_64
./build_moneroc.sh --coin ${COIN} --tag ${MONERO_C_TAG} --triplet aarch64-linux-android --location android/app/src/main/jniLibs/arm64-v8a
./build_moneroc.sh --coin ${COIN} --tag ${MONERO_C_TAG} --triplet armv7a-linux-androideabi --location android/app/src/main/jniLibs/armeabi-v7a
Expand All @@ -20,16 +21,12 @@ libs_android_build_ci: mwebd_android

libs_ios_download: mwebd_ios
./build_moneroc.sh --prebuild --coin ${COIN} --tag ${MONERO_C_TAG} --triplet aarch64-apple-ios --location ios/native_libs/ios-arm64
./build_moneroc.sh --prebuild --coin ${COIN} --tag ${MONERO_C_TAG} --triplet aarch64-apple-iossimulator --location ios/native_libs/ios-arm64-simulator
./build_moneroc.sh --prebuild --coin ${COIN} --tag ${MONERO_C_TAG} --triplet aarch64-apple-ios-simulator --location ios/native_libs/ios-arm64-simulator
cd ios && ./gen_framework.sh

libs_ios_build: mwebd_ios
ifneq ($(UNAME), Darwin)
echo Only Darwin hosts can build for iOS, try $(MAKE) libs_ios_download
exit 1
endif
./build_moneroc.sh --coin ${COIN} --tag ${MONERO_C_TAG} --triplet aarch64-apple-ios --location ios/native_libs/ios-arm64
./build_moneroc.sh --coin ${COIN} --tag ${MONERO_C_TAG} --triplet aarch64-apple-iossimulator --location ios/native_libs/ios-arm64-simulator
./build_moneroc.sh --coin ${COIN} --tag ${MONERO_C_TAG} --triplet aarch64-apple-ios-simulator --location ios/native_libs/ios-arm64-simulator
cd ios && ./gen_framework.sh

cupcake_android:
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
To build:

```bash
$ make libs_android_build # or libs_android_download, libs_ios_build, libs_ios_download
$ make prepare_dev # load dev signing key (not required on iOS)
$ make init # fetch the submodules
$ make all # or libs_android_build, libs_android_download, libs_ios_build, libs_ios_download
$ make prepare_dev # not needed if ran `make all`
$ make cupcake_android # or cupcake_ios
```

Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ android {
applicationId "com.cakewallet.cupcake"
// 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 23
targetSdkVersion 35
minSdkVersion flutter.minSdkVersion
targetSdkVersion 36
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand Down
3 changes: 2 additions & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
org.gradle.jvmargs=-Xmx4G
org.gradle.jvmargs=-Xmx6G
android.useAndroidX=true
android.enableJetifier=true
android.ndk.suppressMinSdkVersionError=21
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
2 changes: 1 addition & 1 deletion android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pluginManagement {

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version '8.8.0' apply false
id "com.android.application" version '8.9.1' apply false
id "org.jetbrains.kotlin.android" version "2.0.21" apply false
}

Expand Down
22 changes: 11 additions & 11 deletions build_moneroc.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

# Script designed to build (or download) monero_c
# usage:
# ./build_moneroc.sh
# usage:
# ./build_moneroc.sh
# --prebuild - allow downloads of prebuilds
# --coin - monero/wownero
# --tag v0.18.3.3-RC45 - which tag to build / download
Expand Down Expand Up @@ -91,14 +91,14 @@ then
do
asset_basename=$(urldecode $(basename $release_url) | tr -d '\r' | xargs)
if [[ "$asset_basename" == ${ARG_COIN}_${ARG_TRIPLET}* ]];
then
then
if [[ "$asset_basename" == *libwallet2_api_c* ]];
then
curl -L "$release_url" > "$ARG_LOCATION/$lib_name_prefix${asset_basename/${ARG_TRIPLET}_/}"
unxz -f "$ARG_LOCATION/$lib_name_prefix${asset_basename/${ARG_TRIPLET}_/}"
unxz -f "$ARG_LOCATION/$lib_name_prefix${asset_basename/${ARG_TRIPLET}_/}" || true
else
curl -L "$release_url" > "$ARG_LOCATION/${asset_basename/${ARG_COIN}_${ARG_TRIPLET}_/}"
unxz -f "$ARG_LOCATION/${asset_basename/${ARG_COIN}_${ARG_TRIPLET}_/}"
unxz -f "$ARG_LOCATION/${asset_basename/${ARG_COIN}_${ARG_TRIPLET}_/}" || true
fi
fi
done
Expand All @@ -120,23 +120,23 @@ else
fi
COPIED=""

if ! ls ${BUILD_DIR}/release/${ARG_COIN}/${ARG_TRIPLET}_libwallet2_api_c*.xz
if ! ls ${BUILD_DIR}/release/${ARG_COIN}/${ARG_TRIPLET}_libwallet2_api_c*
then
pushd "$BUILD_DIR"
./build_single.sh ${ARG_COIN} ${ARG_TRIPLET} -j$(nproc)
env -i PATH="$PATH" HOME="$HOME" ./build_single.sh ${ARG_COIN} ${ARG_TRIPLET} -j$(nproc)
popd
fi

for release in ${BUILD_DIR}/release/${ARG_COIN}/${ARG_TRIPLET}_*.xz;
for release in ${BUILD_DIR}/release/${ARG_COIN}/${ARG_TRIPLET}_*;
do
asset_basename="$(basename $release)"
if [[ "$asset_basename" == *libwallet2_api_c* ]];
then
cp "$release" "$ARG_LOCATION/$lib_name_prefix${ARG_COIN}_${asset_basename/${ARG_TRIPLET}_/}"
unxz -f "$ARG_LOCATION/$lib_name_prefix${ARG_COIN}_${asset_basename/${ARG_TRIPLET}_/}"
unxz -f "$ARG_LOCATION/$lib_name_prefix${ARG_COIN}_${asset_basename/${ARG_TRIPLET}_/}" || true
else
cp "$release" "$ARG_LOCATION/${asset_basename/${ARG_TRIPLET}_/}"
unxz -f "$ARG_LOCATION/${asset_basename/${ARG_TRIPLET}_/}"
unxz -f "$ARG_LOCATION/${asset_basename/${ARG_TRIPLET}_/}" || true
fi
done
fi
fi
2 changes: 1 addition & 1 deletion external/cake_wallet
Submodule cake_wallet updated 468 files
2 changes: 0 additions & 2 deletions ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,5 @@
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<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, '12.0'
# platform :ios, '13.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
Loading
Loading