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 surf-api-gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ plugins {
group = groupId
version = buildString {
append(mcVersion)
append("-1.13.0")
append("-1.13.1")
if (snapshot) append("-SNAPSHOT")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ internal abstract class AbstractPaperSurfPlugin<E : AbstractPaperSurfExtension>(
override fun Project.configure0() {
}

override fun Project.afterEvaluated1(extension: E) {
final override fun Project.afterEvaluated1(extension: E) {
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

afterEvaluated1 overrides a protected hook from AbstractCoreSurfPlugin, but this override widens visibility (no protected). For consistency with the lifecycle-hook pattern used elsewhere (e.g. CommonSurfPlugin.afterEvaluated0, AbstractCoreSurfPlugin.afterEvaluated1), consider keeping this override protected while making it final (or otherwise ensure this hook isn’t unintentionally callable from unrelated code within the module).

Suggested change
final override fun Project.afterEvaluated1(extension: E) {
protected final override fun Project.afterEvaluated1(extension: E) {

Copilot uses AI. Check for mistakes.
if (extension.useCanvasMc.get()) {
repositories {
canvasMaven()
Expand All @@ -41,6 +41,11 @@ internal abstract class AbstractPaperSurfPlugin<E : AbstractPaperSurfExtension>(
}
}
}

afterEvaluated2(extension)
}

open fun Project.afterEvaluated2(extension: E) {

}
Comment on lines +48 to +50
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

afterEvaluated2 is introduced as an open (public) hook with an empty body. Other lifecycle hooks in this plugin hierarchy are protected open, which better communicates intended usage and prevents unrelated module-internal code from calling it. Consider changing this to protected open and collapsing the empty implementation to {} (or adding a comment explaining why the hook exists).

Suggested change
open fun Project.afterEvaluated2(extension: E) {
}
protected open fun Project.afterEvaluated2(extension: E) {}

Copilot uses AI. Check for mistakes.
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ internal class PaperPluginSurfPlugin :
"de.eldoria.plugin-yml.paper"
)

override fun Project.afterEvaluated1(extension: PaperPluginSurfExtension) {
override fun Project.afterEvaluated2(extension: PaperPluginSurfExtension) {
val generateLoaderTask = generateLibrariesLoaderTask(
extension.mainClass.get().substringBeforeLast('.')
)
Expand Down Expand Up @@ -82,7 +82,6 @@ internal class PaperPluginSurfPlugin :
}
}


tasks {
withType<GeneratePluginDescription> {
useDefaultCentralProxy()
Expand Down
Loading