Groovy 6: Writing Less Code and Saying More Groovy 6 adds a new HTTP Builder module, async/await concurrency, for await streaming, contracts and additional compiler support to the JVM language, according to an article detailing the release. The article illustrates the changes with a customer-report service that fetches data from four backend APIs, showing that an @HttpBuilderClient interface can return a CompletableFuture and that async/await starts the four independent calls concurrently before await constructs the report. The article argues that making program semantics explicit helps both developers and AI coding agents. Groovy is a JVM language that combines Java interoperability with an expressive syntax, supporting both static and dynamic typing. Groovy 6 builds on that foundation with modern concurrency, streaming, HTTP clients, contracts and additional compiler support. This article looks at those capabilities through one small example — a service that assembles a customer report — and at why making program semantics explicit can help both developers and AI coding agents. In this article: Groovy 6 brings together several changes that make everyday code easier to write, but some of the most interesting improvements are not about saving keystrokes. They are about making the structure and guarantees of a program more explicit. Consider a small service that assembles a customer report. It needs customer details, orders, incidents, and usage data from four backend APIs. CustomerReport createReport String customerId { def customer = customerApi.get customerId def orders = orderApi.findFor customerId def incidents = incidentApi.findFor customerId def usage = usageApi.events customerId new CustomerReport customer: customer, orders: orders, incidents: incidents, usage: usage } There is nothing particularly Groovy 6-specific here. It is ordinary application code. The interesting question is how much ceremony is needed when the APIs are asynchronous, the usage data is large, and the resulting objects have rules that callers should not violate. Groovy 6 includes a new HTTP Builder module. Its declarative client lets an API be described as an interface: @HttpBuilderClient 'https://customers.example' interface CustomerApi { @Get '/customers/{id}' Customer get String id } The interface describes the endpoint, path and return type. There is no client implementation in the example. The same API can return a CompletableFuture when the report should fetch several independent resources concurrently: @HttpBuilderClient 'https://customers.example' interface CustomerApi { @Get '/customers/{id}' CompletableFuture