Skip to content

Instantly share code, notes, and snippets.

@PHPirates
Forked from thomas15v/build.gradle
Last active April 6, 2019 19:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PHPirates/5ea7a2849d46164555d7b725f4f24161 to your computer and use it in GitHub Desktop.
Save PHPirates/5ea7a2849d46164555d7b725f4f24161 to your computer and use it in GitHub Desktop.
Debug your Jetbrains plugin in non-IntelliJ IDEs, in this example we use PyCharm. To use: run the runIde task.
plugins {
id "org.jetbrains.intellij" version "0.3.12"
id "maven"
id "de.undercouch.download" version "3.4.3"
// Plugin which can check for Gradle dependencies, use the help/dependencyUpdates task.
id 'com.github.ben-manes.versions' version '0.20.0'
// Plugin which can update Gradle dependencies, use the help/useLatestVersions task.
id 'se.patrikerdes.use-latest-versions' version '0.2.7'
}
def pycharmVersion = '2019.1'
task setupPycharm() {
if (!new File(".gradle/ide/pycharm-${pycharmVersion}").exists()){
download {
src "https://download.jetbrains.com/python/pycharm-professional-${pycharmVersion}.tar.gz"
dest '.gradle/downloads/py.tar.gz'
}
copy {
from tarTree(resources.gzip('.gradle/downloads/py.tar.gz'))
into '.gradle/ide'
}
}
}
runIde.dependsOn(setupPycharm)
intellij {
alternativeIdePath ".gradle/ide/pycharm-${pycharmVersion}"
// IntelliJ version
version '2019.1'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment