chore(android): update Gradle dependencies, adjust Python build path, and enhance AndroidManifest with drawable resources

This commit is contained in:
2026-01-01 21:57:05 -06:00
parent 7555d95d32
commit d2c2d7a02b
10 changed files with 71 additions and 29 deletions

View File

@@ -15,6 +15,9 @@ android {
versionName "3.1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {
abiFilters "arm64-v8a", "x86_64"
}
}
buildTypes {
@@ -39,30 +42,20 @@ android {
chaquopy {
defaultConfig {
version = "3.11"
buildPython "python3.11"
buildPython "/usr/bin/python3.11"
pip {
install "aiohttp>=3.13.2"
install "lxmf>=0.9.3"
install "aiohttp==3.10.10"
install "psutil>=7.1.3"
install "rns>=1.0.4"
install "websockets>=15.0.1"
install "bcrypt>=5.0.0,<6.0.0"
install "bcrypt==3.1.7"
install "aiohttp-session>=2.12.1,<3.0.0"
install "cryptography>=46.0.3,<47.0.0"
install "cryptography==42.0.8"
install "requests>=2.32.5,<3.0.0"
install "lxst>=0.4.5,<0.5.0"
install "numpy==1.26.2"
install "ply>=3.11,<4.0"
}
}
sourceSets {
main {
python {
srcDirs = ["src/main/python"]
}
}
}
}
dependencies {

View File

@@ -12,9 +12,9 @@
<application
android:name="com.chaquo.python.android.PyApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:roundIcon="@drawable/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.MeshChatX"
android:usesCleartextTraffic="true"

View File

@@ -13,7 +13,7 @@ import com.chaquo.python.android.AndroidPlatform;
public class MainActivity extends AppCompatActivity {
private WebView webView;
private ProgressBar progressBar;
private static final String SERVER_URL = "http://127.0.0.1:8000";
private static final String SERVER_URL = "https://127.0.0.1:8000";
private static final int SERVER_PORT = 8000;
@SuppressLint("SetJavaScriptEnabled")
@@ -49,6 +49,13 @@ public class MainActivity extends AppCompatActivity {
super.onPageStarted(view, url, favicon);
progressBar.setVisibility(android.view.View.VISIBLE);
}
@SuppressLint("WebViewClientOnReceivedSslError")
@Override
public void onReceivedSslError(WebView view, android.webkit.SslErrorHandler handler, android.net.http.SslError error) {
// Ignore SSL certificate errors for localhost
handler.proceed();
}
});
startMeshChatServer();

View File

@@ -8,8 +8,7 @@ def start_server(port=8000):
'meshchat',
'--headless',
'--host', '127.0.0.1',
'--port', str(port),
'--no-https'
'--port', str(port)
]
main()

View File

@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3D5AFE"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M30,30h48v48h-48z" />
</vector>

View File

@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3D5AFE"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M30,30h48v48h-48z" />
</vector>

View File

@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3D5AFE"
android:pathData="M54,54m-50,0a50,50 0,1 1,100 0a50,50 0,1 1,-100 0" />
<path
android:fillColor="#FFFFFF"
android:pathData="M30,30h48v48h-48z" />
</vector>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/purple_500"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/purple_500"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

View File

@@ -6,15 +6,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:8.7.3'
classpath "com.chaquo.python:gradle:15.0.1"
}
}
allprojects {
repositories {
google()
mavenCentral()
maven { url "https://chaquo.com/maven" }
classpath "com.chaquo.python:gradle:16.1.0"
}
}