Use Gradle KTS in new Android app projects by default (2nd try) (#157195)
This PR resolves #151166 This PR relands #154061
This commit is contained in:
@@ -29,14 +29,17 @@ Future<void> main() async {
|
||||
await runProjectTest((FlutterProject flutterProject) async {
|
||||
await inDirectory(path.join(flutterProject.rootPath, 'android'), () async {
|
||||
section('Insert gradle testing script');
|
||||
final File build = File(path.join(
|
||||
flutterProject.rootPath, 'android', 'app', 'build.gradle',
|
||||
));
|
||||
build.writeAsStringSync(
|
||||
final File buildFile = getAndroidBuildFile(path.join(flutterProject.rootPath, 'android', 'app'));
|
||||
buildFile.writeAsStringSync(
|
||||
'''
|
||||
task printEngineMavenUrl() {
|
||||
tasks.register("printEngineMavenUrl") {
|
||||
doLast {
|
||||
println project.repositories.find { it.name == 'maven' }.url
|
||||
project.repositories.forEach { repo ->
|
||||
if (repo.name == "maven") {
|
||||
repo as MavenArtifactRepository
|
||||
logger.quiet(repo.url.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
''',
|
||||
|
||||
Reference in New Issue
Block a user