Hi, i want to use kotlin for my next project but im not sure how i should configure the project.
The plan is to make a Minecraft plugin that would run in bith Fabric and Spigot servers, using mostly common code with a few platform-specific classes. How can I set this up in Gradle?
v
Vampire
12/07/2021, 11:39 AM
Not really a Kotlin question actually.
But you probably make three subprojects, one for common code, one for fabric specifics, one for spigot specifics. The latter ones will depend on the common one.
b
Ben Woodworth
12/18/2021, 6:01 AM
You could use kotlin multiplatform, with common/fabric/spigot source sets. Kotlin has `expect`/`actual` declarations, so you could make
expect
declarations (e.g.
expect class Player
) in the common module for platform-specific things, and then put