Skip to content

Instantly share code, notes, and snippets.

@jeffreyolchovy
Created May 16, 2017 11:18
Show Gist options
  • Select an option

  • Save jeffreyolchovy/a955a8f1ba7e9fd22592d5830265c4b1 to your computer and use it in GitHub Desktop.

Select an option

Save jeffreyolchovy/a955a8f1ba7e9fd22592d5830265c4b1 to your computer and use it in GitHub Desktop.
package sbttweeter
import sbt._
import sbt.Keys._
object TweeterKeys {
val tweeterConsumerKey = settingKey[String]("The Twitter application consumer key")
val tweeterConsumerSecret = settingKey[String]("The Twitter application consumer secret")
val tweeterAccessToken = settingKey[String]("The Twitter user access token")
val tweeterAccessTokenSecret = settingKey[String]("The Twitter user access token secret")
val tweeterTweet = inputKey[Long]("Post a tweet to the configured Twitter account")
}
object TweeterPlugin extends AutoPlugin {
object autoImport {
/* Whatever you want brought into scope automatically for users of your plugin */
val TweeterKeys = sbttweeter.TweeterKeys
}
override def projectSettings = Seq(
/* Whatever settings/behavior you want to make available to the project that includes your plugin */
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment