Files
kotlin-fork/plugins/android-extensions/android-extensions-compiler/build.gradle.kts
T
Nikolay Krasko 17421ed14d 191: asm-all has 7.0-beta version in Intellij 191
Pass project to fetch extra parameters for asm-all work
2018-10-19 19:16:21 +03:00

68 lines
2.1 KiB
Kotlin

description = "Kotlin Android Extensions Compiler"
plugins {
kotlin("jvm")
id("jps-compatible")
}
val robolectricClasspath by configurations.creating
dependencies {
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
compile(project(":compiler:util"))
compile(project(":compiler:plugin-api"))
compile(project(":compiler:frontend"))
compile(project(":compiler:frontend.java"))
compile(project(":compiler:backend"))
compileOnly(project(":kotlin-android-extensions-runtime"))
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
compileOnly(intellijDep()) { includeJars("asm-all", rootProject = rootProject) }
testCompile(project(":compiler:util"))
testCompile(project(":compiler:backend"))
testCompile(project(":compiler:cli"))
testCompile(project(":kotlin-android-extensions-runtime"))
testCompile(projectTests(":compiler:tests-common"))
testCompile(project(":kotlin-test:kotlin-test-jvm"))
testCompile(commonDep("junit:junit"))
testRuntime(intellijPluginDep("junit")) { includeJars("idea-junit", "resources_en") }
robolectricClasspath(commonDep("org.robolectric", "robolectric"))
robolectricClasspath("org.robolectric:android-all:4.4_r1-robolectric-1")
robolectricClasspath(project(":kotlin-android-extensions-runtime")) { isTransitive = false }
embeddedComponents(project(":kotlin-android-extensions-runtime")) { isTransitive = false }
}
sourceSets {
"main" { projectDefault() }
"test" { projectDefault() }
}
runtimeJar {
fromEmbeddedComponents()
}
dist()
ideaPlugin()
testsJar {}
evaluationDependsOn(":kotlin-android-extensions-runtime")
projectTest {
environment("ANDROID_EXTENSIONS_RUNTIME_CLASSES", getSourceSetsFrom(":kotlin-android-extensions-runtime")["main"].output.classesDirs.asPath)
dependsOn(":dist")
workingDir = rootDir
useAndroidJar()
doFirst {
val androidPluginPath = File(intellijRootDir(), "plugins/android").canonicalPath
systemProperty("ideaSdk.androidPlugin.path", androidPluginPath)
systemProperty("robolectric.classpath", robolectricClasspath.asPath)
}
}