Files
nsrb a7c6058540 Add cxyz Android project structure and initial configuration
- Introduced a new Flutter project for the cxyz Android manga/comic reader, including essential files such as pubspec.yaml, AndroidManifest.xml, and Gradle configuration.
- Added .gitignore files to exclude unnecessary files and directories for both the main project and Android-specific files.
- Implemented initial README.md with project description, features, setup instructions, and API details for ComicLand, MangaRead, and MangaTown.
- Configured analysis options and dependencies in pubspec.yaml to support Flutter development.
- Established a pnpm workspace and lockfile for dependency management.
- Included various Android resources such as icons, styles, and launch backgrounds for a complete application setup.
2026-08-29 17:50:31 +07:00

60 lines
1.9 KiB
Kotlin

allprojects {
repositories {
google()
mavenCentral()
}
}
val newBuildDir: Directory =
rootProject.layout.buildDirectory
.dir("../../build")
.get()
rootProject.layout.buildDirectory.value(newBuildDir)
subprojects {
val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
project.layout.buildDirectory.value(newSubprojectBuildDir)
}
// flutter_secure_storage 11 requests compileSdk 37; some SDKs install that
// platform as android-37.0, which AGP cannot resolve. Cap plugins at 36.
subprojects {
afterEvaluate {
val android = project.extensions.findByName("android") ?: return@afterEvaluate
try {
val method = android.javaClass.methods.firstOrNull {
it.name == "setCompileSdkVersion" || it.name == "setCompileSdk"
}
// Prefer the Int setter used by AGP 8+
val setCompileSdk = android.javaClass.methods.firstOrNull { m ->
m.name == "setCompileSdk" && m.parameterTypes.size == 1
}
if (setCompileSdk != null) {
val current = android.javaClass.methods
.firstOrNull { it.name == "getCompileSdk" && it.parameterCount == 0 }
?.invoke(android)
val api = when (current) {
is Int -> current
is String -> current.toIntOrNull() ?: 0
else -> 0
}
if (api > 36) {
setCompileSdk.invoke(android, 36)
}
} else if (method != null) {
method.invoke(android, 36)
}
} catch (_: Exception) {
// Non-Android subprojects — ignore.
}
}
}
subprojects {
project.evaluationDependsOn(":app")
}
tasks.register<Delete>("clean") {
delete(rootProject.layout.buildDirectory)
}