| /* | |
| * Copyright 2000-2017 JetBrains s.r.o. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software | |
| * distributed under the License is distributed on an "AS IS" BASIS, | |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| * See the License for the specific language governing permissions and | |
| * limitations under the License. | |
| */ | |
| buildscript { | |
| repositories { | |
| maven { url "https://plugins.gradle.org/m2/" } | |
| } | |
| } | |
| apply plugin: 'idea' | |
| apply plugin: 'base' | |
| idea { | |
| module { | |
| inheritOutputDirs true | |
| } | |
| } | |
| group 'com.jetbrains.pycharm.dependencies' | |
| version '1.0' | |
| repositories { | |
| maven { url 'https://plugins.jetbrains.com/maven/' } | |
| } | |
| configurations { | |
| datalorePlugin | |
| } | |
| def DatalorePluginId = "com.jetbrains.intellij.datalore" | |
| def DatalorePluginName = "datalore-intellij-plugin" | |
| def DatalorePluginRepo= DatalorePluginChannel == "Stable" ? "com.jetbrains.plugins" : "${DatalorePluginChannel}.com.jetbrains.plugins" | |
| dependencies { | |
| datalorePlugin "$DatalorePluginRepo:$DatalorePluginId:$DatalorePluginVersion@zip" | |
| } | |
| task setupDatalorePlugin(dependsOn: configurations.datalorePlugin, type: Sync) { | |
| from fileTree(configurations.datalorePlugin.singleFile) | |
| into "${project.buildDir}/$DatalorePluginName/" | |
| rename { String fileName -> | |
| fileName.replace(DatalorePluginId, DatalorePluginName) | |
| } | |
| } | |
| task deployDatalorePlugin(dependsOn: setupDatalorePlugin, type: Sync) { | |
| from zipTree("${project.buildDir}/$DatalorePluginName/$DatalorePluginName-${DatalorePluginVersion}.zip") | |
| into "${System.getProperty("idea.config.path")}/plugins/" | |
| preserve { | |
| exclude "$DatalorePluginName/**" | |
| } | |
| } |