Convert the rest of the project to intellij repo prepared in buildSrc

This commit is contained in:
Ilya Chernikov
2017-12-08 23:19:21 +01:00
committed by Vyacheslav Gerasimov
parent e23b1529b3
commit 7e21573cf4
55 changed files with 451 additions and 997 deletions
@@ -3,9 +3,8 @@ description = "Kotlin Android Extensions Compiler"
apply { plugin("kotlin") }
configureIntellijPlugin {
setExtraDependencies("intellij-core")
}
val robolectricClasspath by configurations.creating
val androidJar by configurations.creating
dependencies {
compile(project(":compiler:util"))
@@ -14,23 +13,22 @@ dependencies {
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") }
testCompile(project(":compiler:util"))
testCompile(project(":compiler:backend"))
testCompile(project(":compiler:cli"))
testCompile(project(":compiler:tests-common"))
testCompile(project(":kotlin-android-extensions-runtime"))
testCompile(projectTests(":compiler:tests-common"))
testCompile(projectDist(":kotlin-test:kotlin-test-jvm"))
testCompile(commonDep("junit:junit"))
testRuntime(ideaPluginDeps("idea-junit", "resources_en", plugin = "junit"))
testCompile(project(":kotlin-android-extensions-runtime"))
}
afterEvaluate {
dependencies {
compileOnly(intellijCoreJar())
compileOnly(intellij { include("asm-all.jar") })
}
testRuntime(intellijPluginDep("junit")) { includeJars("idea-junit", "resources_en") }
robolectricClasspath(commonDep("org.robolectric", "robolectric"))
androidJar(project(":custom-dependencies:android-sdk", configuration = "androidJar"))
}
sourceSets {
@@ -54,4 +52,10 @@ projectTest {
environment("ANDROID_EXTENSIONS_RUNTIME_CLASSES", getSourceSetsFrom(":kotlin-android-extensions-runtime")["main"].output.classesDirs.asPath)
dependsOnTaskIfExistsRec("dist", project = rootProject)
workingDir = rootDir
doFirst {
val androidPluginPath = File(intellijRootDir(), "plugins/android").canonicalPath
systemProperty("ideaSdk.androidPlugin.path", androidPluginPath)
systemProperty("robolectric.classpath", robolectricClasspath.asPath)
systemProperty("android.jar", androidJar.singleFile.canonicalPath)
}
}