Merge pull request #1801 from tvolkert/master
Ignore generated/ instead of ios/
This commit is contained in:
1
examples/.gitignore
vendored
1
examples/.gitignore
vendored
@@ -5,6 +5,5 @@
|
|||||||
.packages
|
.packages
|
||||||
.pub/
|
.pub/
|
||||||
build/
|
build/
|
||||||
ios/
|
|
||||||
packages
|
packages
|
||||||
pubspec.lock
|
pubspec.lock
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ class AndroidApk extends ApplicationPackage {
|
|||||||
|
|
||||||
class IOSApp extends ApplicationPackage {
|
class IOSApp extends ApplicationPackage {
|
||||||
static const String _defaultId = 'io.flutter.runner.Runner';
|
static const String _defaultId = 'io.flutter.runner.Runner';
|
||||||
static const String _defaultPath = 'ios/Generated';
|
static const String _defaultPath = 'ios/.generated';
|
||||||
|
|
||||||
IOSApp({
|
IOSApp({
|
||||||
String localPath: _defaultPath,
|
String localPath: _defaultPath,
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ class IOSCommand extends FlutterCommand {
|
|||||||
Future<int> _runInitCommand() async {
|
Future<int> _runInitCommand() async {
|
||||||
// Step 1: Fetch the archive from the cloud
|
// Step 1: Fetch the archive from the cloud
|
||||||
String iosFilesPath = path.join(Directory.current.path, "ios");
|
String iosFilesPath = path.join(Directory.current.path, "ios");
|
||||||
String xcodeprojPath = path.join(iosFilesPath, "Generated");
|
String xcodeprojPath = path.join(iosFilesPath, ".generated");
|
||||||
List<int> archiveBytes = await _fetchXcodeArchive();
|
List<int> archiveBytes = await _fetchXcodeArchive();
|
||||||
|
|
||||||
if (archiveBytes.isEmpty) {
|
if (archiveBytes.isEmpty) {
|
||||||
@@ -172,7 +172,7 @@ class IOSCommand extends FlutterCommand {
|
|||||||
// one does not exist.
|
// one does not exist.
|
||||||
File generatedGitignore = new File(path.join(iosFilesPath, ".gitignore"));
|
File generatedGitignore = new File(path.join(iosFilesPath, ".gitignore"));
|
||||||
if (!generatedGitignore.existsSync()) {
|
if (!generatedGitignore.existsSync()) {
|
||||||
generatedGitignore.writeAsStringSync("Generated/\n");
|
generatedGitignore.writeAsStringSync(".generated/\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Step 4: Setup default user editable files if this is the first run of
|
// Step 4: Setup default user editable files if this is the first run of
|
||||||
|
|||||||
Reference in New Issue
Block a user