////
This guide is maintained in the main Quarkus repository
and pull requests should be submitted there:
https://github.com/quarkusio/quarkus/tree/master/docs/src/main/asciidoc
////
= Quarkus - Gradle Plugin Repositories

include::./attributes.adoc[]

// tag::repositories[]
Quarkus Gradle plugin is not yet published to the https://plugins.gradle.org/[Gradle Plugin Portal],
so you need to add the following at the top of your './settings.gradle' file:
[source, groovy, subs=attributes+]
----
pluginManagement {
    repositories {
        mavenCentral()
        gradlePluginPortal()
    }
    resolutionStrategy {
        eachPlugin {
            if (requested.id.id == 'io.quarkus') {
                useModule("io.quarkus:quarkus-gradle-plugin:${requested.version}")
            }
        }
    }
}
----

Or, if you use the Gradle Kotlin DSL, you need to add the following at the top of your './settings.gradle.kts' file:
[source, kotlin, subs=attributes+]
----
pluginManagement {
    repositories {
        mavenCentral()
        gradlePluginPortal()
    }
    resolutionStrategy {
        eachPlugin {
            if (requested.id.id == "io.quarkus") {
                useModule("io.quarkus:quarkus-gradle-plugin:${requested.version}")
            }
        }
    }
}
----

This won't be necessary anymore once the Quarkus Gradle plugin is published in the Gradle plugin portal.

// end::repositories[]
