File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
12import org.gradle.api.tasks.testing.logging.TestExceptionFormat
3+ import org.jetbrains.intellij.tasks.PrepareSandboxTask
24import org.jetbrains.intellij.tasks.RunPluginVerifierTask.FailureLevel.DEPRECATED_API_USAGES
35import org.jetbrains.intellij.tasks.RunPluginVerifierTask.FailureLevel.INVALID_PLUGIN
46
@@ -14,6 +16,7 @@ plugins {
1416 alias(libs.plugins.intellij)
1517 alias(libs.plugins.versions)
1618 alias(libs.plugins.github.release)
19+ alias(libs.plugins.shadow)
1720}
1821
1922dependencies {
@@ -54,6 +57,20 @@ tasks.publishPlugin {
5457 channels.set(listOf (project.version.toString().split(' -' ).getOrElse(1 ) { " default" }.split(' .' ).first()))
5558}
5659
60+ tasks {
61+ withType<ShadowJar > {
62+ archiveBaseName = " detekt-intellij-plugin-shaded"
63+ mergeServiceFiles()
64+ relocate(" org.jetbrains.kotlin" , " detekt.shadow.org.jetbrains.kotlin" )
65+ }
66+ }
67+
68+ tasks.withType<PrepareSandboxTask > {
69+ pluginJar = project.tasks.withType<ShadowJar >().getByName(" shadowJar" ).archiveFile
70+ // disable to collect libraries located in runtime classpath (replace with empty file collection)
71+ runtimeClasspathFiles = project.objects.fileCollection()
72+ }
73+
5774intellij {
5875 pluginName.set(" Detekt IntelliJ Plugin" )
5976 version.set(" 2022.1.4" )
You can’t perform that action at this time.
0 commit comments