Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
moved string w/o artifact hub
  • Loading branch information
jesswrd committed Oct 28, 2024
commit a73ad6074ac01799688980b16f18df8bef4323de
12 changes: 0 additions & 12 deletions script/tool/lib/src/gradle_check_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -229,18 +229,6 @@ plugins {
}
''';

/// String printed as a valid example of settings.gradle repository
/// configuration without the artifact hub env variable.
/// GP stands for the gradle plugin method of flutter tooling inclusion.
@visibleForTesting
static String exampleSettingsWithoutArtifactHubStringGP = '''
// See $artifactHubDocumentationString for more info.
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
// ...other plugins
}
''';

/// Validates that [gradleLines] reads and uses a artifiact hub repository
/// when ARTIFACT_HUB_REPOSITORY is set.
///
Expand Down
13 changes: 12 additions & 1 deletion script/tool/test/gradle_check_command_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,17 @@ ${includeArtifactHub ? GradleCheckCommand.exampleRootSettingsArtifactHubString :
.childFile('settings.gradle');
settingsGradle.createSync(recursive: true);

/// String printed as a valid example of settings.gradle repository
/// configuration without the artifact hub env variable.
/// GP stands for the gradle plugin method of flutter tooling inclusion.
const String exampleSettingsWithoutArtifactHubStringGP = '''
// See ${GradleCheckCommand.artifactHubDocumentationString} for more info.
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
// ...other plugins
}
''';

settingsGradle.writeAsStringSync('''
pluginManagement {
def flutterSdkPath = {
Expand All @@ -229,7 +240,7 @@ pluginManagement {
gradlePluginPortal()
}
}
${includeArtifactHub ? GradleCheckCommand.exampleSettingsArtifactHubStringGP : GradleCheckCommand.exampleSettingsWithoutArtifactHubStringGP}
${includeArtifactHub ? GradleCheckCommand.exampleSettingsArtifactHubStringGP : exampleSettingsWithoutArtifactHubStringGP}
include ":app"
''');
}
Expand Down