Open Editions

Open Editions

Come for answers. Stay for best practices. All we’re missing is you.


#Data
#Businessautomation
#Data
 View Only

Flexible Build Options: BAMOE 9.4.0 Now Supports Gradle 9.2

By Yeser Amer posted 15 days ago

  

Flexible Build Options: BAMOE 9.4.0 Now Supports Gradle 9.2

Authors: Yeser Amer and Gabriele Cardosi

BAMOE 9.4.0 now supports Gradle 9.2, giving you more flexibility in choosing the build tool that fits your organization. Whether you prefer Maven or Gradle, you can now build Business Services using the tools that align with your development standards.

Why Build Tool Choice Matters

Every organization has its own development standards and tooling preferences. According to the JetBrains Developer Ecosystem Survey 2023, the Java ecosystem includes diverse build tool adoption, with both Maven and Gradle serving significant portions of the enterprise development community.

BAMOE 9.4.0 now gives you the flexibility to choose the build tool that fits your organization's needs. Whether your team has standardized on Gradle or you're exploring it for specific project requirements, you can now build Business Services using the tools you're already familiar with.

Why organizations choose Gradle:

  • Performance at scale – Incremental builds and advanced caching deliver faster build times, especially valuable in large multi-module projects.
  • Flexible configuration – Programmatic build scripts (Groovy or Kotlin DSL) offer concise, maintainable configurations that adapt to complex requirements.
  • Advanced dependency management – Powerful resolution capabilities handle complex scenarios like version conflicts and transitive dependencies effectively.
  • Modern development integration – Seamless support for continuous integration, containerization, and cloud-native deployment workflows.

This enhancement responds directly to customer requests, making BAMOE accessible to organizations that have adopted Gradle as their standard build tool. Now you can work with BAMOE using the build system that best fits your development workflow.

Getting Started with Gradle

BAMOE 9.4.0 makes it easy to work with Gradle, whether you're starting a new project or migrating an existing one.

Keep in mind that Gradle configuration and commands vary depending on the framework you're using. Spring Boot and Quarkus each provide their own Gradle plugins with specific tasks and requirements, so the accelerators and examples are tailored to each framework to ensure proper integration.

Creating a New Project with Gradle

The fastest way to start with Gradle is using the new accelerators in IBM BAMOE Canvas. BAMOE 9.4.0 introduces four new Gradle-based accelerators that give you a fully configured project in seconds:

  • Workflows (Quarkus + Gradle) – Build workflow automation with Quarkus and Gradle
  • Workflows (Spring Boot + Gradle) – Build workflow automation with Spring Boot and Gradle
  • Decisions (Quarkus + Gradle) – Create decision services with Quarkus and Gradle
  • Decisions (Spring Boot + Gradle) – Create decision services with Spring Boot and Gradle

To create a new Gradle-based project:

  1. Open IBM BAMOE Canvas
image
  1. Select one of the new Gradle accelerators based on your framework preference (Quarkus or Spring Boot)
image

  1. Click "Apply" to generate your project with Gradle 9.2 pre-configured
image

Your new project includes everything you need: build configuration, dependencies, project structure, and the Gradle wrapper—ready to start developing immediately. The generated project also includes a README file with all the commands you need to build, run in dev mode, and deploy your Business Service.

The Gradle configuration in your generated project is pre-optimized for BAMOE Business Services. If you need to customize the build setup, edit the configuration carefully—removing existing settings could affect the build process and runtime behavior.

Migrating an Existing Maven Project to Gradle

If you have an existing Maven-based Business Service, you can migrate it to Gradle by replacing your Maven configuration files with Gradle equivalents:

gradle.properties – Sets properties that will be referenced from settings.gradle and build.gradle. For more details, refer to the Gradle documentation.

settings.gradle – The entry point of every Gradle project. Declares plugin repositories, which are essential for Kogito code generation to work correctly. For more details, refer to the Gradle documentation.

build.gradle – Defines build configuration, tasks, and plugins. Declares your third-party dependencies (the same dependencies from your pom.xml should be declared here) and includes the necessary Kogito code generation task steps through either the quarkus-gradle-plugin or kogito-gradle-plugin. For Spring Boot projects, this file also includes custom tasks that fully manage the Kogito code generation phase—these tasks are pre-configured and should not be modified. For more details, refer to the Gradle documentation.

The easiest way to understand the required structure is to create a new project using one of the Gradle accelerators and use it as a reference for your migration. Alternatively, you can explore these Gradle example projects:

  • process-compact-architecture-gradle
  • process-compact-architecture-springboot-gradle
  • dmn-quarkus-example-gradle
  • rules-quarkus-helloworld-gradle
  • ruleunit-quarkus-helloworld-gradle

For detailed migration guidance, refer to the BAMOE documentation.

Working with Gradle in BAMOE

Connecting to BAMOE Maven Repository

When using Gradle, you need to configure repository access differently than Maven. Unlike Maven, Gradle does not use the settings.xml file for repository configuration. The recommended approach is to use Gradle Initialization Scripts. These scripts run during the initialization phase of any Gradle-based project on your machine:

  1. Create the initialization scripts directory: ~/.gradle/init.d/
  2. Create a bamoe.gradle file in this directory
  3. Configure your BAMOE Maven Repository connection in this file

This approach ensures that all your Gradle projects can access the BAMOE Maven Repository without needing to configure each project individually. For the specific configuration details, refer to the BAMOE documentation.

Command Reference

Whether you're using Maven or Gradle, here are the common commands for building and running your Business Services:

Spring Boot Projects

Operation Maven Gradle
Build mvn clean install ./gradlew clean build
Run Dev Mode mvn spring-boot:run ./gradlew bootRun
Test mvn test ./gradlew test
Package mvn package ./gradlew bootJar

Quarkus Projects

Operation Maven Gradle
Build mvn clean install ./gradlew clean build
Run Dev Mode mvn quarkus:dev ./gradlew quarkusDev
Test mvn test ./gradlew test
Package mvn package ./gradlew build
Native Build mvn package -Dnative ./gradlew build -Dquarkus.native.enabled=true

Conclusion

With Gradle 9.2 support in BAMOE 9.4.0, you now have the flexibility to choose the build tool that best fits your organization's standards and development workflow. Whether you prefer Maven or Gradle, BAMOE supports both, giving you the freedom to work with the tools you know and trust.

This enhancement reflects our commitment to meeting the diverse needs of the enterprise Java community and providing you with the flexibility to build Business Services your way.

Related Resources:


#community-stories1
0 comments
20 views

Permalink