anchor.diff:      }
   
       metrics.addAll(<String, dynamic>{
  -      'release_full_compile_millis': watch.elapsedMilliseconds,
  +      'release_${deleteGradleCache ? 'initial' : 'full'}_compile_millis': watch.elapsedMilliseconds,
         'release_size_bytes': releaseSizeInBytes,
       });
   
       return metrics;
     }
   
  -  static Future<Map<String, dynamic>> _compileDebug({
  +  Future<Map<String, dynamic>> _compileDebug({
  +    required bool deleteGradleCache,
       required bool clean,
       required String metricKey,
     }) async {
       if (clean) {
         await flutter('clean');
  +    }
  +    if (deleteGradleCache) {
  +      final Directory gradleCacheDir = Directory('$testDirectory/android/.gradle');
  +      rmTree(gradleCacheDir);
       }
       final Stopwatch watch = Stopwatch();
       final List<String> options = <String>['--debug'];
  
positive.code:     });
    }
  
    static Future<Map<String, dynamic>> _compileApp({ bool reportPackageContentSizes = false }) async {
      await flutter('clean');
      final Stopwatch watch = Stopwatch();
      int releaseSizeInBytes;
      final List<String> options = <String>['--release'];
  
negative.code:         // Build after "edit" without clean should be faster than first build
          final Map<String, dynamic> compileAfterEditDebug = await _compileDebug(
            clean: false,
            deleteGradleCache: false,
            metricKey: 'debug_compile_after_edit_millis',
          );
          metrics.addAll(compileAfterEditDebug);
  