181: Fix dependencies for 181
This commit is contained in:
committed by
Nikolay Krasko
parent
95c854121a
commit
a0e20eefc6
@@ -0,0 +1,48 @@
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
|
||||
description = "Kotlin Daemon Client"
|
||||
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
id("jps-compatible")
|
||||
}
|
||||
|
||||
jvmTarget = "1.6"
|
||||
|
||||
val nativePlatformVariants: List<String> by rootProject.extra
|
||||
|
||||
dependencies {
|
||||
compileOnly(project(":compiler:util"))
|
||||
compileOnly(project(":compiler:cli-common"))
|
||||
compileOnly(project(":compiler:daemon-common"))
|
||||
compileOnly(project(":kotlin-reflect-api"))
|
||||
compileOnly(commonDep("net.rubygrapefruit", "native-platform"))
|
||||
compileOnly(intellijDep()) { includeIntellijCoreJarDependencies(project) }
|
||||
|
||||
embeddedComponents(project(":compiler:daemon-common")) { isTransitive = false }
|
||||
embeddedComponents(commonDep("net.rubygrapefruit", "native-platform"))
|
||||
nativePlatformVariants.forEach {
|
||||
embeddedComponents(commonDep("net.rubygrapefruit", "native-platform", "-$it"))
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
noDefaultJar()
|
||||
|
||||
runtimeJar(task<ShadowJar>("shadowJar")) {
|
||||
from(the<JavaPluginConvention>().sourceSets.getByName("main").output)
|
||||
fromEmbeddedComponents()
|
||||
}
|
||||
|
||||
sourcesJar()
|
||||
javadocJar()
|
||||
|
||||
dist()
|
||||
|
||||
ideaPlugin()
|
||||
|
||||
publish()
|
||||
@@ -0,0 +1,44 @@
|
||||
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
id("jps-compatible")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile(project(":core:descriptors"))
|
||||
testCompile(project(":core:descriptors.jvm"))
|
||||
testCompile(project(":core:deserialization"))
|
||||
testCompile(project(":compiler:util"))
|
||||
testCompile(project(":compiler:backend"))
|
||||
testCompile(project(":compiler:ir.ir2cfg"))
|
||||
testCompile(project(":compiler:frontend"))
|
||||
testCompile(project(":compiler:frontend.java"))
|
||||
testCompile(project(":compiler:util"))
|
||||
testCompile(project(":compiler:cli-common"))
|
||||
testCompile(project(":compiler:cli"))
|
||||
testCompile(project(":compiler:light-classes"))
|
||||
testCompile(project(":compiler:serialization"))
|
||||
testCompile(project(":kotlin-preloader"))
|
||||
testCompile(project(":compiler:daemon-common"))
|
||||
testCompile(project(":js:js.serializer"))
|
||||
testCompile(project(":js:js.frontend"))
|
||||
testCompile(project(":js:js.translator"))
|
||||
testCompileOnly(project(":plugins:android-extensions-compiler"))
|
||||
testCompile(projectDist(":kotlin-test:kotlin-test-jvm"))
|
||||
testCompile(projectTests(":compiler:tests-common-jvm6"))
|
||||
testCompileOnly(project(":kotlin-reflect-api"))
|
||||
testCompile(commonDep("junit:junit"))
|
||||
testCompile(androidDxJar()) { isTransitive = false }
|
||||
testCompile(intellijCoreDep()) { includeJars("intellij-core"); isTransitive = false }
|
||||
testCompile(intellijDep()) {
|
||||
includeJars("openapi", "platform-api", "idea", "idea_rt", "guava", "trove4j", "picocontainer", "asm-all", "log4j", "jdom", "annotations", rootProject = rootProject)
|
||||
isTransitive = false
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
"main" { }
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
testsJar {}
|
||||
@@ -19,6 +19,7 @@ dependencies {
|
||||
testCompile(project(":compiler:light-classes"))
|
||||
testCompile(projectDist(":kotlin-test:kotlin-test-junit"))
|
||||
testCompile(commonDep("junit:junit"))
|
||||
testCompileOnly(intellijDep()) { includeJars("platform-api", "platform-impl") }
|
||||
|
||||
testRuntime(project(":plugins:kapt3-idea")) { isTransitive = false }
|
||||
testRuntime(project(":idea:idea-jvm"))
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
id("jps-compatible")
|
||||
}
|
||||
|
||||
val compilerModules: Array<String> by rootProject.extra
|
||||
|
||||
dependencies {
|
||||
compile(project(":kotlin-build-common"))
|
||||
compile(project(":core:descriptors"))
|
||||
compile(project(":core:descriptors.jvm"))
|
||||
compile(project(":kotlin-compiler-runner"))
|
||||
compile(project(":compiler:daemon-common"))
|
||||
compile(projectRuntimeJar(":kotlin-daemon-client"))
|
||||
compile(project(":compiler:frontend.java"))
|
||||
compile(projectRuntimeJar(":kotlin-preloader"))
|
||||
compile(project(":idea:idea-jps-common"))
|
||||
compileOnly(intellijDep()) { includeJars("jdom", "trove4j", "jps-model", "openapi", "platform-api", "util", "asm-all") }
|
||||
compileOnly(intellijDep("jps-standalone")) { includeJars("jps-builders", "jps-builders-6") }
|
||||
testCompileOnly(project(":kotlin-reflect-api"))
|
||||
testCompile(project(":compiler:incremental-compilation-impl"))
|
||||
testCompile(projectTests(":compiler:tests-common"))
|
||||
testCompile(projectTests(":compiler:incremental-compilation-impl"))
|
||||
testCompile(commonDep("junit:junit"))
|
||||
testCompile(projectDist(":kotlin-test:kotlin-test-jvm"))
|
||||
testCompile(projectTests(":kotlin-build-common"))
|
||||
testCompileOnly(intellijDep("jps-standalone")) { includeJars("jps-builders", "jps-builders-6") }
|
||||
testCompileOnly(intellijDep()) { includeJars("openapi", "idea", "platform-api", "log4j") }
|
||||
testCompile(intellijDep("jps-build-test"))
|
||||
compilerModules.forEach {
|
||||
testRuntime(project(it))
|
||||
}
|
||||
testRuntime(intellijDep())
|
||||
testRuntime(projectDist(":kotlin-reflect"))
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {
|
||||
java.srcDirs("jps-tests/test"
|
||||
/*, "kannotator-jps-plugin-test/test"*/ // Obsolete
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
projectTest {
|
||||
dependsOn(":kotlin-compiler:dist")
|
||||
workingDir = rootDir
|
||||
}
|
||||
|
||||
testsJar {}
|
||||
@@ -0,0 +1,40 @@
|
||||
|
||||
description = "Kotlin scripting support utilities"
|
||||
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
id("jps-compatible")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile(project(":kotlin-stdlib"))
|
||||
compile(project(":kotlin-script-runtime"))
|
||||
compileOnly(project(":compiler:cli"))
|
||||
compileOnly(project(":compiler:daemon-common"))
|
||||
compile(projectRuntimeJar(":kotlin-daemon-client"))
|
||||
compileOnly("com.jcabi:jcabi-aether:0.10.1")
|
||||
compileOnly("org.sonatype.aether:aether-api:1.13.1")
|
||||
compileOnly("org.apache.maven:maven-core:3.0.3")
|
||||
testCompileOnly(project(":compiler:cli"))
|
||||
testCompile(project(":kotlin-test:kotlin-test-junit"))
|
||||
testRuntime(project(":kotlin-reflect"))
|
||||
testCompile(commonDep("junit:junit"))
|
||||
testRuntime(projectRuntimeJar(":kotlin-compiler"))
|
||||
testRuntime("com.jcabi:jcabi-aether:0.10.1")
|
||||
testRuntime("org.sonatype.aether:aether-api:1.13.1")
|
||||
testRuntime("org.apache.maven:maven-core:3.0.3")
|
||||
compileOnly(intellijDep()) { includeJars("openapi", "util") }
|
||||
testCompile(intellijDep()) { includeJars("openapi", "platform-api", "util") }
|
||||
}
|
||||
|
||||
projectTest {
|
||||
workingDir = rootDir
|
||||
}
|
||||
|
||||
runtimeJar()
|
||||
sourcesJar()
|
||||
javadocJar()
|
||||
|
||||
publish()
|
||||
|
||||
ideaPlugin()
|
||||
@@ -10,7 +10,7 @@ dependencies {
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":jps-plugin"))
|
||||
compile(project(":plugins:android-extensions-compiler"))
|
||||
compileOnly(intellijDep()) { includeJars("openapi", "jps-builders", "jps-model", "jdom") }
|
||||
compileOnly(intellijDep()) { includeJars("openapi", "platform-api", "jps-builders", "jps-model", "jdom") }
|
||||
compileOnly(intellijPluginDep("android")) { includeJars("jps/android-jps-plugin") }
|
||||
compile(intellijPluginDep("android")) { includeJars("jps/android-jps-plugin") }
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
|
||||
description = "Annotation Processor for Kotlin"
|
||||
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
id("jps-compatible")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
||||
testRuntime(intellijDep())
|
||||
testCompileOnly(intellijDep()) { includeJars("idea", "idea_rt", "openapi", "platform-api", "platform-impl") }
|
||||
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":compiler:cli"))
|
||||
compile(project(":compiler:backend"))
|
||||
compile(project(":compiler:frontend"))
|
||||
compile(project(":compiler:frontend.java"))
|
||||
compile(project(":compiler:plugin-api"))
|
||||
compileOnly(project(":kotlin-annotation-processing-runtime"))
|
||||
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
||||
compileOnly(intellijDep()) { includeJars("asm-all") }
|
||||
|
||||
testCompile(project(":compiler:tests-common"))
|
||||
testCompile(projectTests(":compiler:tests-common"))
|
||||
testCompile(commonDep("junit:junit"))
|
||||
testCompile(project(":kotlin-annotation-processing-runtime"))
|
||||
|
||||
embeddedComponents(project(":kotlin-annotation-processing-runtime")) { isTransitive = false }
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
testsJar {}
|
||||
|
||||
projectTest {
|
||||
workingDir = rootDir
|
||||
dependsOn(":dist")
|
||||
}
|
||||
|
||||
runtimeJar {
|
||||
fromEmbeddedComponents()
|
||||
}
|
||||
|
||||
sourcesJar()
|
||||
javadocJar()
|
||||
|
||||
dist()
|
||||
|
||||
publish()
|
||||
@@ -0,0 +1,32 @@
|
||||
|
||||
description = "Kotlin SamWithReceiver IDEA Plugin"
|
||||
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
id("jps-compatible")
|
||||
}
|
||||
|
||||
jvmTarget = "1.6"
|
||||
|
||||
dependencies {
|
||||
compile(project(":kotlin-sam-with-receiver-compiler-plugin"))
|
||||
compile(project(":plugins:annotation-based-compiler-plugins-ide-support"))
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":compiler:frontend"))
|
||||
compile(project(":compiler:frontend.java"))
|
||||
compile(project(":idea:idea-core"))
|
||||
compile(project(":idea:idea-android"))
|
||||
compile(project(":idea"))
|
||||
compile(project(":idea:idea-jvm"))
|
||||
compile(intellijDep()) { includeJars("openapi", "platform-api", "extensions", "util") }
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
runtimeJar()
|
||||
|
||||
ideaPlugin()
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
id("jps-compatible")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile(projectDist(":kotlin-stdlib"))
|
||||
compile(project(":core:util.runtime"))
|
||||
compile(project(":compiler:backend"))
|
||||
compile(project(":compiler:frontend"))
|
||||
compile(project(":compiler:frontend.java"))
|
||||
compile(project(":compiler:light-classes"))
|
||||
compile(project(":idea:idea-core"))
|
||||
compileOnly(intellijDep()) { includeJars("openapi", "idea", "java-api", "java-impl", "platform-api", "platform-impl", "util", "extensions", "asm-all") }
|
||||
|
||||
testCompile(projectDist(":kotlin-test:kotlin-test-jvm"))
|
||||
testCompile(projectTests(":compiler:tests-common"))
|
||||
testCompile(commonDep("junit:junit"))
|
||||
testCompile(project(":compiler:util"))
|
||||
testCompile(project(":compiler:cli"))
|
||||
testCompile(projectTests(":idea:idea-test-framework"))
|
||||
testCompileOnly(intellijDep()) { includeJars("java-api", "java-impl", "idea_rt") }
|
||||
|
||||
testRuntime(projectDist(":kotlin-reflect"))
|
||||
testRuntime(project(":idea:idea-android"))
|
||||
testRuntime(project(":idea:idea-gradle"))
|
||||
testRuntime(project(":plugins:kapt3-idea")) { isTransitive = false }
|
||||
testRuntime(project(":sam-with-receiver-ide-plugin"))
|
||||
testRuntime(project(":allopen-ide-plugin"))
|
||||
testRuntime(project(":noarg-ide-plugin"))
|
||||
testRuntime(project(":plugins:android-extensions-ide"))
|
||||
testRuntime(project(":plugins:kapt3-idea"))
|
||||
testRuntime(intellijDep())
|
||||
testRuntime(intellijPluginDep("junit"))
|
||||
testRuntime(intellijPluginDep("gradle"))
|
||||
testRuntime(intellijPluginDep("Groovy"))
|
||||
testRuntime(intellijPluginDep("properties"))
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
testsJar {}
|
||||
|
||||
projectTest {
|
||||
workingDir = rootDir
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
import java.io.File
|
||||
import proguard.gradle.ProGuardTask
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
import org.gradle.api.file.DuplicatesStrategy
|
||||
|
||||
description = "Kotlin Compiler"
|
||||
|
||||
plugins {
|
||||
`java`
|
||||
}
|
||||
|
||||
// You can run Gradle with "-Pkotlin.build.proguard=true" to enable ProGuard run on kotlin-compiler.jar (on TeamCity, ProGuard always runs)
|
||||
val shrink =
|
||||
findProperty("kotlin.build.proguard")?.toString()?.toBoolean()
|
||||
?: hasProperty("teamcity")
|
||||
|
||||
val compilerManifestClassPath =
|
||||
"kotlin-stdlib.jar kotlin-reflect.jar kotlin-script-runtime.jar"
|
||||
|
||||
val fatJarContents by configurations.creating
|
||||
|
||||
val fatJarContentsStripMetadata by configurations.creating
|
||||
val fatJarContentsStripServices by configurations.creating
|
||||
val fatSourcesJarContents by configurations.creating
|
||||
val proguardLibraryJars by configurations.creating
|
||||
val fatJar by configurations.creating
|
||||
val compilerJar by configurations.creating
|
||||
val archives by configurations
|
||||
val compile by configurations
|
||||
|
||||
val compilerBaseName = name
|
||||
|
||||
val outputJar = File(buildDir, "libs", "$compilerBaseName.jar")
|
||||
|
||||
val compilerModules: Array<String> by rootProject.extra
|
||||
|
||||
compilerModules.forEach { evaluationDependsOn(it) }
|
||||
|
||||
val compiledModulesSources = compilerModules.map {
|
||||
project(it).the<JavaPluginConvention>().sourceSets.getByName("main").allSource
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compilerModules.forEach {
|
||||
fatJarContents(project(it)) { isTransitive = false }
|
||||
}
|
||||
compiledModulesSources.forEach {
|
||||
fatSourcesJarContents(it)
|
||||
}
|
||||
|
||||
fatJarContents(project(":core:builtins", configuration = "builtins"))
|
||||
fatJarContents(commonDep("javax.inject"))
|
||||
fatJarContents(commonDep("org.jline", "jline"))
|
||||
fatJarContents(commonDep("org.fusesource.jansi", "jansi"))
|
||||
fatJarContents(protobufFull())
|
||||
fatJarContents(commonDep("com.google.code.findbugs", "jsr305"))
|
||||
fatJarContents(commonDep("io.javaslang", "javaslang"))
|
||||
fatJarContents(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false }
|
||||
|
||||
proguardLibraryJars(files(firstFromJavaHomeThatExists("jre/lib/rt.jar", "../Classes/classes.jar"),
|
||||
firstFromJavaHomeThatExists("jre/lib/jsse.jar", "../Classes/jsse.jar"),
|
||||
toolsJar()))
|
||||
proguardLibraryJars(projectDist(":kotlin-stdlib"))
|
||||
proguardLibraryJars(projectDist(":kotlin-script-runtime"))
|
||||
proguardLibraryJars(projectDist(":kotlin-reflect"))
|
||||
proguardLibraryJars(projectDist(":kotlin-scripting-common"))
|
||||
proguardLibraryJars(projectDist(":kotlin-scripting-jvm"))
|
||||
|
||||
compile(project(":kotlin-stdlib"))
|
||||
compile(project(":kotlin-script-runtime"))
|
||||
compile(project(":kotlin-reflect"))
|
||||
fatJarContents(intellijCoreDep()) { includeJars("intellij-core") }
|
||||
fatJarContents(intellijDep()) { includeIntellijCoreJarDependencies(project, { !(it.startsWith("jdom") || it.startsWith("log4j")) }) }
|
||||
fatJarContents(intellijDep()) { includeJars("jna-platform") }
|
||||
fatJarContentsStripServices(intellijDep("jps-standalone")) { includeJars("jps-model") }
|
||||
fatJarContentsStripMetadata(intellijDep()) { includeJars("oro-2.0.8", "jdom", "log4j") }
|
||||
}
|
||||
|
||||
|
||||
val packCompiler by task<ShadowJar> {
|
||||
configurations = listOf(fatJar)
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
destinationDir = File(buildDir, "libs")
|
||||
|
||||
setupPublicJar("before-proguard")
|
||||
from(fatJarContents)
|
||||
afterEvaluate {
|
||||
fatJarContentsStripServices.files.forEach { from(zipTree(it)) { exclude("META-INF/services/**") } }
|
||||
fatJarContentsStripMetadata.files.forEach { from(zipTree(it)) { exclude("META-INF/jb/** META-INF/LICENSE") } }
|
||||
}
|
||||
|
||||
manifest.attributes.put("Class-Path", compilerManifestClassPath)
|
||||
manifest.attributes.put("Main-Class", "org.jetbrains.kotlin.cli.jvm.K2JVMCompiler")
|
||||
}
|
||||
|
||||
val proguard by task<ProGuardTask> {
|
||||
dependsOn(packCompiler)
|
||||
configuration("$rootDir/compiler/compiler.pro")
|
||||
|
||||
val outputJar = File(buildDir, "libs", "$compilerBaseName-after-proguard.jar")
|
||||
|
||||
inputs.files(packCompiler.outputs.files.singleFile)
|
||||
outputs.file(outputJar)
|
||||
|
||||
// TODO: remove after dropping compatibility with ant build
|
||||
doFirst {
|
||||
System.setProperty("kotlin-compiler-jar-before-shrink", packCompiler.outputs.files.singleFile.canonicalPath)
|
||||
System.setProperty("kotlin-compiler-jar", outputJar.canonicalPath)
|
||||
}
|
||||
|
||||
libraryjars(mapOf("filter" to "!META-INF/versions/**"), proguardLibraryJars)
|
||||
printconfiguration("$buildDir/compiler.pro.dump")
|
||||
}
|
||||
|
||||
noDefaultJar()
|
||||
|
||||
val pack = if (shrink) proguard else packCompiler
|
||||
|
||||
dist(targetName = compilerBaseName + ".jar",
|
||||
fromTask = pack)
|
||||
|
||||
runtimeJarArtifactBy(pack, pack.outputs.files.singleFile) {
|
||||
name = compilerBaseName
|
||||
classifier = ""
|
||||
}
|
||||
sourcesJar {
|
||||
from(fatSourcesJarContents)
|
||||
}
|
||||
javadocJar()
|
||||
|
||||
publish()
|
||||
|
||||
@@ -0,0 +1,206 @@
|
||||
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
import org.gradle.jvm.tasks.Jar
|
||||
|
||||
description = "Kotlin IDEA Ultimate plugin"
|
||||
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
}
|
||||
|
||||
val ideaProjectResources = project(":idea").the<JavaPluginConvention>().sourceSets["main"].output.resourcesDir
|
||||
|
||||
evaluationDependsOn(":prepare:idea-plugin")
|
||||
|
||||
val intellijUltimateEnabled : Boolean by rootProject.extra
|
||||
|
||||
val springClasspath by configurations.creating
|
||||
|
||||
dependencies {
|
||||
if (intellijUltimateEnabled) {
|
||||
testRuntime(intellijUltimateDep())
|
||||
}
|
||||
|
||||
compileOnly(project(":kotlin-reflect-api"))
|
||||
compile(projectDist(":kotlin-stdlib"))
|
||||
compile(project(":core:descriptors")) { isTransitive = false }
|
||||
compile(project(":compiler:psi")) { isTransitive = false }
|
||||
compile(project(":core:descriptors.jvm")) { isTransitive = false }
|
||||
compile(project(":core:util.runtime")) { isTransitive = false }
|
||||
compile(project(":compiler:light-classes")) { isTransitive = false }
|
||||
compile(project(":compiler:frontend")) { isTransitive = false }
|
||||
compile(project(":compiler:frontend.java")) { isTransitive = false }
|
||||
compile(project(":js:js.frontend")) { isTransitive = false }
|
||||
compile(projectClasses(":idea"))
|
||||
compile(project(":idea:idea-jvm")) { isTransitive = false }
|
||||
compile(project(":idea:idea-core")) { isTransitive = false }
|
||||
compile(project(":idea:ide-common")) { isTransitive = false }
|
||||
compile(project(":idea:idea-gradle")) { isTransitive = false }
|
||||
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
||||
|
||||
if (intellijUltimateEnabled) {
|
||||
compileOnly(intellijUltimatePluginDep("NodeJS"))
|
||||
compileOnly(intellijUltimateDep()) { includeJars("annotations", "trove4j", "openapi", "platform-api", "platform-impl", "java-api", "java-impl", "idea", "util", "jdom") }
|
||||
compileOnly(intellijUltimatePluginDep("CSS"))
|
||||
compileOnly(intellijUltimatePluginDep("DatabaseTools"))
|
||||
compileOnly(intellijUltimatePluginDep("JavaEE"))
|
||||
compileOnly(intellijUltimatePluginDep("jsp"))
|
||||
compileOnly(intellijUltimatePluginDep("PersistenceSupport"))
|
||||
compileOnly(intellijUltimatePluginDep("Spring"))
|
||||
compileOnly(intellijUltimatePluginDep("properties"))
|
||||
compileOnly(intellijUltimatePluginDep("java-i18n"))
|
||||
compileOnly(intellijUltimatePluginDep("gradle"))
|
||||
compileOnly(intellijUltimatePluginDep("Groovy"))
|
||||
compileOnly(intellijUltimatePluginDep("junit"))
|
||||
compileOnly(intellijUltimatePluginDep("uml"))
|
||||
compileOnly(intellijUltimatePluginDep("JavaScriptLanguage"))
|
||||
compileOnly(intellijUltimatePluginDep("JavaScriptDebugger"))
|
||||
}
|
||||
|
||||
testCompile(projectDist(":kotlin-test:kotlin-test-jvm"))
|
||||
testCompile(projectTests(":idea:idea-test-framework")) { isTransitive = false }
|
||||
testCompile(project(":plugins:lint")) { isTransitive = false }
|
||||
testCompile(project(":idea:idea-jvm")) { isTransitive = false }
|
||||
testCompile(projectTests(":compiler:tests-common"))
|
||||
testCompile(projectTests(":idea")) { isTransitive = false }
|
||||
testCompile(projectTests(":generators:test-generator"))
|
||||
testCompile(commonDep("junit:junit"))
|
||||
if (intellijUltimateEnabled) {
|
||||
testCompileOnly(intellijUltimateDep()) { includeJars("platform-api", "platform-impl", "gson", "annotations", "trove4j", "openapi", "idea", "util", "jdom", rootProject = rootProject) }
|
||||
}
|
||||
testCompile(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false }
|
||||
|
||||
testRuntime(projectDist(":kotlin-reflect"))
|
||||
testRuntime(project(":kotlin-script-runtime"))
|
||||
testRuntime(projectRuntimeJar(":kotlin-compiler"))
|
||||
testRuntime(project(":plugins:android-extensions-ide")) { isTransitive = false }
|
||||
testRuntime(project(":plugins:android-extensions-compiler")) { isTransitive = false }
|
||||
testRuntime(project(":plugins:annotation-based-compiler-plugins-ide-support")) { isTransitive = false }
|
||||
testRuntime(project(":idea:idea-android")) { isTransitive = false }
|
||||
testRuntime(project(":idea:idea-maven")) { isTransitive = false }
|
||||
testRuntime(project(":idea:idea-jps-common")) { isTransitive = false }
|
||||
testRuntime(project(":idea:formatter")) { isTransitive = false }
|
||||
testRuntime(project(":sam-with-receiver-ide-plugin")) { isTransitive = false }
|
||||
testRuntime(project(":kotlin-sam-with-receiver-compiler-plugin")) { isTransitive = false }
|
||||
testRuntime(project(":noarg-ide-plugin")) { isTransitive = false }
|
||||
testRuntime(project(":kotlin-noarg-compiler-plugin")) { isTransitive = false }
|
||||
testRuntime(project(":allopen-ide-plugin")) { isTransitive = false }
|
||||
testRuntime(project(":kotlin-allopen-compiler-plugin")) { isTransitive = false }
|
||||
testRuntime(project(":plugins:kapt3-idea")) { isTransitive = false }
|
||||
testRuntime(project(":plugins:uast-kotlin"))
|
||||
testRuntime(project(":plugins:uast-kotlin-idea"))
|
||||
|
||||
if (intellijUltimateEnabled) {
|
||||
testCompile(intellijUltimatePluginDep("CSS"))
|
||||
testCompile(intellijUltimatePluginDep("DatabaseTools"))
|
||||
testCompile(intellijUltimatePluginDep("JavaEE"))
|
||||
testCompile(intellijUltimatePluginDep("jsp"))
|
||||
testCompile(intellijUltimatePluginDep("PersistenceSupport"))
|
||||
testCompile(intellijUltimatePluginDep("Spring"))
|
||||
testCompile(intellijUltimatePluginDep("uml"))
|
||||
testCompile(intellijUltimatePluginDep("JavaScriptLanguage"))
|
||||
testCompile(intellijUltimatePluginDep("JavaScriptDebugger"))
|
||||
testCompile(intellijUltimatePluginDep("NodeJS"))
|
||||
testCompile(intellijUltimatePluginDep("properties"))
|
||||
testCompile(intellijUltimatePluginDep("java-i18n"))
|
||||
testCompile(intellijUltimatePluginDep("gradle"))
|
||||
testCompile(intellijUltimatePluginDep("Groovy"))
|
||||
testCompile(intellijUltimatePluginDep("junit"))
|
||||
testRuntime(intellijUltimatePluginDep("coverage"))
|
||||
testRuntime(intellijUltimatePluginDep("maven"))
|
||||
testRuntime(intellijUltimatePluginDep("android"))
|
||||
testRuntime(intellijUltimatePluginDep("testng"))
|
||||
testRuntime(intellijUltimatePluginDep("IntelliLang"))
|
||||
testRuntime(intellijUltimatePluginDep("copyright"))
|
||||
testRuntime(intellijUltimatePluginDep("java-decompiler"))
|
||||
}
|
||||
|
||||
testRuntime(files("${System.getProperty("java.home")}/../lib/tools.jar"))
|
||||
|
||||
springClasspath(commonDep("org.springframework", "spring-core"))
|
||||
springClasspath(commonDep("org.springframework", "spring-beans"))
|
||||
springClasspath(commonDep("org.springframework", "spring-context"))
|
||||
springClasspath(commonDep("org.springframework", "spring-tx"))
|
||||
springClasspath(commonDep("org.springframework", "spring-web"))
|
||||
}
|
||||
|
||||
val preparedResources = File(buildDir, "prepResources")
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {
|
||||
projectDefault()
|
||||
resources.srcDir(preparedResources)
|
||||
}
|
||||
}
|
||||
|
||||
val ultimatePluginXmlContent: String by lazy {
|
||||
val sectRex = Regex("""^\s*</?idea-plugin>\s*$""")
|
||||
File(projectDir, "resources/META-INF/ultimate-plugin.xml")
|
||||
.readLines()
|
||||
.filterNot { it.matches(sectRex) }
|
||||
.joinToString("\n")
|
||||
}
|
||||
|
||||
val prepareResources by task<Copy> {
|
||||
dependsOn(":idea:assemble")
|
||||
from(ideaProjectResources, {
|
||||
exclude("META-INF/plugin.xml")
|
||||
})
|
||||
into(preparedResources)
|
||||
}
|
||||
|
||||
val preparePluginXml by task<Copy> {
|
||||
dependsOn(":idea:assemble")
|
||||
from(ideaProjectResources, { include("META-INF/plugin.xml") })
|
||||
into(preparedResources)
|
||||
filter {
|
||||
it?.replace("<!-- ULTIMATE-PLUGIN-PLACEHOLDER -->", ultimatePluginXmlContent)
|
||||
}
|
||||
}
|
||||
|
||||
val communityPluginProject = ":prepare:idea-plugin"
|
||||
|
||||
val jar = runtimeJar(task<ShadowJar>("shadowJar")) {
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
dependsOn(preparePluginXml)
|
||||
dependsOn("$communityPluginProject:shadowJar")
|
||||
val communityPluginJar = project(communityPluginProject).configurations["runtimeJar"].artifacts.files.singleFile
|
||||
from(zipTree(communityPluginJar), { exclude("META-INF/plugin.xml") })
|
||||
from(preparedResources, { include("META-INF/plugin.xml") })
|
||||
from(the<JavaPluginConvention>().sourceSets.getByName("main").output)
|
||||
archiveName = "kotlin-plugin.jar"
|
||||
}
|
||||
|
||||
val ideaPluginDir: File by rootProject.extra
|
||||
val ideaUltimatePluginDir: File by rootProject.extra
|
||||
|
||||
task<Copy>("ideaUltimatePlugin") {
|
||||
dependsOn(":ideaPlugin")
|
||||
into(ideaUltimatePluginDir)
|
||||
from(ideaPluginDir) { exclude("lib/kotlin-plugin.jar") }
|
||||
from(jar, { into("lib") })
|
||||
}
|
||||
|
||||
task("idea-ultimate-plugin") {
|
||||
dependsOn("ideaUltimatePlugin")
|
||||
doFirst { logger.warn("'$name' task is deprecated, use '${dependsOn.last()}' instead") }
|
||||
}
|
||||
|
||||
task("ideaUltimatePluginTest") {
|
||||
dependsOn("check")
|
||||
}
|
||||
|
||||
projectTest {
|
||||
dependsOn(prepareResources)
|
||||
dependsOn(preparePluginXml)
|
||||
workingDir = rootDir
|
||||
doFirst {
|
||||
if (intellijUltimateEnabled) {
|
||||
systemProperty("idea.home.path", intellijUltimateRootDir().canonicalPath)
|
||||
}
|
||||
systemProperty("spring.classpath", springClasspath.asPath)
|
||||
}
|
||||
}
|
||||
|
||||
val generateTests by generator("org.jetbrains.kotlin.tests.GenerateUltimateTestsKt")
|
||||
Reference in New Issue
Block a user