forked from WikiDeck/wikideck
- Capacitor deps (core, cli, android, ios, app, browser); additive lockfile
regenerated with npm 11 (node:24) so libc fields are kept.
- capacitor.config.ts: webDir dist, CapacitorHttp on (native fetch: no CORS,
no WebView Origin header for the node's POST origin check), cleartext for
the LAN testnet, edge-to-edge margins on Android 15.
- android/: generated project + SSO deep link (dev.eom.wikideck:), cleartext,
adjustResize for the keyboard; build-debug.sh builds against the testnet.
- src/native.ts: isNativeApp(), VITE_NODE_URL (default testnet node) applied to
relative /api and /auth fetches, sets WIKIDECK_NODE_URL for src/auth, fixes
the interceptor's merged content-length header, back button closes dialogs
first, onDeepLink() for the SSO redirect. No-op on the web.
- App.tsx: one import + hidden={isNativeApp()} on the mining panel.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
55 lines
2.1 KiB
Groovy
55 lines
2.1 KiB
Groovy
apply plugin: 'com.android.application'
|
|
|
|
android {
|
|
namespace "dev.eom.wikideck"
|
|
compileSdk rootProject.ext.compileSdkVersion
|
|
defaultConfig {
|
|
applicationId "dev.eom.wikideck"
|
|
minSdkVersion rootProject.ext.minSdkVersion
|
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
|
versionCode 1
|
|
versionName "1.0"
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
aaptOptions {
|
|
// 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:!*~'
|
|
}
|
|
}
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.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')
|
|
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")
|
|
}
|