Reverts "Use Gradle KTS in new Android app projects by default (#154061)" (#157194)

Reverts: flutter/flutter#154061
Initiated by: QuncCccccc
Reason for reverting: might be the reason that cause Framework tree to red
Original PR Author: bartekpacia

Reviewed By: {gmackall, reidbaker}

This change reverts the following previous change:
This PR resolves #151166
This commit is contained in:
auto-submit[bot]
2024-10-18 21:14:46 +00:00
committed by GitHub
parent d3c54a115f
commit 9a41f11610
18 changed files with 112 additions and 133 deletions

View File

@@ -29,17 +29,14 @@ Future<void> main() async {
await runProjectTest((FlutterProject flutterProject) async {
await inDirectory(path.join(flutterProject.rootPath, 'android'), () async {
section('Insert gradle testing script');
final File buildFile = getAndroidBuildFile(path.join(flutterProject.rootPath, 'android'));
buildFile.writeAsStringSync(
final File build = File(path.join(
flutterProject.rootPath, 'android', 'app', 'build.gradle',
));
build.writeAsStringSync(
'''
tasks.register("printEngineMavenUrl") {
task printEngineMavenUrl() {
doLast {
project.repositories.forEach { repo ->
if (repo.name == "maven") {
repo as MavenArtifactRepository
logger.quiet(repo.url.toString())
}
}
println project.repositories.find { it.name == 'maven' }.url
}
}
''',