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.60.2
version=1.21.11-2.61.0
relocationPrefix=dev.slne.surf.surfapi.libs
snapshot=false
19 changes: 10 additions & 9 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,35 @@ pluginManagement {
gradlePluginPortal()
}
}

plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
}

val ci = System.getenv("CI")?.toBoolean() == true
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

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

This PR introduces a dedicated settings plugin (dev.slne.surf.surfapi.gradle.settings) that enables TYPESAFE_PROJECT_ACCESSORS, but the root settings.gradle.kts still enables the feature preview directly. To avoid having two competing ways to configure the same toggle, either (a) apply the settings plugin here and remove the direct call, or (b) remove the settings plugin entirely if it isn’t intended to be used.

Copilot uses AI. Check for mistakes.

rootProject.name = "surf-api"

include(":surf-api-core:surf-api-core-api")
include(":surf-api-core:surf-api-core-server")

include(":surf-api-bukkit:surf-api-bukkit-api")
include(":surf-api-bukkit:surf-api-bukkit-server")

//include(":surf-api-hytale:surf-api-hytale-api")
//include(":surf-api-hytale:surf-api-hytale-server")

include(":surf-api-velocity:surf-api-velocity-api")
include(":surf-api-velocity:surf-api-velocity-server")

include("surf-api-standalone")
include("surf-api-gradle-plugin")
include("surf-api-gradle-plugin:surf-api-processor")

include("surf-api-shared")
include("surf-api-shared:surf-api-shared-public")
include("surf-api-shared:surf-api-shared-internal")

val ci = System.getenv("CI")?.toBoolean() ?: false

if (!ci) {
include(":surf-api-bukkit:surf-api-bukkit-plugin-test")
// include("surf-api-generator")
include("surf-api-modern-generator")
}
include("surf-api-shared")
include("surf-api-shared:surf-api-shared-public")
include("surf-api-shared:surf-api-shared-internal")
}
2 changes: 1 addition & 1 deletion surf-api-bukkit/surf-api-bukkit-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

dependencies {
api(project(":surf-api-core:surf-api-core-api"))
api(projects.surfApiCore.surfApiCoreApi)
compileOnly(libs.paper.api)
compileOnlyApi(libs.packetevents.spigot)
api(libs.scoreboard.library.api)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ plugins {
description = "surf-api-bukkit-plugin-test"

dependencies {
compileOnlyApi(project(":surf-api-bukkit:surf-api-bukkit-api"))
compileOnlyApi(projects.surfApiBukkit.surfApiBukkitApi)
compileOnlyApi(libs.commandapi.paper)

paperweight.paperDevBundle(libs.paper.api.get().version)
Expand Down
4 changes: 2 additions & 2 deletions surf-api-bukkit/surf-api-bukkit-server/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ kotlin {
}

dependencies {
api(project(":surf-api-bukkit:surf-api-bukkit-api"))
api(project(":surf-api-core:surf-api-core-server"))
api(projects.surfApiBukkit.surfApiBukkitApi)
api(projects.surfApiCore.surfApiCoreServer)

paperweight.paperDevBundle(libs.paper.api.get().version)

Expand Down
2 changes: 1 addition & 1 deletion surf-api-core/surf-api-core-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

dependencies {
api(project(":surf-api-shared:surf-api-shared-public"))
api(projects.surfApiShared.surfApiSharedPublic)
api(libs.adventure.nbt)
compileOnlyApi(libs.packetevents.api)
compileOnlyApi(libs.dazzleconf)
Expand Down
4 changes: 2 additions & 2 deletions surf-api-core/surf-api-core-server/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ plugins {
}

dependencies {
api(project(":surf-api-core:surf-api-core-api"))
api(project(":surf-api-shared:surf-api-shared-internal"))
api(projects.surfApiShared.surfApiSharedInternal)
api(projects.surfApiCore.surfApiCoreApi)
compileOnly(libs.packetevents.netty.common)
api(libs.bytebuddy)
}
Expand Down
12 changes: 5 additions & 7 deletions surf-api-gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ dependencies {

gradlePlugin {
plugins {
create("settings") {
id = "dev.slne.surf.surfapi.gradle.settings"
implementationClass = "dev.slne.surf.surfapi.gradle.settings.SurfSettingsPlugin"
}

create("core") {
id = "dev.slne.surf.surfapi.gradle.core"
implementationClass = "dev.slne.surf.surfapi.gradle.platform.core.CoreSurfPlugin"
Expand Down Expand Up @@ -78,12 +83,6 @@ gradlePlugin {
implementationClass =
"dev.slne.surf.surfapi.gradle.platform.velocity.VelocitySurfPlugin"
}

create("hytale") {
id = "dev.slne.surf.surfapi.gradle.hytale"
implementationClass =
"dev.slne.surf.surfapi.gradle.platform.hytale.HytaleSurfPlugin"
}
}

publishing {
Expand Down Expand Up @@ -136,7 +135,6 @@ val generateConstants by tasks.registering {
| const val SNAPSHOT_REPO = "https://repo.slne.dev/repository/maven-releases"
| const val PAPER_API = "${libs.paper.api.get()}"
| const val VELOCITY_API = "${libs.velocity.api.get()}"
| const val HYTALE_SERVER = "${libs.hytale.server.get()}"
| const val AUTO_SERVICE_ANNOTATIONS = "${libs.auto.service.annotations.get()}"
| const val AUTO_SERVICE = "${generator.group}:${generator.name}:${generator.version}"
|
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package dev.slne.surf.surfapi.gradle.settings

import org.gradle.api.Plugin
import org.gradle.api.initialization.Settings

internal class SurfSettingsPlugin : Plugin<Settings> {
override fun apply(target: Settings) {
target.enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
}
}
Comment on lines +6 to +10
Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

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

Publishing a Gradle plugin with an internal implementation class is risky because plugin implementation classes are expected to be publicly consumable/stable. Make SurfSettingsPlugin a public class (remove internal) so Gradle can instantiate it reliably across builds and so the plugin API remains consistent.

Copilot uses AI. Check for mistakes.
Loading
Loading