Skip to content

Commit bfdffdd

Browse files
authored
Keep the @RequiresOptIn annotation in the Gradle plugin (#6406)
* Keep the @RequiresOptIn annotation * Also keep runtime invisible annotations
1 parent d58072b commit bfdffdd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

libraries/apollo-gradle-plugin/rules.pro

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,15 @@
55
# ^ Unresolved reference: kotlinMultiplatformExtension
66
-keep class kotlin.Metadata { *; }
77
-keep class kotlin.Unit { *; }
8-
98
# Keep the @RequiresOptIn annotation so we get proper warnings in gradle build files
109
-keep class kotlin.RequiresOptIn { *; }
1110

1211
# We need to keep type arguments (Signature) for Gradle to be able to instantiate abstract models like `Property`
1312
# Else it fails with
1413
# 'Declaration of property alwaysGenerateTypesMatching does not include any type arguments in its property type interface org.gradle.api.provider.SetProperty'
1514
-keepattributes Signature,InnerClasses,EnclosingMethod
16-
# Similarly, Gradle needs the @Inject annotations
17-
-keepattributes RuntimeVisible*Annotation*
15+
# Gradle needs the @Inject annotations, the Kotlin compiler needs @RequiresOptIn, etc..
16+
-keepattributes *Annotation*
1817
# For debug
1918
-keepattributes SourceFile,LineNumberTable
2019

0 commit comments

Comments
 (0)