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
cd3fd475
Commit
cd3fd475
authored
Feb 14, 2017
by
Jakob Andersen
Committed by
GitHub
Feb 14, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't update Android SDK settings in build.gradle (#8089)
parent
0370f712
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
33 deletions
+0
-33
gradle.dart
packages/flutter_tools/lib/src/android/gradle.dart
+0
-33
No files found.
packages/flutter_tools/lib/src/android/gradle.dart
View file @
cd3fd475
...
@@ -145,16 +145,6 @@ Future<String> ensureGradlew() async {
...
@@ -145,16 +145,6 @@ Future<String> ensureGradlew() async {
printTrace
(
'Using gradle from
$gradle
.'
);
printTrace
(
'Using gradle from
$gradle
.'
);
}
}
// Stamp the android/app/build.gradle file with the current android sdk and build tools version.
File
appGradleFile
=
fs
.
file
(
'android/app/build.gradle'
);
if
(
appGradleFile
.
existsSync
())
{
_GradleFile
gradleFile
=
new
_GradleFile
.
parse
(
appGradleFile
);
AndroidSdkVersion
sdkVersion
=
androidSdk
.
latestVersion
;
gradleFile
.
replace
(
'compileSdkVersion'
,
"
${sdkVersion.sdkLevel}
"
);
gradleFile
.
replace
(
'buildToolsVersion'
,
"'
${sdkVersion.buildToolsVersionName}
'"
);
gradleFile
.
writeContents
(
appGradleFile
);
}
// Run 'gradle wrapper'.
// Run 'gradle wrapper'.
List
<
String
>
command
=
logger
.
isVerbose
List
<
String
>
command
=
logger
.
isVerbose
?
<
String
>[
gradle
,
'wrapper'
]
?
<
String
>[
gradle
,
'wrapper'
]
...
@@ -255,26 +245,3 @@ Future<Null> buildGradleProjectV2(String gradlew, String buildModeName) async {
...
@@ -255,26 +245,3 @@ Future<Null> buildGradleProjectV2(String gradlew, String buildModeName) async {
apkFile
.
copySync
(
'
$gradleAppOutDir
/app.apk'
);
apkFile
.
copySync
(
'
$gradleAppOutDir
/app.apk'
);
printStatus
(
'Built
$apkFilename
(
${getSizeAsMB(apkFile.lengthSync())}
).'
);
printStatus
(
'Built
$apkFilename
(
${getSizeAsMB(apkFile.lengthSync())}
).'
);
}
}
class
_GradleFile
{
_GradleFile
.
parse
(
File
file
)
{
contents
=
file
.
readAsStringSync
();
}
String
contents
;
void
replace
(
String
key
,
String
newValue
)
{
// Replace 'ws key ws value' with the new value.
final
RegExp
regex
=
new
RegExp
(
'
\\
s+
$key
\\
s+(
\\
S+)'
,
multiLine:
true
);
Match
match
=
regex
.
firstMatch
(
contents
);
if
(
match
!=
null
)
{
String
oldValue
=
match
.
group
(
1
);
int
offset
=
match
.
end
-
oldValue
.
length
;
contents
=
contents
.
substring
(
0
,
offset
)
+
newValue
+
contents
.
substring
(
match
.
end
);
}
}
void
writeContents
(
File
file
)
{
file
.
writeAsStringSync
(
contents
);
}
}
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