Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
62024766
Unverified
Commit
62024766
authored
Jun 15, 2020
by
Ian Hickson
Committed by
GitHub
Jun 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove license statements in template files. (#57268)
parent
e02265dd
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
18 deletions
+30
-18
settings.gradle.legacy_versions
...ages/flutter_tools/gradle/settings.gradle.legacy_versions
+12
-0
gradle.dart
packages/flutter_tools/lib/src/android/gradle.dart
+4
-4
settings.gradle
.../flutter_tools/templates/app/android.tmpl/settings.gradle
+0
-4
include_flutter.groovy.copy.tmpl
...s/module/android/library/include_flutter.groovy.copy.tmpl
+0
-4
include_flutter.groovy.copy.tmpl
...id/library_new_embedding/include_flutter.groovy.copy.tmpl
+0
-4
gradle_test.dart
...flutter_tools/test/general.shard/android/gradle_test.dart
+14
-2
No files found.
packages/flutter_tools/gradle/
deprecated_settings.gradle
→
packages/flutter_tools/gradle/
settings.gradle.legacy_versions
View file @
62024766
...
@@ -45,3 +45,15 @@ localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
...
@@ -45,3 +45,15 @@ localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
;EOF
include ':app'
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
packages/flutter_tools/lib/src/android/gradle.dart
View file @
62024766
...
@@ -171,14 +171,14 @@ void createSettingsAarGradle(Directory androidDirectory) {
...
@@ -171,14 +171,14 @@ void createSettingsAarGradle(Directory androidDirectory) {
timeout:
timeoutConfiguration
.
fastOperation
);
timeout:
timeoutConfiguration
.
fastOperation
);
final
String
flutterRoot
=
globals
.
fs
.
path
.
absolute
(
Cache
.
flutterRoot
);
final
String
flutterRoot
=
globals
.
fs
.
path
.
absolute
(
Cache
.
flutterRoot
);
final
File
deprecatedFile
=
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
flutterRoot
,
'packages'
,
'flutter_tools'
,
final
File
legacySettingsDotGradleFiles
=
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
flutterRoot
,
'packages'
,
'flutter_tools'
,
'gradle'
,
'
deprecated_settings.gradle
'
));
'gradle'
,
'
settings.gradle.legacy_versions
'
));
assert
(
deprecatedFile
.
existsSync
());
assert
(
legacySettingsDotGradleFiles
.
existsSync
());
final
String
settingsAarContent
=
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
flutterRoot
,
'packages'
,
'flutter_tools'
,
final
String
settingsAarContent
=
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
flutterRoot
,
'packages'
,
'flutter_tools'
,
'gradle'
,
'settings_aar.gradle.tmpl'
)).
readAsStringSync
();
'gradle'
,
'settings_aar.gradle.tmpl'
)).
readAsStringSync
();
// Get the `settings.gradle` content variants that should be patched.
// Get the `settings.gradle` content variants that should be patched.
final
List
<
String
>
existingVariants
=
deprecatedFile
.
readAsStringSync
().
split
(
';EOF'
);
final
List
<
String
>
existingVariants
=
legacySettingsDotGradleFiles
.
readAsStringSync
().
split
(
';EOF'
);
existingVariants
.
add
(
settingsAarContent
);
existingVariants
.
add
(
settingsAarContent
);
bool
exactMatch
=
false
;
bool
exactMatch
=
false
;
...
...
packages/flutter_tools/templates/app/android.tmpl/settings.gradle
View file @
62024766
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
include
':app'
include
':app'
def
localPropertiesFile
=
new
File
(
rootProject
.
projectDir
,
"local.properties"
)
def
localPropertiesFile
=
new
File
(
rootProject
.
projectDir
,
"local.properties"
)
...
...
packages/flutter_tools/templates/module/android/library/include_flutter.groovy.copy.tmpl
View file @
62024766
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
def scriptFile = getClass().protectionDomain.codeSource.location.toURI()
def scriptFile = getClass().protectionDomain.codeSource.location.toURI()
def flutterProjectRoot = new File(scriptFile).parentFile.parentFile
def flutterProjectRoot = new File(scriptFile).parentFile.parentFile
...
...
packages/flutter_tools/templates/module/android/library_new_embedding/include_flutter.groovy.copy.tmpl
View file @
62024766
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
def scriptFile = getClass().protectionDomain.codeSource.location.toURI()
def scriptFile = getClass().protectionDomain.codeSource.location.toURI()
def flutterProjectRoot = new File(scriptFile).parentFile.parentFile
def flutterProjectRoot = new File(scriptFile).parentFile.parentFile
...
...
packages/flutter_tools/test/general.shard/android/gradle_test.dart
View file @
62024766
...
@@ -391,7 +391,7 @@ include ':app'
...
@@ -391,7 +391,7 @@ include ':app'
'flutter_tools'
,
'flutter_tools'
,
'gradle'
);
'gradle'
);
globals
.
fs
.
directory
(
toolGradlePath
).
createSync
(
recursive:
true
);
globals
.
fs
.
directory
(
toolGradlePath
).
createSync
(
recursive:
true
);
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
toolGradlePath
,
'
deprecated_settings.gradle
'
))
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
toolGradlePath
,
'
settings.gradle.legacy_versions
'
))
.
writeAsStringSync
(
currentSettingsGradle
);
.
writeAsStringSync
(
currentSettingsGradle
);
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
toolGradlePath
,
'settings_aar.gradle.tmpl'
))
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
toolGradlePath
,
'settings_aar.gradle.tmpl'
))
...
@@ -424,7 +424,7 @@ include ':app'
...
@@ -424,7 +424,7 @@ include ':app'
'flutter_tools'
,
'flutter_tools'
,
'gradle'
);
'gradle'
);
globals
.
fs
.
directory
(
toolGradlePath
).
createSync
(
recursive:
true
);
globals
.
fs
.
directory
(
toolGradlePath
).
createSync
(
recursive:
true
);
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
toolGradlePath
,
'
deprecated_settings.gradle
'
))
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
toolGradlePath
,
'
settings.gradle.legacy_versions
'
))
.
writeAsStringSync
(
currentSettingsGradle
);
.
writeAsStringSync
(
currentSettingsGradle
);
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
toolGradlePath
,
'settings_aar.gradle.tmpl'
))
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
toolGradlePath
,
'settings_aar.gradle.tmpl'
))
...
@@ -2484,6 +2484,18 @@ plugin1=${plugin1.path}
...
@@ -2484,6 +2484,18 @@ plugin1=${plugin1.path}
);
);
});
});
});
});
test
(
'Current settings.gradle is in our legacy settings.gradle file set'
,
()
{
// If this test fails, you probably edited templates/app/android.tmpl.
// That's fine, but you now need to add a copy of that file to gradle/settings.gradle.legacy_versions, separated
// from the previous versions by a line that just says ";EOF".
final
File
templateSettingsDotGradle
=
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
Cache
.
flutterRoot
,
'packages'
,
'flutter_tools'
,
'templates'
,
'app'
,
'android.tmpl'
,
'settings.gradle'
));
final
File
legacySettingsDotGradleFiles
=
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
Cache
.
flutterRoot
,
'packages'
,
'flutter_tools'
,
'gradle'
,
'settings.gradle.legacy_versions'
));
expect
(
legacySettingsDotGradleFiles
.
readAsStringSync
().
split
(
';EOF'
).
map
<
String
>((
String
body
)
=>
body
.
trim
()),
contains
(
templateSettingsDotGradle
.
readAsStringSync
().
trim
()),
);
});
}
}
/// Generates a fake app bundle at the location [directoryName]/[fileName].
/// Generates a fake app bundle at the location [directoryName]/[fileName].
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment