Configure project dependencies¶
Use this guide to add ClockTime as a project dependency to build plugins that integrate with ClockTime.
Preconditions¶
- A Java/Kotlin development project using Gradle (Kotlin or Groovy DSL) or Maven.
- The project configured to compile against Minecraft/Paper APIs.
Build Configuration¶
ClockTime releases are hosted on JitPack and Modrinth Maven. Add the repository and dependency coordinate to your project configuration.
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.github.beduality</groupId>
<artifactId>clock-time</artifactId>
<version>v0.1.0</version> <!-- Replace with latest version -->
<scope>provided</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>modrinth-repo</id>
<url>https://api.modrinth.com/maven</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>maven.modrinth</groupId>
<artifactId>clock-time</artifactId>
<version>0.1.0</version> <!-- Replace with latest version -->
<scope>provided</scope>
</dependency>
</dependencies>
Plugin Dependency Configuration¶
To declare ClockTime as a dependency in your plugin description file (plugin.yml or paper-plugin.yml), add it under the depend or softdepend properties:
plugin.yml
name: MyPlugin
version: 1.0.0
main: com.example.MyPlugin
# Ensure ClockTime loads before your plugin
depend: [ClockTime]
Automate description files with Gradle
Instead of writing and maintaining plugin.yml manually, you can automate this using the net.minecrell.plugin-yml Gradle plugin:
Verification¶
To verify that ClockTime is correctly configured as a project dependency:
- Run your build tool compile task (e.g.,
./gradlew buildormvn clean compile). - Verify that the build succeeds without dependency resolution errors or compiler class-not-found errors.