Skip to content

olafurpg/sbt-idea-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sbt-idea-plugin

Download Build Status

SBT plugin that makes development of IntelliJ IDEA plugins in Scala easier.

Installation

  • Insert into project/plugins.sbt:
resolvers += Resolver.url("dancingrobot84-bintray",
  url("http://dl.bintray.com/dancingrobot84/sbt-plugins/"))(Resolver.ivyStylePatterns)

addSbtPlugin("com.dancingrobot84" % "sbt-idea-plugin" % "0.4.0")
  • Insert into build.sbt:
enablePlugins(SbtIdeaPlugin)
  • Run SBT and execute updateIdea task. It will download IDEA and external plugins used in project

  • Start coding

Available settings

ideaBuild in ThisBuild :: SettingKey[String]

Default: LATEST-EAP-SNAPSHOT

IDEA's build number. Binaries and sources of this build will be downloaded from https://jetbrains.com and used in compilation and testing. You can find build number of your IDEA in Help -> About dialog. However, it might be incomplete, so I strongly recommend you to verify it against available releases and available snapshots.

ideaEdition in ThisBuild :: SettingKey[IdeaEdition]

Default: IdeaEdition.Community

Edition of IntelliJ IDEA to use in project.

ideaDownloadDirectory in ThisBuild :: SettingKey[File]

Default: baseDirectory / "idea"

Directory where IDEA binaries and sources will be downloaded.

ideaDownloadSources in ThisBuild :: SettingKey[Boolean]

Default: true

Flag indicating whether IDEA sources should be downloaded alongside IDEA binaries or not.

ideaInternalPlugins :: SettingKey[String]

Default: Seq.empty

List of bundled IDEA plugins to depend upon. Their jars will be used in compilation. Available plugins can be found in ideaBaseDirectory / "plugins" directory.

ideaExternalPlugins :: SettingKey[IdeaPlugin]

Default: Seq.empty

List of external IDEA plugins to depend upon. Their zips or jars will be downloaded and unpacked in ideaBaseDirectory / "externalPlugins" directory, each in its own subdirectory. They will be used in compilation.

ideaPublishSettings :: SettingKey[PublishSettings]

Default: PublishSettings(pluginId = "", username = "", password = "", channel = None)

Settings necessary for uploading your IDEA plugin to https://plugins.jetbrains.com

ideaPluginFile :: TaskKey[File]

Default: aliased to package in Compile

Your IDEA plugin file to publish on https://plugins.jetbrains.com

Tasks

updateIdea :: TaskKey[Unit]

Download IDEA's binaries and sources, put them into ideaBaseDirectory directory. Download external plugins and put them in ideaBaseDirectory / "externalPlugins" directory. Automatically add IDEA's and plugin's jars into unmanagedJars in Compile.

publishPlugin :: TaskKey[String]

Upload and publish your IDEA plugin on https://plugins.jetbrains.com. Returns URL of published plugin.

Notes and best practices

  • If you use sbt-assembly plugin to produce a fat jar to distribute your plugin you should avoid putting IDEA's jars into this fat jar of yours. To achieve this insert

    assemblyExcludedJars in assembly <<= ideaFullJars

    into your build.sbt

  • If you depend upon one or more external plugins, add

    -Didea.plugins.path=$PROJECT_DIR$/<ideaBaseDirectory>/externalPlugins
    

    to your run configuration's VM options in order for debug IDEA instance to use already downloaded plugins

About

SBT plugin for Intellij IDEA plugin's developers

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Scala 100.0%