35 lines
1.1 KiB
Diff
35 lines
1.1 KiB
Diff
--- ./packages/flutter_tools/gradle/build.gradle.kts.orig
|
|
+++ ./packages/flutter_tools/gradle/build.gradle.kts
|
|
@@ -7,6 +7,8 @@
|
|
`groovy`
|
|
}
|
|
|
|
+project.buildDir = file(project.gradle.gradleUserHomeDir.path + "/flutter/build")
|
|
+
|
|
group = "dev.flutter.plugin"
|
|
version = "1.0.0"
|
|
|
|
--- ./packages/flutter_tools/lib/src/android/gradle.dart.orig
|
|
+++ ./packages/flutter_tools/lib/src/android/gradle.dart
|
|
@@ -2,6 +2,7 @@
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
+import 'dart:io' as io show Platform;
|
|
import 'dart:math';
|
|
|
|
import 'package:crypto/crypto.dart';
|
|
@@ -276,6 +276,12 @@
|
|
int? maxRetries,
|
|
_OutputParser? outputParser,
|
|
}) async {
|
|
+ final gradleUserHome = io.Platform.environment['GRADLE_USER_HOME'] ??
|
|
+ io.Platform.environment['HOME']! + '/.gradle';
|
|
+ options = [
|
|
+ '--project-cache-dir=$gradleUserHome/flutter/.gradle',
|
|
+ ...options,
|
|
+ ];
|
|
final bool usesAndroidX = isAppUsingAndroidX(project.android.hostAppGradleRoot);
|
|
if (usesAndroidX) {
|
|
_analytics.send(Event.flutterBuildInfo(label: 'app-using-android-x', buildType: 'gradle'));
|