Lock in $30 Savings on PRO—Offer Ends Soon! ⏳

Gratatouille: metaprogramming for your build-logic

Gratatouille: metaprogramming for your build-logic

mbonnin

April 14, 2024
Tweet

More Decks by mbonnin

Other Decks in Programming

Transcript

  1. Codegen 5 { sessions { nodes { language title startsAt

    speakers { name } } } } class Session(val nodes: List<Node>) class Node( val language: String, val title: String, val startsAt: DateTime, val speakers: List<Speaker> ) class Speaker(val name: String)
  2. 6

  3. 7

  4. Classloaders 8 • Several ones ◦ root project classloader ◦

    subproject classloader ◦ buildSrc classloader • See Crash course in classloaders
  5. 9

  6. 11 Yes, BUT… • Slow to compile • Duplicates bytecode

    • Doesn’t fix everything GradleUp/Gr8 🐘🆙
  7. Other things 12 • Overlapping outputs • Build cache •

    Path sensitivity • Manual serialization • Parallel execution • Optional/nullable ⁉ • Type safety
  8. Status 15 • Mostly proof of concept • Branch of

    Apollo working with it • Single artifact mode • Testing