idiomaticsoft / sbt-xtext-plugin   0.1.1

GitHub
Scala versions: 2.12
sbt plugins: 1.0

SBT Suport for The Xtext Framework

This repository contains the Xtext plugin for the Scala Build Tool (SBT).

How to build

Checkout and run sbt publishLocal.

Overview

Using Published Plugin

Add sbt-xtext-plugin as a dependency in project/plugins.sbt

resolvers += Resolver.bintrayIvyRepo("idiomaticsoft", "sbt-plugins")
addSbtPlugin("com.idiomaticsoft" % "sbt-xtext-plugin" % "0.1.0")

Integrating Xtext Generators to Your Project

The first thing you need is to add the language dependency to the plugin. This is done by adding the dependency to the project/plugins.sbt file.

// plugins.sbt
libraryDependencies += "com.idiomaticsoft.dsl" % "com.idiomaticsoft.dsl.test" % "1.0.0-SNAPSHOT"

Sbt Xtext allows to register your Xtext languages using the sbtXtextLanguageConfigurations configuration key in your project settings.

// build.sbt
import sbtxtext._

sbtXtextLanguageConfigurations := Seq(
  new Language("com.idiomaticsoft.dsl.TestStandaloneSetup")
)

Several languages can be registered.

Limitations

  • Currently, only scala files generated by your generator will be taken into account.