Skip to content

Commit

Permalink
Keep providers across ShadowJar's minimize()
Browse files Browse the repository at this point in the history
by naming them explicitly in the code.
  • Loading branch information
ting-yuan committed Sep 20, 2023
1 parent a2a4445 commit f747868
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ import org.jetbrains.kotlin.platform.jvm.JvmPlatforms
import org.jetbrains.kotlin.psi.KtFile
import java.nio.file.Files
import java.nio.file.Paths
import org.jetbrains.kotlin.load.java.ErasedOverridabilityCondition
import org.jetbrains.kotlin.load.java.FieldOverridabilityCondition

class KotlinSymbolProcessing(
val kspConfig: KSPJvmConfig,
Expand Down Expand Up @@ -636,3 +638,9 @@ fun String?.toKotlinVersion(): KotlinVersion {
}
}
}

// Workaround for ShadowJar's minimize, whose configuration isn't very flexible.
internal val DEAR_SHADOW_JAR_PLEASE_DO_NOT_REMOVE_THESE = listOf(
FieldOverridabilityCondition::class.java,
ErasedOverridabilityCondition::class.java,
)

0 comments on commit f747868

Please sign in to comment.