chore(android): update Gradle dependencies, adjust Python build path, and enhance AndroidManifest with drawable resources
This commit is contained in:
@@ -15,6 +15,9 @@ android {
|
|||||||
versionName "3.1.0"
|
versionName "3.1.0"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
ndk {
|
||||||
|
abiFilters "arm64-v8a", "x86_64"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
@@ -39,30 +42,20 @@ android {
|
|||||||
chaquopy {
|
chaquopy {
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
version = "3.11"
|
version = "3.11"
|
||||||
buildPython "python3.11"
|
buildPython "/usr/bin/python3.11"
|
||||||
|
|
||||||
pip {
|
pip {
|
||||||
install "aiohttp>=3.13.2"
|
install "aiohttp==3.10.10"
|
||||||
install "lxmf>=0.9.3"
|
|
||||||
install "psutil>=7.1.3"
|
install "psutil>=7.1.3"
|
||||||
install "rns>=1.0.4"
|
|
||||||
install "websockets>=15.0.1"
|
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 "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 "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"
|
install "ply>=3.11,<4.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
|
||||||
main {
|
|
||||||
python {
|
|
||||||
srcDirs = ["src/main/python"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
@@ -12,9 +12,9 @@
|
|||||||
<application
|
<application
|
||||||
android:name="com.chaquo.python.android.PyApplication"
|
android:name="com.chaquo.python.android.PyApplication"
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@drawable/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@drawable/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.MeshChatX"
|
android:theme="@style/Theme.MeshChatX"
|
||||||
android:usesCleartextTraffic="true"
|
android:usesCleartextTraffic="true"
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import com.chaquo.python.android.AndroidPlatform;
|
|||||||
public class MainActivity extends AppCompatActivity {
|
public class MainActivity extends AppCompatActivity {
|
||||||
private WebView webView;
|
private WebView webView;
|
||||||
private ProgressBar progressBar;
|
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;
|
private static final int SERVER_PORT = 8000;
|
||||||
|
|
||||||
@SuppressLint("SetJavaScriptEnabled")
|
@SuppressLint("SetJavaScriptEnabled")
|
||||||
@@ -49,6 +49,13 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
super.onPageStarted(view, url, favicon);
|
super.onPageStarted(view, url, favicon);
|
||||||
progressBar.setVisibility(android.view.View.VISIBLE);
|
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();
|
startMeshChatServer();
|
||||||
|
|||||||
@@ -8,8 +8,7 @@ def start_server(port=8000):
|
|||||||
'meshchat',
|
'meshchat',
|
||||||
'--headless',
|
'--headless',
|
||||||
'--host', '127.0.0.1',
|
'--host', '127.0.0.1',
|
||||||
'--port', str(port),
|
'--port', str(port)
|
||||||
'--no-https'
|
|
||||||
]
|
]
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
|||||||
13
android/app/src/main/res/drawable/ic_launcher.xml
Normal file
13
android/app/src/main/res/drawable/ic_launcher.xml
Normal 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>
|
||||||
|
|
||||||
13
android/app/src/main/res/drawable/ic_launcher_foreground.xml
Normal file
13
android/app/src/main/res/drawable/ic_launcher_foreground.xml
Normal 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>
|
||||||
|
|
||||||
13
android/app/src/main/res/drawable/ic_launcher_round.xml
Normal file
13
android/app/src/main/res/drawable/ic_launcher_round.xml
Normal 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>
|
||||||
|
|
||||||
@@ -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>
|
||||||
|
|
||||||
@@ -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>
|
||||||
|
|
||||||
@@ -6,15 +6,7 @@ buildscript {
|
|||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:8.7.3'
|
classpath 'com.android.tools.build:gradle:8.7.3'
|
||||||
classpath "com.chaquo.python:gradle:15.0.1"
|
classpath "com.chaquo.python:gradle:16.1.0"
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
allprojects {
|
|
||||||
repositories {
|
|
||||||
google()
|
|
||||||
mavenCentral()
|
|
||||||
maven { url "https://chaquo.com/maven" }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user