From 5ccd52e41b45c4723182cc0ad938cb4f99ae1d49 Mon Sep 17 00:00:00 2001 From: "Liana.Bakradze" Date: Mon, 19 Dec 2016 15:10:01 +0300 Subject: [PATCH] add ability to use local idea for building plugins instead of downloading one --- python/educational-core/build.gradle | 32 ++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/python/educational-core/build.gradle b/python/educational-core/build.gradle index fa978c18942b..f8926a8a1619 100644 --- a/python/educational-core/build.gradle +++ b/python/educational-core/build.gradle @@ -1,19 +1,21 @@ import org.apache.tools.ant.filters.ReplaceTokens - buildscript { - ext.kotlin_version = '1.0.3' + ext.kotlin_version = '1.0.5' repositories { mavenCentral() + maven { + url "https://oss.sonatype.org/content/repositories/snapshots/" + } + maven { + url 'http://dl.bintray.com/jetbrains/intellij-plugin-service' + } } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + classpath "org.jetbrains.intellij.plugins:gradle-intellij-plugin:0.2.0-SNAPSHOT" } } -plugins { - id "org.jetbrains.intellij" version "0.0.43" -} - subprojects { apply plugin: 'java' @@ -34,7 +36,12 @@ subprojects { } intellij { - version ideaVersion + String ideaPath = getIdeaPath() + if (ideaPath == null) { + version ideaVersion + } else { + localPath ideaPath + } updateSinceUntilBuild Boolean.valueOf(updateBuildNumber) downloadSources Boolean.valueOf(downloadIdeaSources) sandboxDirectory = new File(rootProject.projectDir, "gradleBuild/idea-sandbox") @@ -58,6 +65,17 @@ subprojects { buildDir = new File(rootProject.projectDir, "gradleBuild/" + project.name) } +private static String getIdeaPath() { + Properties properties = new Properties() + try { + properties.load(new FileInputStream("local.properties")) + return properties.getProperty('ideaPath') + } + catch (ignored) { + return null + } +} + project(':student') { dependencies {