com.github.jengelman.gradle.plugins.shadow.ShadowBasePlugin.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of shadow-gradle-plugin Show documentation
Show all versions of shadow-gradle-plugin Show documentation
Gradle plugin to create fat/uber JARs, apply file transforms, and relocate packages for applications and libraries. Gradle version of Maven's Shade plugin.
package com.github.jengelman.gradle.plugins.shadow
import com.github.jengelman.gradle.plugins.shadow.tasks.KnowsTask
import org.gradle.api.GradleException
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.util.GradleVersion
public abstract class ShadowBasePlugin : Plugin {
override fun apply(project: Project) {
if (GradleVersion.current() < GradleVersion.version("8.3")) {
throw GradleException("This version of Shadow supports Gradle 8.3+ only. Please upgrade.")
}
project.extensions.create(EXTENSION_NAME, ShadowExtension::class.java, project)
project.configurations.create(CONFIGURATION_NAME)
project.tasks.register(KnowsTask.NAME, KnowsTask::class.java) { knows ->
knows.group = GROUP_NAME
knows.description = KnowsTask.DESC
}
}
public companion object {
public const val SHADOW: String = "shadow"
public const val GROUP_NAME: String = SHADOW
public const val EXTENSION_NAME: String = SHADOW
public const val CONFIGURATION_NAME: String = SHADOW
public const val COMPONENT_NAME: String = SHADOW
public const val DISTRIBUTION_NAME: String = SHADOW
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy