mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-21 14:37:45 +07:00
116 lines
2.9 KiB
Groovy
116 lines
2.9 KiB
Groovy
import org.apache.tools.ant.filters.ReplaceTokens
|
|
|
|
buildscript {
|
|
ext.kotlin_version = '1.0.6'
|
|
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"
|
|
}
|
|
}
|
|
|
|
subprojects {
|
|
apply plugin: 'java'
|
|
apply plugin: 'kotlin'
|
|
apply plugin: "org.jetbrains.intellij"
|
|
|
|
tasks.withType(JavaCompile) { options.encoding = 'UTF-8' }
|
|
targetCompatibility = '1.8'
|
|
sourceCompatibility = '1.8'
|
|
sourceSets {
|
|
main {
|
|
java.srcDirs 'src', '../src', '../gen'
|
|
kotlin.srcDirs 'src'
|
|
resources.srcDirs 'resources', '../resources'
|
|
}
|
|
test {
|
|
java.srcDir 'test'
|
|
}
|
|
}
|
|
|
|
processResources {
|
|
filesNotMatching("**/*.png") {
|
|
it.filter(ReplaceTokens, tokens: [
|
|
'VERSION' : version.toString(),
|
|
'BUILD-NUMBER': buildNumber,
|
|
])
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
ivy {
|
|
ivyPattern 'http://buildserver.labs.intellij.net/guestAuth/repository/download/ijplatform_master_PyCharm_Installers/lastSuccessful/teamcity-ivy.xml'
|
|
artifactPattern 'http://buildserver.labs.intellij.net/guestAuth/repository/download/ijplatform_master_PyCharm_Installers/lastSuccessful/[artifact].[ext]'
|
|
}
|
|
}
|
|
|
|
configurations {
|
|
pycharm
|
|
}
|
|
|
|
dependencies {
|
|
pycharm ('org:ijplatform_master_PyCharm_Installers:lastSuccessful')
|
|
compileOnly fileTree(dir: rootProject.projectDir.toString() + "/gradleBuild/pycharm", include: ['**/*.jar'])
|
|
}
|
|
|
|
task extractPyCharm(type: Copy) {
|
|
from zipTree(configurations.pycharm.filter{dep -> dep.name.startsWith("pycharmPC-") && dep.name.endsWith(".zip")}[0])
|
|
into rootProject.projectDir.toString() + "/gradleBuild/pycharm"
|
|
include "**/pycharm*.jar"
|
|
}
|
|
|
|
intellij {
|
|
version ideaVersion
|
|
updateSinceUntilBuild Boolean.valueOf(updateBuildNumber)
|
|
downloadSources Boolean.valueOf(downloadIdeaSources)
|
|
sandboxDirectory = new File(rootProject.projectDir, "gradleBuild/idea-sandbox")
|
|
}
|
|
|
|
buildDir = new File(rootProject.projectDir, "gradleBuild/" + project.name)
|
|
}
|
|
|
|
project(':Edu-Python') {
|
|
sourceSets {
|
|
main {
|
|
resources.srcDirs '../resources'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compile project(':educational-core') {
|
|
dependencies {
|
|
compile fileTree(dir: 'lib', include: ['*.jar'])
|
|
}
|
|
}
|
|
}
|
|
|
|
compileJava.dependsOn(extractPyCharm)
|
|
compileKotlin.dependsOn(extractPyCharm)
|
|
|
|
intellij {
|
|
pluginName 'Edu-Python'
|
|
|
|
if (project.hasProperty('ideaPath')) {
|
|
localPath ideaPath
|
|
} else {
|
|
if (project.hasProperty('ideaVersion')) {
|
|
version ideaVersion
|
|
}
|
|
}
|
|
}
|
|
|
|
afterEvaluate {
|
|
tasks.getByName('buildPlugin') {
|
|
archiveName = "$intellij.pluginName-$version-${pycharmVersion}.zip"
|
|
}
|
|
}
|
|
|
|
} |