App Configuration (Android)
Jasonelle controls application settings and plugin registration through config.jsonc.
Overview
The build pipeline merges lib/common/config/config.jsonc with lib/android/config/config.jsonc.
The merged output is written to build/android/config/config.jsonc.
Downstream tools use this file to configure the Android project and copy plugins.
Run the following command to merge the configuration files:
task jsonc.android
File Locations
-
lib/common/config/config.jsonc: Baseline application settings and plugins. -
lib/android/config/config.jsonc: Android specific settings and overrides. -
build/android/config/config.jsonc: Merged file consumed by the build pipeline.
Common Configuration (lib/common/config/config.jsonc)
The lib/common/config/config.jsonc file defines common application settings across platforms.
Configuration Properties
| Property | Type | Description |
|---|---|---|
|
String |
The initial URL loaded inside the main web view. |
|
String |
The application identifier (for example, |
|
String |
The application display name shown below the launcher icon. |
|
String |
The base application version (for example, |
|
Boolean |
Enables remote web debugging through Chrome DevTools. |
|
Array of Strings |
Allowed domain hostnames for internal navigation. |
|
Object |
Map of registered plugins and their source locations. |
Domain Whitelist (allowed)
The allowed array controls web view navigation:
-
When empty or omitted, all URLs open inside the main web view.
-
When domains are present, only matching hostnames load inside the main web view.
-
External links not matching the whitelist open in the system default browser.
Plugin Resolution
The plugins object maps plugin class names to location specifiers:
-
@jasonelle: Core plugin present in both Android and Xcode templates (sources/android/andsources/xcode/). -
@jasonelle/android: Core plugin present only in the Android template (sources/android/). -
@lib/<PluginName>: Custom workspace plugin located atlib/common/sources/plugins/<PluginName>. -
@lib/android/<PluginName>: Custom Android plugin located atlib/common/sources/plugins/<PluginName>/android.
Merged Output (build/android/config/config.jsonc)
The following example shows the resulting merged file after running task jsonc.android:
{
"allowed": [
"github.com"
],
"app_id": "com.example.application",
"app_name": "Jasonelle v4",
"app_version": "1.0",
"inspectable": true,
"plugins": {
"JLPluginCookies": "@jasonelle",
"JLPluginDevice": "@jasonelle"
},
"url": "https://jasonelle.com"
}
Pipeline Integration
Downstream build tools consume build/android/config/config.jsonc:
-
tools/appconf: Readsapp_idto updateapplicationIdinbuild.gradle.ktsand package references inAndroidManifest.xml. Readsapp_nameto update the application label string. Readsapp_versionto setversionNameand a timestampedversionCode(the build number). -
tools/plugins: Readspluginsto copy declared plugin code intobuild/android/sources/.