Where Gradle plugins are?

Viewed 503

I have a build.gradle file with a bunch of different plugins...

apply plugin: 'com.android.application'
apply plugin: "de.mannodermaus.android-junit5"
apply plugin: 'de.mobilej.unmock'
apply plugin: "maven-publish"
apply plugin: "com.jfrog.artifactory"

but I can't find where there are all defined (classes etc.). Where do I find them locally?

2 Answers

This is $HOME/.gradle/caches/5.4.1/scripts-remapped/ for the classes (at least found one plugin in there; directory scripts is for the buildscript) and $HOME/.gradle/caches/modules-2/files-2.1 for the downloaded JAR plugin files, but also downloaded AAR libraries.

Gradle's user home directory is in every cases where one can find (most of) them.

Here are the Gradle file structure

   ├── caches // (1)
│   ├── 4.8 // (2)
│   ├── 4.9 // (2)
│   ├── ⋮
│   ├── jars-3 // (3)
│   └── modules-2 // (3)
├── daemon // (4)
│   ├── ⋮
│   ├── 4.8
│   └── 4.9
├── init.d // (5)
│   └── my-setup.gradle
├── wrapper
│   └── dists // (6)
│       ├── ⋮
│       ├── gradle-4.8-bin
│       ├── gradle-4.9-all
│       └── gradle-4.9-bin
└── gradle.properties // (7)

Your all the applied plugin will be located inside .gradle/version/modules folder

Global cache directory (for everything that’s not project-specific)

Version-specific caches (e.g. to support incremental builds)

Shared caches (e.g. for artifacts of dependencies)

You can checkout this link for more information

Related