Files
simon 6090038638 GO 3.0 v0.0.7: live chat catch-up, Hub push, Reticulum status.
Checkpoint before merging upstream Hub v3.0.1.
2026-08-19 13:03:15 +00:00

130 lines
5.4 KiB
Groovy

apply plugin: 'com.android.application'
apply plugin: 'org.jetbrains.kotlin.android'
apply plugin: 'com.chaquo.python'
android {
namespace "com.github.Qortal.qortalMobile"
compileSdk rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "com.github.Qortal.qortalGo2"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
// Published to QDN under the "GO 3.0" name as "GO 3.0 v<versionName>.apk".
// The in-app updater reads the version out of that filename and compares
// it with versionName here, and Android refuses an install whose
// versionCode is not higher — so both go up with every published build.
versionCode 10
versionName "0.0.7"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// Chaquopy ships the CPython interpreter as native code, so the app must
// declare which ABIs to package. arm64 = real devices, x86_64 = emulator.
ndk {
abiFilters "arm64-v8a", "x86_64"
}
// Qortino Offline Agent: llama.cpp JNI (GGUF inference).
externalNativeBuild {
cmake {
cppFlags "-O3 -DNDEBUG -fvisibility=hidden"
arguments "-DANDROID_STL=c++_shared",
"-DBUILD_SHARED_LIBS=OFF",
"-DGGML_OPENMP=OFF",
"-DGGML_LLAMAFILE=OFF"
}
}
}
ndkVersion "27.2.12479018"
externalNativeBuild {
cmake {
path "src/main/cpp/CMakeLists.txt"
version "3.22.1"
}
}
// Python presence/transport bridge (Reticulum). Python 3.13 is the sweet
// spot: Chaquopy ships cryptography/pynacl wheels for it AND it supports
// 16 KB-page devices (Android 15+).
chaquopy {
defaultConfig {
version "3.13"
pip {
// RNS itself is vendored from the Qortal Reticulum fork
// (src/main/python/RNS) so the on-wire protocol matches the
// live Qortal mesh exactly. Only its native/runtime deps come
// from pip: cryptography is a Chaquopy prebuilt wheel; pyserial
// is pure-python (serial interfaces are unused on Android).
install "cryptography"
install "pyserial"
}
}
}
androidResources {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
// Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
}
buildFeatures {
buildConfig true
}
kotlinOptions {
jvmTarget = '17'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
repositories {
flatDir{
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
implementation project(':capacitor-android')
implementation 'androidx.biometric:biometric:1.1.0'
implementation "org.mindrot:jbcrypt:0.4"
implementation "at.favre.lib:bcrypt:0.10.2"
implementation 'com.password4j:password4j:1.8.2'
implementation 'com.dylibso.chicory:runtime:1.0.0-M1'
implementation 'commons-net:commons-net:3.6'
implementation 'org.bouncycastle:bcprov-jdk15to18:1.76'
implementation 'com.google.guava:guava:32.1.2-jre'
implementation 'org.nanohttpd:nanohttpd:2.3.1'
implementation 'com.google.android.gms:play-services-cast-framework:21.4.0'
implementation 'androidx.mediarouter:mediarouter:1.6.0'
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0'
// Open-source MediaCodec transcoder for Quitter (DeepMedia / formerly otaliastudios).
// No Google Media3 / Play Services — local hardware encode only.
implementation 'io.deepmedia.community:transcoder-android:0.11.2'
// Native Reticulum transport (Kotlin/JVM RNS stack + Android foreground service).
// BouncyCastle is excluded to avoid duplicate classes with the app's existing
// bcprov-jdk15to18:1.76 (reticulum-kt pulls bcprov 1.77).
implementation('com.github.torlando-tech.reticulum-kt:rns-android:0.1.0-SNAPSHOT') {
exclude group: 'org.bouncycastle'
}
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
implementation project(':capacitor-cordova-android-plugins')
}
apply from: 'capacitor.build.gradle'
try {
def servicesJSON = file('google-services.json')
if (servicesJSON.text) {
apply plugin: 'com.google.gms.google-services'
}
} catch(Exception e) {
logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
}