setup method

  1. @override
Future setup()
override

Implementation

@override
Future setup() async {
  super.setup();
  final pluginFileContent = '''
# Autogenerated by fastlane
#
# Ensure this file is checked in to source control!

source "https://rubygems.org"

gem 'fastlane'

plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
''';

  final pluginFile = File(join(root, 'android', 'Gemfile'));
  if (!await pluginFile.exists()) {
    await pluginFile.create(recursive: true);
  }
  await pluginFile.writeAsString(pluginFileContent);

  // await runCommand(join(root, 'android'), 'fastlane add_plugin pgyer');
}