Refactor and clean preloader project
This commit is contained in:
@@ -6,7 +6,7 @@ apply { plugin("kotlin") }
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(commonDep("org.apache.ant", "ant"))
|
||||
compile(project(":compiler:preloader"))
|
||||
compile(project(":kotlin-preloader"))
|
||||
compile(project(":kotlin-stdlib"))
|
||||
buildVersion()
|
||||
}
|
||||
|
||||
+1
-1
@@ -158,7 +158,7 @@ fun Project.allprojectsRecursive(body: Project.() -> Unit) {
|
||||
|
||||
allprojects {
|
||||
|
||||
setBuildDir(File(commonBuildDir, project.name))
|
||||
buildDir = File(commonBuildDir, project.name)
|
||||
|
||||
repositories {
|
||||
for (repo in (rootProject.extra["repos"] as List<String>)) {
|
||||
|
||||
@@ -95,17 +95,20 @@ fun Project.ideaPlugin() = ideaPlugin {
|
||||
}
|
||||
|
||||
|
||||
fun Project.dist(body: Copy.() -> Unit = {}) {
|
||||
fun Project.dist(body: Copy.() -> Unit) {
|
||||
task<Copy>("dist") {
|
||||
tasks.findByName("assemble")?.let {
|
||||
dependsOn(it)
|
||||
}
|
||||
body()
|
||||
rename("-${java.util.regex.Pattern.quote(rootProject.extra["build.number"].toString())}", "")
|
||||
into(rootProject.extra["distLibDir"].toString())
|
||||
}
|
||||
}
|
||||
|
||||
fun Project.dist() = dist {
|
||||
tasks.findByName("jar")?.let {
|
||||
from(it)
|
||||
}
|
||||
}
|
||||
|
||||
fun ConfigurationContainer.getOrCreate(name: String): Configuration = findByName(name) ?: create(name)
|
||||
|
||||
fun Jar.setupPublicJar(classifier: String = "", classifierDescr: String? = null) {
|
||||
|
||||
@@ -16,7 +16,7 @@ dependencies {
|
||||
compile(project(":compiler:cli"))
|
||||
compile(project(":compiler:light-classes"))
|
||||
compile(project(":compiler:serialization"))
|
||||
compile(project(":compiler:preloader"))
|
||||
compile(project(":kotlin-preloader"))
|
||||
compile(project(":compiler:daemon-common"))
|
||||
compile(project(":compiler:daemon-client"))
|
||||
compile(project(":js:js.serializer"))
|
||||
|
||||
@@ -5,7 +5,7 @@ dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":build-common"))
|
||||
compile(project(":compiler:cli-common"))
|
||||
compile(project(":compiler:preloader"))
|
||||
compile(project(":kotlin-preloader"))
|
||||
compile(project(":compiler:frontend.java"))
|
||||
compile(project(":compiler:daemon-common"))
|
||||
compile(project(":compiler:daemon-client"))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
import org.gradle.jvm.tasks.Jar
|
||||
description = "Kotlin Preloader"
|
||||
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
@@ -9,17 +9,17 @@ dependencies {
|
||||
buildVersion()
|
||||
}
|
||||
|
||||
configureKotlinProjectSources("src", "instrumentation/src")
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" {
|
||||
java {
|
||||
srcDirs( "src", "instrumentation/src")
|
||||
}
|
||||
}
|
||||
"test" { none() }
|
||||
}
|
||||
|
||||
val jar: Jar by tasks
|
||||
jar.apply {
|
||||
setupRuntimeJar("Kotlin Preloader")
|
||||
runtimeJar {
|
||||
manifest.attributes.put("Main-Class", "org.jetbrains.kotlin.preloading.Preloader")
|
||||
archiveName = "kotlin-preloader.jar"
|
||||
}
|
||||
|
||||
dist {
|
||||
from(jar)
|
||||
}
|
||||
|
||||
dist()
|
||||
|
||||
@@ -26,7 +26,7 @@ dependencies {
|
||||
testCompile(project(":kotlin-runtime"))
|
||||
testCompile(project(":kotlin-reflect"))
|
||||
testCompile(projectTests(":compiler"))
|
||||
testRuntime(project(":compiler:preloader"))
|
||||
testRuntime(project(":kotlin-preloader"))
|
||||
testRuntime(ideaSdkCoreDeps("*.jar"))
|
||||
testRuntime(ideaSdkDeps("*.jar"))
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ dependencies {
|
||||
compile(project(":compiler:daemon-common"))
|
||||
compile(project(":compiler:daemon-client"))
|
||||
compile(project(":compiler:frontend.java"))
|
||||
compile(project(":compiler:preloader"))
|
||||
compile(project(":kotlin-preloader"))
|
||||
compile(project(":idea:idea-jps-common"))
|
||||
compile(ideaSdkDeps("jps-builders", "jps-builders-6", subdir = "jps"))
|
||||
buildVersion()
|
||||
|
||||
@@ -12,7 +12,7 @@ val projectsToShadow = listOf(
|
||||
":core",
|
||||
":idea:idea-jps-common",
|
||||
":jps-plugin",
|
||||
":compiler:preloader",
|
||||
":kotlin-preloader",
|
||||
":compiler:util",
|
||||
":core:util.runtime",
|
||||
":plugins:android-extensions-jps")
|
||||
|
||||
@@ -42,7 +42,7 @@ val projectsToShadow = listOf(
|
||||
":js:js.serializer",
|
||||
":compiler:light-classes",
|
||||
":compiler:plugin-api",
|
||||
":compiler:preloader",
|
||||
":kotlin-preloader",
|
||||
":compiler:resolution",
|
||||
":compiler:serialization",
|
||||
":compiler:util",
|
||||
|
||||
@@ -126,6 +126,7 @@ project(':kotlin-compiler').projectDir = "$rootDir/prepare/compiler" as File
|
||||
project(':kotlin-compiler-embeddable').projectDir = "$rootDir/prepare/compiler-embeddable" as File
|
||||
project(':kotlin-compiler-client-embeddable').projectDir = "$rootDir/prepare/compiler-client-embeddable" as File
|
||||
project(':kotlin-daemon-client').projectDir = "$rootDir/prepare/daemon-client" as File
|
||||
project(':kotlin-preloader').projectDir = "$rootDir/compiler/preloader" as File
|
||||
project(':compiler:cli-common').projectDir = "$rootDir/compiler/cli/cli-common" as File
|
||||
project(':compiler:cli-runner').projectDir = "$rootDir/compiler/cli/cli-runner" as File
|
||||
project(':compiler:daemon-common').projectDir = "$rootDir/compiler/daemon/daemon-common" as File
|
||||
|
||||
Reference in New Issue
Block a user