All Downloads are FREE. Search and download functionalities are using the official Maven repository.

includes.guides.gradle-build.adoc Maven / Gradle / Ivy

There is a newer version: 4.1.1
Show newest version
///////////////////////////////////////////////////////////////////////////////

    Copyright (c) 2020, 2024 Oracle and/or its affiliates.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

///////////////////////////////////////////////////////////////////////////////

ifndef::rootdir[:rootdir: {docdir}/../..]

== Introduction

While most of Helidon's examples use Maven, you can also use Helidon
with a Gradle project. Gradle 8.4+ is required to build Helidon 4 projects.

== Gradle Example

The Helidon
link:{helidon-github-examples-url}/quickstarts/helidon-quickstart-{flavor-lc}[Quickstart Example]
contains a `build.gradle` file that you can use as an example for building
your Helidon application using Gradle.

== Dependency Management

Gradle supports using a Maven POM to perform dependency management. You
can use the Helidon Dependencies POM for this purpose. Once you import
the Helidon dependency management POM you can specify dependencies
without providing a version.


[source,xml]
.Using the Helidon Dependencies POM
----
dependencies {
    // import Helidon dependency management
    implementation enforcedPlatform("io.helidon:helidon-dependencies:${project.helidonversion}")

    implementation 'io.helidon.microprofile.bundles:helidon-microprofile'
    implementation 'org.glassfish.jersey.media:jersey-media-json-binding'

    runtimeOnly 'io.smallrye:jandex'
    runtimeOnly 'jakarta.activation:jakarta.activation-api'

    testCompileOnly 'org.junit.jupiter:junit-jupiter-api:'
}
----




© 2015 - 2024 Weber Informatics LLC | Privacy Policy