Open NikolayMetchev opened 6 years ago
Hi @NikolayMetchev
I created my own class for Angular project that is cacheable and may be useful for you:
@CacheableTask
public class CacheableYarnTask extends YarnTask {
@InputFiles
FileCollection sourceFiles = project.files('client/src', 'client/package.json', 'client/.angular-cli.json')
@OutputDirectory
File outputDir = project.file("client/dist")
}
@sergey-morenets Where did you place this new CacheableYarnTask? Is this a patch for the gradle plugin? Thanks!
Hi @johannespostler
This is not a patch for the Gradle plugin, I put this class into my build.gradle and reuse it.
This class is for Angular 5. If you have Angular 6 project then you should replace .angular-cli.json with angular.json
It would be great if the plugin took full advantage of the Gradle build cache for NpmTasks. This would greatly speed up build times. Many thanks