native icon indicating copy to clipboard operation
native copied to clipboard

`build.gradle` and `build.gradle.old` issues

Open HosseinYousefi opened this issue 2 years ago • 3 comments

We're currently changing build.gradle to build.gradle.old and changing the original to have an extra method. Sometimes, after running the script, the gradle file does not go back to its original version.

HosseinYousefi avatar Feb 03 '23 09:02 HosseinYousefi

  1. Can an atExit hook and / or interrupt handler be added to handle any build.gradle.old? Is that possible in Dart?

mahesh-hegde avatar Mar 23 '23 15:03 mahesh-hegde

The reason I have this issue open is to find an entirely different way to deal with gradle instead of changing build.gradle in place.

HosseinYousefi avatar Mar 23 '23 15:03 HosseinYousefi

The reason I have this issue open is to find an entirely different way to deal with gradle instead of changing build.gradle in place.

This might be possible if we can write gradle plugins which

  • Don't have to be declared in gradle.build files, but rather supplied at execution time.

  • Can hook into lifecycle stages.

This will be generally useful, because I have another patch which can get source JARs for all gradle dependencies which uses same stub mechanism.

Maybe someone at Flutter team good with gradle can give some pointers. If such extension points exist, whether in groovy itself or in Java.

mahesh-hegde avatar Apr 03 '23 14:04 mahesh-hegde