Recent Posts
Archives

Posts Tagged ‘Gradle’

PostHeaderIcon [DevoxxGR2025] Nx for Gradle – Faster Builds, Better DX

Katerina Skroumpelou, a senior engineer at Nx, delivered a 15-minute talk at Devoxx Greece 2025, showcasing how the @nx/gradle plugin enhances Gradle builds for monorepos, improving developer experience (DX).

Streamlining Gradle Monorepos

Skroumpelou introduced Nx as a build system optimized for monorepos, used by over half of Fortune 500 companies. Gradle’s strength lies in managing multi-project setups, where subprojects (e.g., core, API) share dependencies and tasks. However, large repositories grow complex, slowing builds. Nx integrates seamlessly with Gradle, acting as a thin layer atop existing projects without requiring a rewrite. By running nx init in a Gradle project, developers enable Nx’s smart task management, preserving Gradle’s functionality while adding efficiency.

Optimizing CI Pipelines

Slow CI pipelines frustrate developers and inflate costs. Skroumpelou explained how Nx slashes CI times through distributed task execution, caching, and affected task detection. Unlike Gradle’s task-level parallelism and caching, Nx identifies changes in a pull request and runs only impacted tasks, skipping unaffected ones. For instance, a 30-minute pipeline could drop to five minutes by leveraging Nx’s project graph to avoid redundant builds or tests. Nx also splits large tasks, like end-to-end tests, into smaller, distributable units, further accelerating execution.

Handling Flaky Tests

Flaky tests disrupt workflows, forcing developers to rerun entire pipelines. Nx automatically detects and retries failed tests in isolation, preventing delays. Skroumpelou highlighted that this automation ensures pipelines remain efficient, even during meetings or interruptions. Nx, open-source under the MIT license, integrates with tools like VS Code, offering developers a free, scalable solution to enhance Gradle-based CI.

Links

PostHeaderIcon [DevoxxGR2025] Nx for Gradle – Faster Builds, Better DX

Katerina Skroumpelou, a senior engineer at Nx, delivered a 15-minute talk at Devoxx Greece 2025, showcasing how the @nx/gradle plugin enhances Gradle builds for monorepos, improving developer experience (DX).

Streamlining Gradle Monorepos

Skroumpelou introduced Nx as a build system optimized for monorepos, used by over half of Fortune 500 companies. Gradle’s strength lies in managing multi-project setups, where subprojects (e.g., core, API) share dependencies and tasks. However, large repositories grow complex, slowing builds. Nx integrates seamlessly with Gradle, acting as a thin layer atop existing projects without requiring a rewrite. By running nx init in a Gradle project, developers enable Nx’s smart task management, preserving Gradle’s functionality while adding efficiency.

Optimizing CI Pipelines

Slow CI pipelines frustrate developers and inflate costs. Skroumpelou explained how Nx slashes CI times through distributed task execution, caching, and affected task detection. Unlike Gradle’s task-level parallelism and caching, Nx identifies changes in a pull request and runs only impacted tasks, skipping unaffected ones. For instance, a 30-minute pipeline could drop to five minutes by leveraging Nx’s project graph to avoid redundant builds or tests. Nx also splits large tasks, like end-to-end tests, into smaller, distributable units, further accelerating execution.

Handling Flaky Tests

Flaky tests disrupt workflows, forcing developers to rerun entire pipelines. Nx automatically detects and retries failed tests in isolation, preventing delays. Skroumpelou highlighted that this automation ensures pipelines remain efficient, even during meetings or interruptions. Nx, open-source under the MIT license, integrates with tools like VS Code, offering developers a free, scalable solution to enhance Gradle-based CI.

Links

PostHeaderIcon Gradle: A Love-Hate Journey at Margot Bank

At Devoxx France 2019, David Wursteisen and Jérémy Martinez, developers at Margot Bank, delivered a candid talk on their experience with Gradle while building a core banking system from scratch. Their 45-minute session, “Gradle, je t’aime: moi non plus,” explored why they chose Gradle over alternatives, its developer-friendly features, script maintenance strategies, and persistent challenges like memory consumption. This post dives into their insights, offering a comprehensive guide for developers navigating build tools in complex projects.

Choosing Gradle for a Modern Banking System

Margot Bank, a startup redefining corporate banking, embarked on an ambitious project in 2017 to rebuild its IT infrastructure, including a core banking system (CBS) with Kotlin and Java modules. The CBS comprised applications for payments, data management, and a central “core” module, all orchestrated with microservices. Selecting a build tool was critical, given the need for speed, flexibility, and scalability. The team evaluated Maven, SBT, Bazel, and Gradle. Maven, widely used in Java ecosystems, lacked frequent updates, risking obsolescence. SBT’s Scala-based DSL added complexity, unsuitable for a Kotlin-focused stack. Bazel, while powerful for monorepos, didn’t support generic languages well. Gradle emerged as the winner, thanks to its task-based architecture, where tasks like compilejar, and assemble form a dependency graph, executing only modified components. This incremental build system saved time, crucial for Margot’s rapid iterations. Frequent releases (e.g., Gradle 5.1.1 in 2019) and a dynamic Groovy DSL further cemented its appeal, aligning with Devoxx’s emphasis on modern build tools.

Streamlining Development with Gradle’s Features

Gradle’s developer experience shone at Margot Bank, particularly with IntelliJ IDEA integration. The IDE auto-detected source sets (e.g., maintestintegrationTest) and tasks, enabling seamless task execution. Eclipse support, though less polished, handled basic imports. The Gradle Wrapper, a binary committed to repositories, automated setup by downloading the specified Gradle version (e.g., 5.1.1) from a custom URL, secured with checksums. This ensured consistency across developer machines, a boon for onboarding. Dependency management leveraged dynamic configurations like api and implementation. For example, marking a third-party client like AmazingMail as implementation in a web app module hid its classes from transitive dependencies, reducing coupling. Composite builds, introduced in recent Gradle versions, allowed local projects (e.g., a mailer module) to be linked without publishing to Maven Local, streamlining multi-project workflows. A notable pain point was disk usage: open-source projects’ varying Gradle versions accumulated 4GB on developers’ machines, as IntelliJ redundantly downloaded sources alongside binaries. Addressing an audience question, the team emphasized selective caching (e.g., wrapper binaries) to mitigate overhead, highlighting Gradle’s balance of power and complexity.

Enhancing Builds with Plugins and Kotlin DSL

For script maintainers, standardizing configurations across Margot’s projects was paramount. The team developed an internal Gradle plugin to centralize settings for linting (e.g., Ktlint), Nexus repositories, and releases. Applied via apply plugin: 'com.margotbank.standard', it ensured uniformity, reducing configuration drift. For project-specific logic, buildSrc proved revolutionary. This module housed Kotlin code for tasks like version management, keeping build.gradle files declarative. For instance, a Versions.kt object centralized dependency versions (e.g., junit:5.3.1), with unused ones grayed out in IntelliJ for cleanup. Migrating from Groovy to Kotlin DSL brought static typing benefits: autocompletion, refactoring, and navigation. A sourceSet.create("integrationTest") call, though verbose, clarified intent compared to Groovy’s dynamic integrationTest {}. Migration was iterative, file by file, avoiding disruptions. Challenges included verbose syntax for plugins like JaCoCo, requiring explicit casts. A buildSrc extension for commit message parsing (e.g., extracting Git SHAs) exemplified declarative simplicity. This approach, inspired by Devoxx’s focus on maintainable scripts, empowered developers to contribute to shared tooling, fostering collaboration across teams.

Gradle’s performance, driven by daemons that keep processes in memory, was a double-edged sword. Daemons reduced startup time, but multiple instances (e.g., 5.1.1 and 5.0.10) occasionally ran concurrently, consuming excessive RAM. On CI servers, Gradle crashed under heavy loads, prompting tweaks: disabling daemons, adjusting Docker memory, and upgrading to Gradle 4.4.5 for better memory optimization. Diagnostics remained elusive, as crashes stemmed from either Gradle or the Kotlin compiler. Configuration tweaks like enabling caching (org.gradle.caching=true) and parallel task execution (org.gradle.parallel=true) improved build times, but required careful tuning. The team allocated maximum heap space (-Xmx4g) upfront to handle large builds, reflecting Margot’s resource-intensive CI pipeline. An audience question on caching underscored selective imports (e.g., excluding redundant sources) to optimize costs. Looking ahead, Margot planned to leverage build caching for granular task reuse and explore tools like Build Queue for cleaner pipelines. Despite frustrations, Gradle’s flexibility and evolving features—showcased at Devoxx—made it indispensable, though memory management demanded ongoing vigilance.

Links :

Hashtags: #Gradle #KotlinDSL #BuildTools #DavidWursteisen #JeremyMartinez #DevoxxFrance2019

PostHeaderIcon Retours du Devoxx France 2016 (4): Gradle: Harder, Better, Stronger, Faster

La conference est animee par Andres Almiray de Canoo Fellow, un Java Champion qui nous vient du Mexique. Officiellement, il s’agit de presenter Gradle pour un usage avance ; neanmoins, Andres dissimule a peine son intention de nous faire quitter Maven pour Gradle.

Read the rest of this entry »

PostHeaderIcon [DevoxxFR2013] Les Cast Codeurs Podcast: Reflecting on Four Years of Java Community Insights

Lecturer

Emmanuel Bernard leads development on Hibernate and Quarkus at Red Hat, with expertise in ORM and data management. A Java Champion, he contributes to standards like JPA and Bean Validation. Vincent Massol acts as CTO at XWiki SAS, committing to the XWiki open-source project. He co-authored books on Maven and JUnit, and participates in Les Cast Codeurs podcast. Antonio Goncalves, Principal Software Engineer at Microsoft, founded the Paris Java User Group and authored books on Java EE. He engages in JCP expert groups for Java EE specifications. Guillaume Laforge advocates for Google Cloud Platform, previously managing Groovy. A Java Champion, he co-authored “Groovy in Action” and co-hosts Les Cast Codeurs. Arnaud Héritier manages software factories, committing to Apache Maven. He authored books on Maven and productivity, sharing at community events.

Abstract

This article evaluates the live recording of Les Cast Codeurs Podcast’s fourth anniversary at Devoxx France, hosted by Emmanuel Bernard, Vincent Massol, Antonio Goncalves, Guillaume Laforge, and Arnaud Héritier. It dissects discussions on Java ecosystem trends, conference experiences, and community dynamics. Framed as an informal yet insightful session, the analysis reviews topics like Java 8 features, build tools evolution, and event organization challenges. It assesses the podcast’s role in disseminating knowledge, implications for developer engagement, and reflections on technological shifts. Through anecdotes and audience interactions, it highlights the blend of humor, critique, and foresight that defines the podcast’s appeal in fostering a vibrant French Java community.

Origins and Evolution of Les Cast Codeurs

Les Cast Codeurs emerged from informal discussions among Java enthusiasts, evolving into a staple French-language podcast on Java and related technologies. Emmanuel recounts its inception four years prior, inspired by English counterparts like Java Posse. Initial episodes faced technical hurdles—recording via Skype with varying quality—but persistence yielded over 80 episodes by this milestone.

The format balances news, interviews, and debates, covering Java SE/EE advancements, tools like Maven and Gradle, and broader topics such as cloud computing. Vincent notes the shift from ad-hoc sessions to structured ones, incorporating listener feedback via tools like Google Forms for surveys. This anniversary episode, recorded live at Devoxx France, exemplifies community integration, with audience polls on attendance and preferences.

Growth metrics reveal listenership spikes around releases, averaging thousands per episode. Arnaud highlights international reach, with listeners in French-speaking regions and beyond, underscoring the podcast’s role in bridging linguistic gaps in tech discourse.

Navigating Java Ecosystem Trends and Challenges

Discussions delve into Java 8’s lambda expressions and streams, praised for enhancing code conciseness. Guillaume shares experiences with Groovy’s functional paradigms, drawing parallels to Java’s modernization. Critiques address Oracle’s stewardship post-Sun acquisition, with concerns over delayed releases and community involvement.

Build tools spark debate: Maven’s ubiquity contrasts with Gradle’s rising popularity for Android and flexibility. Antonio advocates for tool-agnostic approaches, while Emmanuel warns of migration costs. The panel concurs on the need for better dependency management, citing transitive conflicts as persistent issues.

Cloud and DevOps trends feature prominently, with reflections on PaaS like Cloud Foundry. Vincent emphasizes automation’s impact on deployment cycles, reducing manual interventions. Security vulnerabilities, like recent Java exploits, prompt calls for vigilant updates and sandboxing.

Community Engagement and Event Reflections

Devoxx France’s organization draws praise for inclusivity and speaker diversity. Arnaud recounts logistical feats—managing 1,000 attendees with volunteer support—highlighting French JUGs’ collaborative spirit. Comparisons to international Devoxx events note unique cultural flavors, like extended lunches fostering networking.

Audience polls reveal demographics: predominantly male, with calls for greater female participation. The panel encourages involvement in JUGs and conferences, citing benefits for skill-sharing and career growth. Humorous anecdotes, like Antonio’s “chouchou” moniker from keynote interactions, lighten the mood, reinforcing the podcast’s approachable style.

Reflections on past guests—industry leaders like James Gosling—underscore the platform’s prestige. Future plans include themed episodes on emerging tech like AI in Java.

Technological Shifts and Future Directions

The session probes Java’s relevance amid alternatives like Scala or Kotlin. Emmanuel defends Java’s ecosystem maturity, while Guillaume highlights Groovy’s interoperability. Discussions on open-source sustainability address funding models, with kudos to foundations like Apache.

Implications for education emphasize podcasts as accessible learning tools, supplementing formal training. The format’s conversational tone demystifies complex topics, aiding newcomers.

In conclusion, Les Cast Codeurs embodies community-driven knowledge dissemination, adapting to Java’s evolution while nurturing inclusivity. Its anniversary celebrates not just longevity but sustained impact on developer discourse.

Links: