AndroidManager constructor
AndroidManager(
- Directory _android
Implementation
AndroidManager(this._android) {
var pluginBuildFile = File("${_android.path}/build.gradle");
if (!pluginBuildFile.existsSync()) {
throw ArgumentError("file build.gradle is missing inside android folder");
}
_pluginManager = AndroidPluginManager(pluginBuildFile);
var libraryBuildFile = File("${_android.path}/app/build.gradle");
if (!libraryBuildFile.existsSync()) {
throw ArgumentError(
"file build.gradle is missing inside android/app/ folder");
}
_libraryManager = AndroidLibraryManager(libraryBuildFile);
final mainManifestFile =
File("${_android.path}/app/src/main/AndroidManifest.xml");
final debugManifestFile =
File("${_android.path}/app/src/debug/AndroidManifest.xml");
final profileManifestFile =
File("${_android.path}/app/src/profile/AndroidManifest.xml");
final manifestFiles = {
"main": mainManifestFile,
"debug": debugManifestFile,
"profile": profileManifestFile,
};
for (final manifestFileEntry in manifestFiles.entries) {
if (!manifestFileEntry.value.existsSync()) {
throw ArgumentError(
"file ${manifestFileEntry.value.path} is missing inside android/app/src/${manifestFileEntry.key}/ folder");
}
}
_manifestManager = ManifestManager(manifestFiles);
_buildManager = AndroidBuildManager(_android);
_androidFileManager = AndroidFileManager(_android);
}