Giter VIP home page Giter VIP logo

gradle-intellij-plugin's Introduction

Overview

Join the chat at https://gitter.im/JetBrains/gradle-intellij-plugin

This plugin allows you to build plugins for IntelliJ platform using specific IntelliJ SDK and bundled plugins.

The plugin adds extra IntelliJ-specific dependencies, patches processResources tasks in order to fill some tags (name, version) in plugin.xml with appropriate values, patches compile tasks in order to instrument code with nullability assertions and forms classes made with IntelliJ GUI Designer and provides some build steps which might be helpful while developing plugins for IntelliJ platform.

Usage

Gradle >= 2.1

plugins {
  id "org.jetbrains.intellij" version "0.0.43"
}

Gradle < 2.1

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath 'gradle.plugin.org.jetbrains:gradle-intellij-plugin:0.0.43'
  }
}

apply plugin: 'org.jetbrains.intellij'

Configuration

Plugin provides following options to configure target IntelliJ SDK and build archive

  • intellij.version defines the version of IDEA distribution that should be used as a dependency. The option accepts build numbers, version numbers and two meta values LATEST-EAP-SNAPSHOT, LATEST-TRUNK-SNAPSHOT.

Value may have `IC-` or `IU-` prefix in order to define IDEA distribution type.

**Default value**: `LATEST-EAP-SNAPSHOT`
  • intellij.type defines the type of IDEA distribution: IC for community version and IU for ultimate.

    Default value: IC

  • intellij.plugins defines the list of bundled IDEA plugins that should be used as dependencies.

    Default value: <empty>

  • intellij.pluginName is used for naming target zip-archive and defines the name of plugin artifact. of bundled IDEA plugins that should be used as dependencies.

    Default value: $project.name

  • intellij.sandboxDirectory defines path of sandbox directory that is used for running IDEA with developing plugin.

    Default value: $project.buildDir/idea-sandbox

  • intellij.instrumentCode defines whether plugin should instrument java classes with nullability assertions. Also it might be required for compiling forms created by IntelliJ GUI designer.

    Default value: true

  • intellij.updateSinceUntilBuild defines whether plugin should patch plugin.xml with since and until build values, if true then IntelliJIDEABuildNumber will be used as a since value and IntelliJIDEABranch.9999 will be used as an until value.

    Default value: true

  • intellij.sameSinceUntilBuild defines whether plugin should patch plugin.xml with "open" until build. if true then the same IntelliJIDEABuildNumber will be used as a since value and as an until value, which is useful for building plugins against EAP IDEA builds.

    Default value: false

  • intellij.downloadSources defines whether plugin should download IntelliJ sources while initializing gradle build. Since sources are not really needed while testing on CI you can set it to false for particular environment.

    Default value: true

  • intellij.systemProperties defines the map of system properties which will be passed to IDEA instance on executing runIdea task and tests.
    Also you can use intellij.systemProperty(name, value) method in order to set single system property.

    Default value: []

  • intellij.alternativeIdePath โ€“ absolute path to locally installed JetBrains IDE. It make sense to use this property if you want to test your plugin in WebStorm or any other non-IDEA JetBrains IDE. Empty value means that the IDE that was used for compiling will be used for running/debugging as well.

    Default value: <empty>

Publishing plugin

  • intellij.publish.pluginId defines plugin id at JetBrains plugin repository, you can find it in url of you plugin page there.
  • intellij.publish.username your login at JetBrains plugin repository.
  • intellij.publish.password your password at JetBrains plugin repository.
  • intellij.publish.channel defines channel to upload, you may use any string here, empty string means default channel.

    Default value: <empty>

Build steps

Plugin introduces following build steps

  • prepareSandbox creates proper structure of plugin and fills sandbox directory with it
  • buildPlugin assembles plugin and prepares zip archive for deployment
  • runIdea executes IntelliJ IDEA instance with installed the plugin you're developing
  • publishPlugin uploads plugin distribution archive to http://plugins.jetbrains.com

build.gradle

plugins {
  id "org.jetbrains.intellij" version "0.0.43"
}

intellij {
  version 'IC-14.1.4'
  plugins 'coverage'
  pluginName 'MyPlugin'

  publish {
    username 'zolotov'
    password 'password'
    pluginId '5047'
    channel 'nightly'
  } 
}

Examples

As examples of using this plugin you can check out following projects:

License

This plugin is available under the Apache License, Version 2.0.

gradle-intellij-plugin's People

Contributors

gitter-badger avatar henryju avatar ignatov avatar jakewharton avatar konifar avatar rahulsom avatar turbo87 avatar vladrassokhin avatar winterdroid avatar zolotov avatar

Watchers

 avatar  avatar

Forkers

zyongjun

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.