$ show GradleUp/gratatouille
Gratatouille is a framework for building Gradle plugins using a functional programming approach. It processes Kotlin functions annotated with @GTask, @GPlugin, and @GExtension via KSP to generate complete Gradle plugin implementations including task classes, workers, entry points, and descriptor files. The framework enforces classloader isolation to prevent dependency conflicts and provides automatic build caching, parallel execution, and automatic task wiring. Generated code follows Gradle best practices with proper input/output annotations and up-to-date checks.
The LLM identified 3 files worth highlighting for reuse:
Contains isolated utility functions for deep object copying (isolate()), file collection isolation (isolateFileCollection()), and exception unwrapping (invokeOrUnwrap()). These functions are self-contained, have no external dependencies beyond Java stdlib, and solve common problems in Gradle plugin development related to classloader isolation and safe object copying. They could be extracted and used in any Java/Kotlin project needing similar functionality.
This BuildService implementation provides a thread-safe cache for URLClassLoaders keyed by classpath URIs. It solves the common problem of efficiently creating isolated classloaders for Gradle workers while preventing memory leaks through proper cleanup in the close() method. The pattern of caching expensive resources keyed by their dependencies is broadly applicable beyond Gradle plugin development.
Contains capitalizeFirstLetter() and decapitalizeFirstLetter() functions that handle edge cases properly (checking if characters are letters before changing case). These are simple but robust implementations that avoid common pitfalls with locale-specific case conversion. They have no dependencies and could be used in any text processing scenario.