Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
javaVersion=25
mcVersion=1.21.11
group=dev.slne.surf
version=1.21.11-2.59.4
version=1.21.11-2.60.0
relocationPrefix=dev.slne.surf.surfapi.libs
snapshot=false
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ public final class dev/slne/surf/surfapi/shared/api/annotation/AnnotationUtils {
public final fun findAnnotation (Ljava/lang/Class;Ljava/lang/Class;)Ljava/lang/annotation/Annotation;
}

public abstract interface annotation class dev/slne/surf/surfapi/shared/api/annotation/InternalAPIMarker : java/lang/annotation/Annotation {
}

public abstract interface class dev/slne/surf/surfapi/shared/api/component/Component {
public fun disable (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun enable (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package dev.slne.surf.surfapi.shared.api.annotation

/**
* Marker annotation that designates an annotation class as an Internal API marker.
*
* Annotation classes annotated with [InternalAPIMarker] are recognized by the IntelliJ plugin
* to identify internal API boundaries. Declarations annotated with such an annotation will be
* treated as invisible to consumers in other projects — similar to Kotlin's
* [DeprecationLevel.HIDDEN] behavior — rather than producing an opt-in warning or error.
*
* Example:
* ```kotlin
* @RequiresOptIn
* @InternalAPIMarker
* annotation class InternalSurfAPI
*
* @InternalSurfAPI
Comment on lines +15 to +17
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The KDoc example uses InternalSurfAPI, but the existing internal opt-in annotation in this repo is named InternalSurfApi. Using a different name in the example is confusing for consumers—either align the example with the actual InternalSurfApi name or make it a clearly generic placeholder name (e.g., InternalApi).

Suggested change
* annotation class InternalSurfAPI
*
* @InternalSurfAPI
* annotation class InternalSurfApi
*
* @InternalSurfApi

Copilot uses AI. Check for mistakes.
* fun internalFunction() { ... }
* ```
*/
@Target(AnnotationTarget.ANNOTATION_CLASS)
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

InternalAPIMarker currently uses the default annotation retention (RUNTIME). If this marker is only meant for IDE/static analysis, consider setting an explicit retention (typically AnnotationRetention.BINARY) to avoid carrying it into runtime reflection unnecessarily and to document the intended usage.

Suggested change
@Target(AnnotationTarget.ANNOTATION_CLASS)
@Target(AnnotationTarget.ANNOTATION_CLASS)
@Retention(AnnotationRetention.BINARY)

Copilot uses AI. Check for mistakes.
annotation class InternalAPIMarker