Convert intellij usages in the groovy build scripts

This commit is contained in:
Ilya Chernikov
2017-12-08 13:39:21 +01:00
committed by Vyacheslav Gerasimov
parent 4eb557724c
commit e23b1529b3
2 changed files with 13 additions and 32 deletions
@@ -1,8 +1,4 @@
plugins {
id 'org.jetbrains.intellij'
}
apply plugin: 'kotlin' apply plugin: 'kotlin'
apply plugin: 'maven' apply plugin: 'maven'
@@ -11,13 +7,6 @@ repositories {
jcenter() jcenter()
} }
intellij {
version = rootProject.ext["versions.intellij"]
instrumentCode = false
configureDefaultDependencies = false
extraDependencies = ['intellij-core']
}
dependencies { dependencies {
compile project(':kotlin-gradle-plugin-api') compile project(':kotlin-gradle-plugin-api')
// Use this dependency instead when building apart from the other modules: // Use this dependency instead when building apart from the other modules:
@@ -34,8 +23,10 @@ dependencies {
compileOnly gradleApi() compileOnly gradleApi()
} }
afterEvaluate { compileOnly("kotlin.build.custom.deps:intellij-core:${rootProject.ext["versions.intellijSdk"]}") {
dependencies { artifact {
compileOnly intellijExtra('intellij-core') name = 'intellij-core'
extension = 'jar'
}
} }
} }
@@ -13,10 +13,6 @@ buildscript {
} }
} }
plugins {
id 'org.jetbrains.intellij'
}
configureJvmProject(project) configureJvmProject(project)
configurePublishing(project) configurePublishing(project)
@@ -26,13 +22,6 @@ repositories {
maven { url 'https://maven.google.com' } maven { url 'https://maven.google.com' }
} }
intellij {
version = rootProject.ext["versions.intellij"]
instrumentCode = false
configureDefaultDependencies = false
extraDependencies = ['intellij-core']
}
configurations { configurations {
agp25CompileOnly agp25CompileOnly
} }
@@ -54,6 +43,13 @@ dependencies {
compileOnly 'org.codehaus.groovy:groovy-all:2.4.12' compileOnly 'org.codehaus.groovy:groovy-all:2.4.12'
compileOnly gradleApi() compileOnly gradleApi()
compileOnly("kotlin.build.custom.deps:intellij-core:${rootProject.ext["versions.intellijSdk"]}") {
artifact {
name = 'intellij-core'
extension = 'jar'
}
}
runtime project(path: ':kotlin-compiler-embeddable', configuration: "runtimeJar") runtime project(path: ':kotlin-compiler-embeddable', configuration: "runtimeJar")
runtime project(path: ':kotlin-annotation-processing-gradle', configuration: "runtimeJar") runtime project(path: ':kotlin-annotation-processing-gradle', configuration: "runtimeJar")
runtime project(path: ':kotlin-android-extensions', configuration: 'runtimeJar') runtime project(path: ':kotlin-android-extensions', configuration: 'runtimeJar')
@@ -76,12 +72,6 @@ dependencies {
testCompileOnly project(':kotlin-annotation-processing-gradle') testCompileOnly project(':kotlin-annotation-processing-gradle')
} }
afterEvaluate {
dependencies {
compileOnly intellijExtra('intellij-core')
}
}
tasks.withType(project.compileKotlin.class) { tasks.withType(project.compileKotlin.class) {
kotlinOptions.jdkHome = JDK_18 kotlinOptions.jdkHome = JDK_18
} }