Skip to content

bed-dev/stomrun

Repository files navigation

stomrun

A Gradle plugin for Minestom projects with a clean stomrun {} DSL.

What it does:

  • Adds required repositories for Minestom and optional GitHub dependencies
  • Injects Minestom automatically into implementation
  • Creates a runStom task to run your server quickly

Install (JitPack)

Kotlin DSL (build.gradle.kts)

buildscript {
    repositories {
        maven(url = "https://jitpack.io")
    }
    dependencies {
        classpath("com.github.bed-dev:stomrun:1.0.0")
    }
}

apply(plugin = "codes.bed.stomrun")

Groovy DSL (build.gradle)

buildscript {
    repositories {
        maven { url = uri('https://jitpack.io') }
    }
    dependencies {
        classpath 'com.github.bed-dev:stomrun:1.0.0'
    }
}

apply plugin: 'codes.bed.stomrun'

If JitPack is temporarily unavailable, this plugin is planned to be available on Maven Central soon.

Quick Start

Kotlin DSL (build.gradle.kts)

stomrun {
    version {
        minecraft.set("1.21.11")
        minestom.set("latest")
    }

    libraries {
        mavenCentral("io.github.togar2", "MinestomPvP", "2025.12.29-1.21.11")
        implementation("net.kyori:adventure-api:4.17.0")
        github("Revxyrsal", "Lamp")
    }

    runServer {
        memory.set("2G")
        mainClass.set("com.example.server.Main")
        jvmArg("-Dminestom.debug=true")
        args("nogui")
    }
}

Groovy DSL (build.gradle)

stomrun {
    version {
        minecraft = '1.21.11'
        minestom = 'latest'
    }

    libraries {
        mavenCentral('io.github.togar2', 'MinestomPvP', '2025.12.29-1.21.11')
        implementation('net.kyori:adventure-api:4.17.0')
        github('Revxyrsal', 'Lamp')
    }

    runServer {
        memory = '2G'
        mainClass = 'com.example.server.Main'
        jvmArg('-Dminestom.debug=true')
        args('nogui')
    }
}

DSL Reference

version {}

  • minecraft default: 1.21.11
  • minestom default: latest
  • If minestom is latest, minecraft is used as Minestom version

libraries {}

  • github(owner, repo) -> com.github.<owner>:<repo>:master-SNAPSHOT
  • github(owner, repo, tag) -> com.github.<owner>:<repo>:<tag>
  • implementation("group:artifact:version")
  • implementation(group, artifact, version)
  • mavenCentral(group, artifact, version)

Repository behavior:

  • Always adds Maven Central and Minestom snapshots
  • Adds JitPack only when github(...) is used

runServer {}

  • memory default: 2G (used for -Xms and -Xmx)
  • mainClass default: com.example.server.Main
  • jvmArg("...") appends JVM flags
  • args("...") appends program args
  • workingDirectory default: project directory

Run

.\gradlew.bat runStom

About

A Gradle plugin for Minestom projects

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages