Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

README.adoc

SBuild Plugin Plugin

This SBuild plugin provides a Plugin to build SBuild Plugins.

Binary releases

The SBuild Plugin Plugin is available from Maven Central.

To use it in SBuild 0.7.1 or newer, simply add it to the project classpath.

@classpath("mvn:org.sbuild:org.sbuild.plugin.sbuildplugin:0.3.0")

Configuration

All configurable properties are documented via ScalaDoc in the configuration class SBuildPlugin.

Usage Example

To build an imaginary ExamplePlugin in package org.sbuild.plugins.example in version 0.1.0 you can use the following SBuild buildfile. Scala source files are assumed to be in src/main/scala directory.

import de.tototec.sbuild._

@version("0.7.1")
@classpath("mvn:org.sbuild:org.sbuild.plugins.sbuildplugin:0.3.0")
class SBuild(implicit _project: Project) {

  import org.sbuild.plugins.sbuildplugin._
  Plugin[SBuildPlugin] configure (_.copy(
    // the version of SBuild this plugin is compatible to
    sbuildVersion = SBuildVersion.v0_7_1,
    // the plugin API
    pluginClass = "org.sbuild.plugins.example.Example",
    // the version of this plugin
    pluginVersion = "0.1.0"
  ))

}

That’s all to compile and package a plugin which has no additional dependencies.

bash$ sbuild -l
/tmp/exampleproject/target/org.sbuild.plugins.example-0.1.0.jar
clean
compile
jar

To build the plugin use the jar target, which is an alias to the output jar (target/org.sbuild.plugins.example-0.1.0.jar).

Building from Source

You need a recent version of SBuild.

git clone https://github.com/SBuild-org/sbuild-sbuild-plugin.git
cd sbuild-sbuild-plugin/org.sbuild.plugins.sbuildplugin
sbuild all

You will find the built jar in the directory org.sbuild.plugins.sbuildplugin/target.

Future development

The SBuild plugin ecosystem just was born. If there are in the near future stable plugin for tasks like compiling, packaging, testing, etc, this plugin will start to use these instead of defining all these task on its own.

Changelog

SBuild Plugin Plugin 0.3.0 - 2014-02-18

  • API Change: Rework configuration of SBuild version used for the plugin build (and as lowest compatibility margin). By this change, it is also possible to build a plugin against an unreleased SBuild version.

SBuild Plugin Plugin 0.2.2 - 2014-01-22

  • Compile and run tests with ScalaTest.

  • New manifest parameter to allow additional entries in the final plugin JAR manifest.

SBuild Plugin Plugin 0.2.1 - 2013-12-21

  • Fixed a bug resulting in an invalid SBuild-Plugin entry in the manifest.

SBuild Plugin Plugin 0.2.0 - 2013-12-21

  • This version requires at least SBuild 0.7.1!

  • Changed to immutable config class SBuildPlugin

SBuild Plugin Plugin 0.1.0 - 2013-12-18

  • Initial Release, compatible to SBuild 0.7.0

About

This SBuild Plugin makes building SBuild plugin very easy.

Resources

License

Languages

You can’t perform that action at this time.