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.
This commit is contained in:
2026-08-29 17:50:31 +07:00
parent 6e7f1ced35
commit a7c6058540
105 changed files with 16721 additions and 275 deletions
@@ -0,0 +1,37 @@
import 'source.dart';
/// Compile-time source gate: `--dart-define=SOURCES=comicland,mangaread,mangatown`
/// or `--dart-define=SOURCES=all`.
///
/// Unset / invalid → ComicLand only. Default is **not** all sources.
const String kSourcesDefine = String.fromEnvironment(
'SOURCES',
defaultValue: 'comicland',
);
/// Parses [raw] into enabled [SourceId]s.
///
/// - Token `all` (case-insensitive) enables every [SourceId].
/// - Unknown tokens ignored.
/// - Empty result falls back to `{SourceId.comicland}`.
Set<SourceId> parseEnabledSourceIds([String raw = kSourcesDefine]) {
final parts = raw.split(',').map((p) => p.trim().toLowerCase()).where(
(p) => p.isNotEmpty,
);
for (final part in parts) {
if (part == 'all') {
return SourceId.values.toSet();
}
}
final out = <SourceId>{};
for (final part in parts) {
final id = SourceId.tryParse(part);
if (id != null) out.add(id);
}
if (out.isEmpty) {
return {SourceId.comicland};
}
return out;
}
Set<SourceId> enabledSourceIds() => parseEnabledSourceIds();