Plugin class: name.remal.gradle_plugins.plugins.classes_relocation.ClassesRelocationPlugin

plugins {
    id 'name.remal.classes-relocation' version '1.5.0'
plugins {
    id("name.remal.classes-relocation") version "1.5.0"


The plugin applies these plugins:


This plugin processes compilation result of all tasks of type AbstractCompile for main source-set. It relocates dependency classes by copying them to the compiled classes directory adding prefix (from ClassesRelocationExtension.relocatedClassesPackageName) to relocated class names.

The functionality can be configured using created classesRelocation extension of type ClassesRelocationExtension.

relocateClasses configuration

Classes from dependencies defined in relocateClasses configuration will be relocated. All other dependencies of compileClasspath and runtimeClasspath will be excluded from relocation process.

If you want to exclude dependencies from relocation, add them to excludeFromClassesRelocation configuration.

compileOnly configuration extends relocateClasses.

RelocateClasses and RelocatePackages annotations

Classes set via name.remal.gradle_plugins.api.RelocateClasses and classes inside packages set via name.remal.gradle_plugins.api.RelocatePackages will be relocated for the class annotated with these annotations. Only dependencies from excludeFromForcedClassesRelocation configuration will be excluded.

These annotations are accessible using name.remal:gradle-plugins-api:1.5.0 Maven compile-only dependency.



Property Type Description
relocatedClassesPackageName String Base package name for relocated classes. Default value: <project group>.<project name>.internal._relocated.