Where does gradle stores the jars of external plug

2020-06-12 06:20发布

问题:

I am using an external gradle plugin called jsonschema2pojo. For that I added the following code inside build.gradle file and I could successfully use that plugin. But I cannot locate the jar that must be downloaded and stored somewhere.

Where do I find the jar that is downloaded for external plugin?

I looked inside ~/.gradle/caches/ folder. For me the caches folder contains the following subfolders: 2.11, 3.3, jars-1, modules-2, artifacts-24, jars-2.

In this project I am using gradle wrapper (with gradle version 2.11) to build the project. So I looked inside ~/.gradle/caches/2.11 folder which contains the following subdirectories: plugin-resolution, scripts, workerMain.

I was expecting a jar starts with jsonschema2pojo somewhere here, but could not locate one.

buildscript {
    repositories {
        mavenLocal()
    }

    dependencies {
        classpath 'org.jsonschema2pojo:jsonschema2pojo-gradle-plugin:0.4.29'
    }
}

apply plugin: 'jsonschema2pojo'

回答1:

You will find the plugin .jar file inside the ~/.gradle/caches/modules-2/files-2.1/ folder.



标签: gradle