name.remal.classes-relocation

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

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

 

The plugin applies these plugins:

 

This plugin processes compilation result of all tasks of type AbstractCompile. It relocates dependency classes by copying them to the compiled classes directory adding <project group>.<project name>.internal._relocated. prefix 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.0.178 Maven compile-only dependency.

 

name.remal.gradle_plugins.plugins.classes_relocation.ClassesRelocationExtension

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