ZapretKVN-android/core/model/build.gradle.kts
loop-uh 0ad3196acf
Some checks failed
Android CI / build (push) Has been cancelled
Архитектура подключения: один разбор профиля, общий каркас, координаторы
Рефакторинг без смены поведения (вывод профилей и runtime JSON побайтно прежний).

- ParsedConfig: профиль разбирается один раз на подключение (было ~21 разбора
  одного JSON); перегрузки ConfigAnalyzer/BootstrapConfig/RoutingConfigEditor/
  FailoverPlanner/RuntimeConfigBuilder, String-версии — тонкие обёртки;
  ParsedConfigEquivalenceTest на всех фикстурах и пресетах.
- core/model: ProfileSkeleton — единственный каркас профиля (tun, selector,
  direct, hijack-dns, dns) для подписок и WireGuard; OutboundSpec — одна сборка
  sing-box outbound/endpoint по протоколу; JsonConfig перенесён в core/model.
  Golden-тесты импорта и WireGuard проходят без правки ожиданий.
- VpnController 1218 → 502 строк: ConnectionDiagnosticsRecorder, LatencyPublisher.
- VpnRuntime 1656 → 1010 строк: NetworkAutomationCoordinator, RecoveryCoordinator,
  ServerSwitchCoordinator; состояние по-прежнему меняется только в акторе.
- SessionHealthVerifier: одна DNS/HTTPS-проверка для запуска и переключения.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 21:56:27 +03:00

28 lines
1 KiB
Kotlin

import com.android.build.api.dsl.LibraryExtension
apply(plugin = "com.android.library")
// Domain value types the UI layer reads: VPN/profile/routing/app-scope/diagnostic/update state,
// settings and their trivial pure helpers. Package names are the original
// io.github.zapretkvn.android.* ones, so moving a type here changes no imports.
// No Compose, no Android services, no ViewModels, no stores: runtime logic stays in :app.
extensions.configure<LibraryExtension> {
namespace = "io.github.zapretkvn.core.model"
compileSdk = 36
defaultConfig {
minSdk = 26
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
}
dependencies {
// Profile skeleton and outbound specs are built as kotlinx JsonObject trees; exposed so
// :app and :wireguard-import share one JSON type with the builders.
add("api", "org.jetbrains.kotlinx:kotlinx-serialization-json:1.10.0")
add("testImplementation", "junit:junit:4.13.2")
}