Compare commits
37 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
0eac4d4c5b | |
|
|
4447012691 | |
|
|
3c41d5cb1c | |
|
|
03d7a63609 | |
|
|
f1c45f90b4 | |
|
|
1d28e0fbdb | |
|
|
b69b87efb3 | |
|
|
1cc0c49f29 | |
|
|
326209fdbf | |
|
|
a88b3b8e48 | |
|
|
14a925be08 | |
|
|
9496a9b3de | |
|
|
7bc5081b00 | |
|
|
e2ab18efdd | |
|
|
0b83309df0 | |
|
|
27a2ec266e | |
|
|
4ffc1adf42 | |
|
|
52d86b3bd3 | |
|
|
50c7144fca | |
|
|
26b3c9a244 | |
|
|
d96ce5a571 | |
|
|
d48614191d | |
|
|
5e1d40c94c | |
|
|
a233de7547 | |
|
|
c25fa1db79 | |
|
|
b6b6f3426f | |
|
|
bd9285b831 | |
|
|
6c78ea8471 | |
|
|
2546c20766 | |
|
|
5a1fc38804 | |
|
|
52ebf16507 | |
|
|
4fa29e6f5d | |
|
|
aadcfb3baa | |
|
|
31dca2b5e5 | |
|
|
417ae1c0c7 | |
|
|
3d3a54c486 | |
|
|
438daea208 |
|
|
@ -7,6 +7,7 @@
|
|||
"org_name": "com.flet",
|
||||
"company_name": "Your Company",
|
||||
"copyright": "Copyright (c) 2023 Your Company",
|
||||
"flutter": null,
|
||||
"sep": "/",
|
||||
"kotlin_dir": "{{ cookiecutter.org_name.replace('.', cookiecutter.sep) }}{{ cookiecutter.sep }}{{ cookiecutter.project_name }}{{ cookiecutter.sep }}",
|
||||
"hide_loading_animation": true,
|
||||
|
|
|
|||
|
|
@ -41,11 +41,8 @@ android {
|
|||
}
|
||||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId "{{ cookiecutter.org_name }}.{{ cookiecutter.project_name }}"
|
||||
// You can update the following values to match your application needs.
|
||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||
minSdkVersion flutter.minSdkVersion
|
||||
minSdkVersion 23
|
||||
targetSdkVersion flutter.targetSdkVersion
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
|
|
@ -57,8 +54,6 @@ android {
|
|||
|
||||
buildTypes {
|
||||
release {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,4 +4,5 @@
|
|||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
</manifest>
|
||||
|
|
@ -1,9 +1,13 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
<application
|
||||
android:label="{{ cookiecutter.project_name }}"
|
||||
android:label="{{ cookiecutter.product_name }}"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.EnableImpeller"
|
||||
android:value="true"/>
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
|
|
|
|||
|
|
@ -4,4 +4,5 @@
|
|||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
</manifest>
|
||||
|
|
@ -1,12 +1,11 @@
|
|||
buildscript {
|
||||
ext.kotlin_version = '1.7.10'
|
||||
ext.kotlin_version = '1.7.22'
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.4.2'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,11 +10,20 @@ pluginManagement {
|
|||
|
||||
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
|
||||
plugins {
|
||||
id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
|
||||
}
|
||||
}
|
||||
|
||||
include ":app"
|
||||
plugins {
|
||||
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
||||
id "com.android.application" version "7.3.0" apply false
|
||||
}
|
||||
|
||||
apply from: "${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle/app_plugin_loader.gradle"
|
||||
include ":app"
|
||||
|
|
@ -45,5 +45,12 @@
|
|||
<true />
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true />
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true />
|
||||
</dict>
|
||||
<key>NSMicrophoneUsageDescription</key>
|
||||
<string>Audio Recording</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -9,6 +9,10 @@ import 'package:path/path.dart' as path;
|
|||
import 'package:serious_python/serious_python.dart';
|
||||
import 'package:url_strategy/url_strategy.dart';
|
||||
|
||||
{% for dep in cookiecutter.flutter.dependencies %}
|
||||
import 'package:{{ dep }}/{{ dep }}.dart' as {{ dep }};
|
||||
{% endfor %}
|
||||
|
||||
const bool isProduction = bool.fromEnvironment('dart.vm.product');
|
||||
|
||||
const assetPath = "app/app.zip";
|
||||
|
|
@ -19,12 +23,21 @@ final hideLoadingPage =
|
|||
const outLogFilename = "out.log";
|
||||
const errorExitCode = 100;
|
||||
|
||||
List<CreateControlFactory> createControlFactories = [
|
||||
{% for dep in cookiecutter.flutter.dependencies %}
|
||||
{{ dep }}.createControl,
|
||||
{% endfor %}
|
||||
];
|
||||
|
||||
const pythonScript = """
|
||||
import certifi, os, runpy, socket, sys, traceback
|
||||
|
||||
os.environ["REQUESTS_CA_BUNDLE"] = certifi.where()
|
||||
os.environ["SSL_CERT_FILE"] = certifi.where()
|
||||
|
||||
# fix for: https://github.com/flet-dev/serious-python/issues/85#issuecomment-2065000974
|
||||
os.environ["OPENBLAS_NUM_THREADS"] = "1"
|
||||
|
||||
if os.getenv("FLET_PLATFORM") == "android":
|
||||
import ssl
|
||||
|
||||
|
|
@ -79,6 +92,10 @@ void main() async {
|
|||
debugPrint = (String? message, {int? wrapWidth}) => null;
|
||||
}
|
||||
|
||||
{% for dep in cookiecutter.flutter.dependencies %}
|
||||
{{ dep }}.ensureInitialized();
|
||||
{% endfor %}
|
||||
|
||||
runApp(FutureBuilder(
|
||||
future: prepareApp(),
|
||||
builder: (BuildContext context, AsyncSnapshot snapshot) {
|
||||
|
|
@ -89,6 +106,7 @@ void main() async {
|
|||
pageUrl: pageUrl,
|
||||
assetsDir: assetsDir,
|
||||
hideLoadingPage: hideLoadingPage,
|
||||
createControlFactories: createControlFactories
|
||||
)
|
||||
: FutureBuilder(
|
||||
future: runPythonApp(),
|
||||
|
|
@ -107,6 +125,7 @@ void main() async {
|
|||
pageUrl: pageUrl,
|
||||
assetsDir: assetsDir,
|
||||
hideLoadingPage: hideLoadingPage,
|
||||
createControlFactories: createControlFactories
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>FLTEnableImpeller</key>
|
||||
<true />
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
|
|
@ -28,5 +30,7 @@
|
|||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>NSMicrophoneUsageDescription</key>
|
||||
<string>Audio Recording</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -12,22 +12,15 @@ dependencies:
|
|||
sdk: flutter
|
||||
|
||||
serious_python: ^0.7.0
|
||||
# serious_python:
|
||||
# git:
|
||||
# url: https://github.com/flet-dev/serious-python
|
||||
# path: src/serious_python
|
||||
# ref: 'd059aef'
|
||||
|
||||
flet: ^0.19.0
|
||||
# flet:
|
||||
# git:
|
||||
# url: https://github.com/flet-dev/flet.git
|
||||
# path: package
|
||||
# ref: '37b9581'
|
||||
flet: ^0.23.0
|
||||
|
||||
path: ^1.8.3
|
||||
url_strategy: ^0.2.0
|
||||
cupertino_icons: ^1.0.2
|
||||
cupertino_icons: ^1.0.6
|
||||
|
||||
dependency_overrides:
|
||||
wakelock_plus: ^1.2.5
|
||||
package_info_plus: ^8.0.0
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
importScripts("https://cdn.jsdelivr.net/pyodide/v0.24.1/full/pyodide.js");
|
||||
importScripts("https://cdn.jsdelivr.net/pyodide/v0.25.0/full/pyodide.js");
|
||||
|
||||
self.pythonModuleName = null;
|
||||
self.initialized = false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue