# Determine origin of gradle plugin

**URL:** <https://discuss.gradle.org/t/determine-origin-of-gradle-plugin/46331>\
**Category:** Help/Discuss\
**Created:** [August 23, 2023, 1:26pm UTC](https://discuss.gradle.org/t/determine-origin-of-gradle-plugin/46331 "2023-08-23T13:26:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nroi](https://avatars.discourse-cdn.com/v4/letter/n/b38774/32.png) [@nroi](https://discuss.gradle.org/u/nroi)\
**Post date:** [August 23, 2023, 1:26pm UTC](https://discuss.gradle.org/t/determine-origin-of-gradle-plugin/46331/1 "2023-08-23T13:26:06Z")

</div>

I have a Kotlin + Spring Boot project with multiple projects (therefore, multiple `build.gradle` files). One particular `build.gradle` file contains the following:

```gradle
plugins {
    id('kotlin-kapt')
}

```

I would like to figure out where this `kotlin-kapt` dependency is coming from. I mean, there has to be something specified within a `dependency {} ` block or so that’s required for `kotlin-kapt` to be resolved successfully. What is the most efficient way to figure this out? Is there maybe a gradle command to show such dependencies?

What I’ve tried already is to execute the following gradle command:

```gradle
./gradlew :my-project:my-subproject:dependencies

```

The output includes something like the following:

```gradle
kapt
\--- org.hibernate:hibernate-jpamodelgen:x.x.x.Final
     +--- org.jboss.logging:jboss-logging:x.x.x.Final
     +--- javax.xml.bind:jaxb-api:x.x.x
     | \--- javax.activation:javax.activation-api:x.x.x
     \--- org.glassfish.jaxb:jaxb-runtime:x.x.x
          +--- javax.xml.bind:jaxb-api:x.x.x (*)
          +--- org.glassfish.jaxb:txwx:x.x.x
         [… more]
          \--- javax.activation:javax.activation-api:x.x.x

```

but I don’t think this really tells me where kotlin-kapt is coming from, because I don’t expect hibernate-jpamodelgen to include kapt. The relation is probably more in the other direction, in the sense that the kapt annotation processor is applied to jpamodelgen.

Any help is appreciated!

---

<div class="post-metadata">

**Author:** ![Vampire](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/vampire/32/9082_2.png) [@Vampire](https://discuss.gradle.org/u/Vampire)\
**Post date:** [August 23, 2023, 2:10pm UTC](https://discuss.gradle.org/t/determine-origin-of-gradle-plugin/46331/2 "2023-08-23T14:10:43Z")

</div>

Don’t confuse project dependencies and build script / plugin dependencies.  
What you investigate and talk about are project dependencies and yes, what you display is what is used during `kapt` execution.

The task you are after is `buildEnvironment`, not `dependencies`, as that shows exactly those dependencies.  
But no, you usually do not explicitly depend on such plugins.  
To start with, `kotlin-kapt` is deprecated and you should use `org.jetbrains.kotlin.kapt`.  
And then, if you would have `id('org.jetbrains.kotlin.kapt') version 'xxx'`, it would be resolved through the marker artifact that is `org.jetbrains.kotlin.kapt:org.jetbrains.kotlin.kapt.gradle.plugin:xxx` from the configured plugin repositories in the settings script.  
As you just have an ID without version, that means the plugin is already on the classpath, probably because you have the Kotlin Gradle plugin already applied or added to the classpath of `:my-project:my-subproject`, `:my-project`, or `:`.
