Giter Site home page Giter Site logo

sbt-spongyinfo's Introduction

sbt-spongyinfo

sbt-spongyinfo is a sbt plugin that makes making plugins for Sponge easier and less tedious, saving you time wondering why your plugin isn't being detected correctly.

To add sbt-spongyinfo to your project, add this to your plugins.sbt

resolvers += "SpongePowered" at "https://repo-new.spongepowered.org/repository/maven-public"
addSbtPlugin("net.katsstuff" % "sbt-spongyinfo" % "2.0.0-SNAPSHOT")

Features

  • Creates a dependency on on SpongeAPI automatically
  • Allows you to easily change the API version for a project
  • Automatically generates the mcmod.info file for you, based on information like the project id, name, version and so on.
  • Deploy your plugin to Ore from SBT
  • Cross sponge versions

Usage

To just roll with the default settings, simply enable the plugin for the project, like so enablePlugins(SpongePlugin).

To set the Sponge version, use the key named spongeApiVersion. For example, to set the Sponge to 7.1.0, use spongeApiVersion := "7.0.0". The default is currently 7.0.0.

sbt-spongyinfo will try to use information it can find about the project to generate a sensible mcmod.info or plugins.json file. Given this project here:

lazy val mymod = (project in file(".")).enablePlugins(SpongePlugin).settings(
  scalaVersion := "2.13.3",
  name := "MyPlugin",
  version := "1.0",
  description := "An example project to show of sbt-spongyinfo",
  homepage := Some(url("http://mywebsite.net"))
)

it will generate this mcmod.info file:

[
    {
        "modid": "mymod",
        "name": "MyMod",
        "version": "1.0",
        "description": "An example project to show of sbt-spongyinfo",
        "url": "http://mywebsite.net"
    }
]

To set the information used to create the mcmod.info, use the key named spongeV7.pluginInfo or spongeV8.pluginInfo. Example:

spongeV7.PluginInfo := spongeV7.PluginInfo(
  id               = "myplugin",
  name             = Some("MyPlugin"),
  version          = Some("9.9.999"),
  description      = Some("My special plugin"),
  url              = Some("mywebsite.net"),
  authors          = Seq("Katrix"),
  dependencies     = Set(
    spongeV7.Dependency(
      loadOrder = spongeV7.LoadOrder.None, 
      id = "myotherplugin", 
      version = Some("1.1.0"), 
      optional = false
    )
  )
)

All fields besides id are optional.

If you don't want a mcmod.info file created for a project, for example if it is a shared project, you can easily specify this like this spongeV7.metaCreate := false. This setting defaults to true for the Sponge API version your project is currently using.

If you want to manually create a mcmod.info file, run spongeV7.metaFile.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.