feat: embed a Flutter G4F client with Cronet, cookie jar, and origin WebView

Port the Oracle off the Python g4f container onto on-device providers: Chromium HTTP via Cronet, a shared cookie session, IterList retry, hosted OpenAI-compat aggregators, and same-origin WebView fallbacks instead of CORS fetch.
This commit is contained in:
Alma Alexyz
2026-09-01 22:05:38 +05:00
parent f3e7412cf9
commit fbf04d90db
49 changed files with 4856 additions and 92 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ plugins {
android {
namespace = "com.example.words999.words999"
compileSdk = flutter.compileSdkVersion
compileSdk = 36
ndkVersion = flutter.ndkVersion
compileOptions {
+14
View File
@@ -19,6 +19,20 @@ subprojects {
project.evaluationDependsOn(":app")
}
gradle.projectsEvaluated {
rootProject.subprojects.forEach { proj ->
val android = proj.extensions.findByName("android") ?: return@forEach
try {
android.javaClass.getMethod("setCompileSdk", Int::class.javaPrimitiveType).invoke(android, 36)
} catch (_: Throwable) {
try {
android.javaClass.getMethod("setCompileSdkVersion", Int::class.javaPrimitiveType).invoke(android, 36)
} catch (_: Throwable) {
}
}
}
}
tasks.register<Delete>("clean") {
delete(rootProject.layout.buildDirectory)
}