Refactoring - renaming projects, applying sourceSets DSL

This commit is contained in:
Ilya Chernikov
2017-09-11 14:21:44 +02:00
parent a6aaee3fe0
commit 96d5e0bb21
23 changed files with 84 additions and 93 deletions
+4 -2
View File
@@ -13,8 +13,10 @@ dependencies {
runtime(project(":kotlin-stdlib"))
}
configureKotlinProjectSourcesDefault()
configureKotlinProjectNoTests()
sourceSets {
"main" { default() }
"test" { none() }
}
val jar = runtimeJar {
from(fileTree("$projectDir/src")) { include("META-INF/**") }
@@ -1,5 +1,5 @@
import org.gradle.jvm.tasks.Jar
description = "Kotlin Android Extensions Compiler"
apply { plugin("kotlin") }
@@ -18,16 +18,17 @@ configureKotlinProjectSources("android-extensions-compiler/src", "android-extens
configureKotlinProjectResourcesDefault(sourcesBaseDir = File(rootDir, "plugins", "android-extensions", "android-extensions-compiler", "src"))
configureKotlinProjectNoTests()
val jar: Jar by tasks
jar.apply {
setupRuntimeJar("Kotlin Android Extensions Compiler")
sourceSets {
"main" {
default()
java.srcDir("../android-extensions-runtime/src")
}
"test" { none() }
}
dist {
from(jar)
}
runtimeJar ()
ideaPlugin {
from(jar)
}
dist()
ideaPlugin()
@@ -14,7 +14,7 @@ dependencies {
compile(project(":compiler:light-classes"))
compile(project(":idea:idea-core"))
compile(project(":idea"))
compile(project(":plugins:android-extensions-compiler"))
compile(project(":android-extensions-compiler"))
compile(ideaPluginDeps("android", "sdk-tools", "sdk-common", plugin = "android"))
compile(ideaPluginDeps("Groovy", plugin = "Groovy"))
testCompile(project(":compiler.tests-common"))
@@ -5,7 +5,7 @@ dependencies {
val compile by configurations
compile(project(":compiler:util"))
compile(project(":jps-plugin"))
compile(project(":plugins:android-extensions-compiler"))
compile(project(":android-extensions-compiler"))
compile(ideaPluginDeps("android-jps-plugin", plugin = "android", subdir = "lib/jps"))
}
+1 -1
View File
@@ -11,7 +11,7 @@ dependencies {
testCompile(project(":compiler:backend"))
testCompile(project(":compiler:cli"))
testCompile(project(":compiler.tests-common"))
testCompile(project(":plugins:android-extensions-compiler"))
testCompile(project(":android-extensions-compiler"))
testCompile(project(":plugins:android-extensions-idea"))
testCompile(project(":plugins:allopen-ide")) { isTransitive = false }
testCompile(project(":kotlin-allopen-compiler-plugin"))
@@ -13,8 +13,10 @@ dependencies {
runtime(project(":kotlin-stdlib"))
}
configureKotlinProjectSourcesDefault()
configureKotlinProjectNoTests()
sourceSets {
"main" { default() }
"test" { none() }
}
val jar = runtimeJar {
from(fileTree("$projectDir/src")) { include("META-INF/**") }
@@ -22,23 +22,12 @@ dependencies {
testCompile(project(":compiler:cli-common"))
testCompile(project(":compiler:frontend.java"))
testCompile(project(":compiler:daemon-common"))
testCompile(project(":compiler:daemon-client"))
testCompile(project(":kotlin-daemon-client"))
}
configureKotlinProjectSourcesDefault()
configureKotlinProjectResources("src") {
include("META-INF/**")
}
configureKotlinProjectTestsDefault()
val jar = runtimeJar()
sourcesJar()
javadocJar()
publish()
dist {
from(jar)
sourceSets {
"main" { default() }
"test" { default() }
}
tasks.withType<Test> {
@@ -46,6 +35,14 @@ tasks.withType<Test> {
workingDir = rootDir
systemProperty("idea.is.unit.test", "true")
environment("NO_FS_ROOTS_ACCESS_CHECK", "true")
environment("KOTLIN_HOME", rootProject.extra["distKotlinHomeDir"])
ignoreFailures = true
}
runtimeJar()
sourcesJar()
javadocJar()
dist()
publish()