@@ -132,8 +132,23 @@ tasks.withType(ShadowJar::class.java).configureEach {
132132 configurations = listOf (packedJars)
133133 prefixesToRelocate.forEach { (f, t) ->
134134 relocate(f, t) {
135+ fun excludeEfficiently (pattern : String ) {
136+ if (pattern.startsWith(f))
137+ exclude(pattern)
138+ }
135139 // Do not rename this hardcoded string in XmlReader.
136- exclude(" com.intellij.projectService" )
140+ excludeEfficiently(" com.intellij.projectService" )
141+
142+ // Do not rename Nullable and NonNull/NotNull, which are checked in Kotlin compiler.
143+ excludeEfficiently(" org.jetbrains.annotations" )
144+ excludeEfficiently(" org.jetbrains.annotations.NotNull" )
145+ excludeEfficiently(" org.jetbrains.annotations.Nullable" )
146+ excludeEfficiently(" org.checkerframework.checker.nullness.compatqual" )
147+ excludeEfficiently(" org.checkerframework.checker.nullness.compatqual.NonNullDecl" )
148+ excludeEfficiently(" org.checkerframework.checker.nullness.compatqual.NullableDecl" )
149+ excludeEfficiently(" org.checkerframework.checker.nullness.qual" )
150+ excludeEfficiently(" org.checkerframework.checker.nullness.qual.NonNull" )
151+ excludeEfficiently(" org.checkerframework.checker.nullness.qual.Nullable" )
137152 }
138153 }
139154 mergeServiceFiles()
@@ -179,6 +194,12 @@ val validPaths = prefixesToRelocate.map {
179194 " com/google/devtools/ksp" ,
180195 " META-INF" ,
181196 " ksp/FirNativeForwardDeclarationGetClassCallChecker.class" ,
197+ " org/checkerframework/checker/nullness/compatqual/NonNullDecl.class" ,
198+ " org/checkerframework/checker/nullness/compatqual/NullableDecl.class" ,
199+ " org/checkerframework/checker/nullness/qual/NonNull.class" ,
200+ " org/checkerframework/checker/nullness/qual/Nullable.class" ,
201+ " org/jetbrains/annotations/NotNull.class" ,
202+ " org/jetbrains/annotations/Nullable.class" ,
182203)
183204
184205class Trie (paths : List <String >) {
0 commit comments