Implement publishing in the build
This commit is contained in:
Generated
+208
-28
@@ -1,35 +1,215 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<option name="BUILD_PROCESS_HEAP_SIZE" value="2000" />
|
||||
<excludeFromCompile>
|
||||
<directory url="file://$PROJECT_DIR$/core/reflection.jvm" includeSubdirectories="true" />
|
||||
<directory url="file://$PROJECT_DIR$/core/runtime.jvm" includeSubdirectories="true" />
|
||||
<directory url="file://$PROJECT_DIR$/core/builtins" includeSubdirectories="true" />
|
||||
<directory url="file://$PROJECT_DIR$/core/script.runtime" includeSubdirectories="true" />
|
||||
</excludeFromCompile>
|
||||
<wildcardResourcePatterns>
|
||||
<entry name="!?*.java" />
|
||||
<entry name="!?*.form" />
|
||||
<entry name="!?*.class" />
|
||||
<entry name="!?*.groovy" />
|
||||
<entry name="!?*.scala" />
|
||||
<entry name="!?*.flex" />
|
||||
<entry name="!?*.kt" />
|
||||
<entry name="!?*.clj" />
|
||||
</wildcardResourcePatterns>
|
||||
<bytecodeTargetLevel>
|
||||
<module name="android-studio" target="1.8" />
|
||||
<module name="idea" target="1.8" />
|
||||
<module name="idea-analysis" target="1.8" />
|
||||
<module name="idea-completion" target="1.8" />
|
||||
<module name="idea-core" target="1.8" />
|
||||
<module name="idea-live-templates" target="1.8" />
|
||||
<module name="idea-repl" target="1.8" />
|
||||
<module name="idea-runner" target="1.8" />
|
||||
<module name="idea-test-framework" target="1.8" />
|
||||
<module name="j2k" target="1.8" />
|
||||
<module name="kannotator-jps-plugin-test" target="1.8" />
|
||||
<module name="allopen-cli_main" target="1.8" />
|
||||
<module name="allopen-cli_test" target="1.8" />
|
||||
<module name="allopen-ide_main" target="1.8" />
|
||||
<module name="allopen-ide_test" target="1.8" />
|
||||
<module name="android-extensions-compiler_main" target="1.8" />
|
||||
<module name="android-extensions-compiler_test" target="1.8" />
|
||||
<module name="android-extensions-idea_main" target="1.8" />
|
||||
<module name="android-extensions-idea_test" target="1.8" />
|
||||
<module name="android-extensions-jps_main" target="1.8" />
|
||||
<module name="android-extensions-jps_test" target="1.8" />
|
||||
<module name="android-lint_main" target="1.8" />
|
||||
<module name="android-lint_test" target="1.8" />
|
||||
<module name="android-tests_main" target="1.8" />
|
||||
<module name="android-tests_test" target="1.8" />
|
||||
<module name="annotation-based-compiler-plugins-ide-support_main" target="1.8" />
|
||||
<module name="annotation-based-compiler-plugins-ide-support_test" target="1.8" />
|
||||
<module name="annotation-processor-example_main" target="1.8" />
|
||||
<module name="annotation-processor-example_test" target="1.8" />
|
||||
<module name="ant_main" target="1.8" />
|
||||
<module name="ant_test" target="1.8" />
|
||||
<module name="backend-common_main" target="1.8" />
|
||||
<module name="backend-common_test" target="1.8" />
|
||||
<module name="backend_main" target="1.8" />
|
||||
<module name="backend_test" target="1.8" />
|
||||
<module name="binary-compatibility-validator_main" target="1.8" />
|
||||
<module name="binary-compatibility-validator_test" target="1.8" />
|
||||
<module name="build-common_main" target="1.8" />
|
||||
<module name="build-common_test" target="1.8" />
|
||||
<module name="buildSrc_main" target="1.8" />
|
||||
<module name="buildSrc_test" target="1.8" />
|
||||
<module name="builtins_main" target="1.8" />
|
||||
<module name="builtins_test" target="1.8" />
|
||||
<module name="cli-common_main" target="1.8" />
|
||||
<module name="cli-common_test" target="1.8" />
|
||||
<module name="cli-runner_main" target="1.8" />
|
||||
<module name="cli-runner_test" target="1.8" />
|
||||
<module name="cli_main" target="1.8" />
|
||||
<module name="cli_test" target="1.8" />
|
||||
<module name="compiler-client-embeddable_main" target="1.8" />
|
||||
<module name="compiler-client-embeddable_test" target="1.8" />
|
||||
<module name="compiler-runner_main" target="1.8" />
|
||||
<module name="compiler-runner_test" target="1.8" />
|
||||
<module name="compiler.tests-common_main" target="1.8" />
|
||||
<module name="compiler.tests-common_test" target="1.8" />
|
||||
<module name="compiler_main" target="1.8" />
|
||||
<module name="compiler_test" target="1.8" />
|
||||
<module name="container_main" target="1.8" />
|
||||
<module name="container_test" target="1.8" />
|
||||
<module name="core_main" target="1.8" />
|
||||
<module name="core_test" target="1.8" />
|
||||
<module name="daemon-client_main" target="1.8" />
|
||||
<module name="daemon-client_test" target="1.8" />
|
||||
<module name="daemon-common_main" target="1.8" />
|
||||
<module name="daemon-common_test" target="1.8" />
|
||||
<module name="eval4j_main" target="1.8" />
|
||||
<module name="eval4j_test" target="1.8" />
|
||||
<module name="frontend.java_main" target="1.8" />
|
||||
<module name="frontend.java_test" target="1.8" />
|
||||
<module name="frontend.script_main" target="1.8" />
|
||||
<module name="frontend.script_test" target="1.8" />
|
||||
<module name="frontend_main" target="1.8" />
|
||||
<module name="frontend_test" target="1.8" />
|
||||
<module name="generators_main" target="1.8" />
|
||||
<module name="generators_test" target="1.8" />
|
||||
<module name="ide-common_main" target="1.8" />
|
||||
<module name="ide-common_test" target="1.8" />
|
||||
<module name="ide-lazy-resolver_main" target="1.8" />
|
||||
<module name="ide-lazy-resolver_test" target="1.8" />
|
||||
<module name="idea-android-output-parser_main" target="1.8" />
|
||||
<module name="idea-android-output-parser_test" target="1.8" />
|
||||
<module name="idea-android_main" target="1.8" />
|
||||
<module name="idea-android_test" target="1.8" />
|
||||
<module name="idea-core_main" target="1.8" />
|
||||
<module name="idea-core_test" target="1.8" />
|
||||
<module name="idea-formatter_main" target="1.8" />
|
||||
<module name="idea-formatter_test" target="1.8" />
|
||||
<module name="idea-jps-common_main" target="1.8" />
|
||||
<module name="idea-jps-common_test" target="1.8" />
|
||||
<module name="idea-test-framework_main" target="1.8" />
|
||||
<module name="idea-test-framework_test" target="1.8" />
|
||||
<module name="idea_main" target="1.8" />
|
||||
<module name="idea_test" target="1.8" />
|
||||
<module name="incremental-compilation-impl_main" target="1.8" />
|
||||
<module name="incremental-compilation-impl_test" target="1.8" />
|
||||
<module name="ir.ir2cfg_main" target="1.8" />
|
||||
<module name="ir.ir2cfg_test" target="1.8" />
|
||||
<module name="ir.psi2ir_main" target="1.8" />
|
||||
<module name="ir.psi2ir_test" target="1.8" />
|
||||
<module name="ir.tree_main" target="1.8" />
|
||||
<module name="ir.tree_test" target="1.8" />
|
||||
<module name="j2k_main" target="1.8" />
|
||||
<module name="j2k_test" target="1.8" />
|
||||
<module name="js.ast_main" target="1.8" />
|
||||
<module name="js.ast_test" target="1.8" />
|
||||
<module name="js.dce_main" target="1.8" />
|
||||
<module name="js.dce_test" target="1.8" />
|
||||
<module name="js.frontend_main" target="1.8" />
|
||||
<module name="js.frontend_test" target="1.8" />
|
||||
<module name="js.parser_main" target="1.8" />
|
||||
<module name="js.parser_test" target="1.8" />
|
||||
<module name="js.serializer_main" target="1.8" />
|
||||
<module name="js.serializer_test" target="1.8" />
|
||||
<module name="js.tests_main" target="1.8" />
|
||||
<module name="js.tests_test" target="1.8" />
|
||||
<module name="js.translator_main" target="1.8" />
|
||||
<module name="js.translator_test" target="1.8" />
|
||||
<module name="kapt3_main" target="1.8" />
|
||||
<module name="kapt3_test" target="1.8" />
|
||||
<module name="kotlin-allopen_main" target="1.8" />
|
||||
<module name="kotlin-allopen_test" target="1.8" />
|
||||
<module name="kotlin-annotation-processing_main" target="1.8" />
|
||||
<module name="kotlin-annotation-processing_test" target="1.8" />
|
||||
<module name="kotlin-gradle-plugin-api_main" target="1.8" />
|
||||
<module name="kotlin-gradle-plugin-api_test" target="1.8" />
|
||||
<module name="kotlin-gradle-plugin-integration-tests_main" target="1.8" />
|
||||
<module name="kotlin-gradle-plugin-integration-tests_test" target="1.8" />
|
||||
<module name="kotlin-gradle-plugin_agp25" target="1.8" />
|
||||
<module name="kotlin-gradle-plugin_main" target="1.8" />
|
||||
<module name="kotlin-gradle-plugin_test" target="1.8" />
|
||||
<module name="kotlin-gradle-subplugin-example_main" target="1.8" />
|
||||
<module name="kotlin-gradle-subplugin-example_test" target="1.8" />
|
||||
<module name="kotlin-gradle-tooling_main" target="1.8" />
|
||||
<module name="kotlin-gradle-tooling_test" target="1.8" />
|
||||
<module name="kotlin-jps-plugin_main" target="1.8" />
|
||||
<module name="kotlin-jps-plugin_test" target="1.8" />
|
||||
<module name="kotlin-noarg_main" target="1.8" />
|
||||
<module name="kotlin-noarg_test" target="1.8" />
|
||||
<module name="kotlin-reflect_main" target="1.6" />
|
||||
<module name="kotlin-reflect_test" target="1.6" />
|
||||
<module name="kotlin-runtime_main" target="1.6" />
|
||||
<module name="kotlin-runtime_test" target="1.6" />
|
||||
<module name="kotlin-sam-with-receiver_main" target="1.8" />
|
||||
<module name="kotlin-sam-with-receiver_test" target="1.8" />
|
||||
<module name="kotlin-script-runtime_main" target="1.6" />
|
||||
<module name="kotlin-script-runtime_test" target="1.6" />
|
||||
<module name="kotlin-stdlib-common_main" target="1.8" />
|
||||
<module name="kotlin-stdlib-common_test" target="1.8" />
|
||||
<module name="kotlin-stdlib-gen_main" target="1.8" />
|
||||
<module name="kotlin-stdlib-gen_test" target="1.8" />
|
||||
<module name="kotlin-stdlib-jre7_main" target="1.6" />
|
||||
<module name="kotlin-stdlib-jre7_test" target="1.6" />
|
||||
<module name="kotlin-stdlib-jre8_main" target="1.6" />
|
||||
<module name="kotlin-stdlib-jre8_test" target="1.6" />
|
||||
<module name="kotlin-stdlib-js-merger_main" target="1.8" />
|
||||
<module name="kotlin-stdlib-js-merger_test" target="1.8" />
|
||||
<module name="kotlin-stdlib-js_builtins" target="1.8" />
|
||||
<module name="kotlin-stdlib-js_main" target="1.8" />
|
||||
<module name="kotlin-stdlib-js_test" target="1.8" />
|
||||
<module name="kotlin-stdlib_annotations" target="1.6" />
|
||||
<module name="kotlin-stdlib_builtins" target="1.6" />
|
||||
<module name="kotlin-stdlib_main" target="1.6" />
|
||||
<module name="kotlin-stdlib_test" target="1.6" />
|
||||
<module name="kotlin-test-common_main" target="1.8" />
|
||||
<module name="kotlin-test-common_test" target="1.8" />
|
||||
<module name="kotlin-test-js_main" target="1.8" />
|
||||
<module name="kotlin-test-js_test" target="1.8" />
|
||||
<module name="kotlin-test-junit_main" target="1.6" />
|
||||
<module name="kotlin-test-junit_test" target="1.6" />
|
||||
<module name="kotlin-test-jvm_main" target="1.6" />
|
||||
<module name="kotlin-test-jvm_test" target="1.6" />
|
||||
<module name="kotlin_main" target="1.8" />
|
||||
<module name="kotlin_test" target="1.8" />
|
||||
<module name="light-classes_main" target="1.8" />
|
||||
<module name="light-classes_test" target="1.8" />
|
||||
<module name="lint_main" target="1.8" />
|
||||
<module name="lint_test" target="1.8" />
|
||||
<module name="mock-runtime-for-test_main" target="1.8" />
|
||||
<module name="mock-runtime-for-test_test" target="1.8" />
|
||||
<module name="noarg-cli_main" target="1.8" />
|
||||
<module name="noarg-cli_test" target="1.8" />
|
||||
<module name="noarg-ide_main" target="1.8" />
|
||||
<module name="noarg-ide_test" target="1.8" />
|
||||
<module name="plugin-api_main" target="1.8" />
|
||||
<module name="plugin-api_test" target="1.8" />
|
||||
<module name="plugins-tests_main" target="1.8" />
|
||||
<module name="plugins-tests_test" target="1.8" />
|
||||
<module name="preloader_main" target="1.8" />
|
||||
<module name="preloader_test" target="1.8" />
|
||||
<module name="prepare-formatter_main" target="1.8" />
|
||||
<module name="prepare-formatter_test" target="1.8" />
|
||||
<module name="prepare-jps-plugin_main" target="1.8" />
|
||||
<module name="prepare-jps-plugin_test" target="1.8" />
|
||||
<module name="reflection.jvm_main" target="1.8" />
|
||||
<module name="reflection.jvm_test" target="1.8" />
|
||||
<module name="resolution_main" target="1.8" />
|
||||
<module name="resolution_test" target="1.8" />
|
||||
<module name="sam-with-receiver-cli_main" target="1.8" />
|
||||
<module name="sam-with-receiver-cli_test" target="1.8" />
|
||||
<module name="sam-with-receiver-ide_main" target="1.8" />
|
||||
<module name="sam-with-receiver-ide_test" target="1.8" />
|
||||
<module name="samples_main" target="1.8" />
|
||||
<module name="samples_test" target="1.8" />
|
||||
<module name="script.runtime_main" target="1.8" />
|
||||
<module name="script.runtime_test" target="1.8" />
|
||||
<module name="serialization_main" target="1.8" />
|
||||
<module name="serialization_test" target="1.8" />
|
||||
<module name="source-sections-compiler_main" target="1.8" />
|
||||
<module name="source-sections-compiler_test" target="1.8" />
|
||||
<module name="tests-java8_main" target="1.8" />
|
||||
<module name="tests-java8_test" target="1.8" />
|
||||
<module name="uast-kotlin-idea_main" target="1.8" />
|
||||
<module name="uast-kotlin-idea_test" target="1.8" />
|
||||
<module name="uast-kotlin_main" target="1.8" />
|
||||
<module name="uast-kotlin_test" target="1.8" />
|
||||
<module name="util.runtime_main" target="1.8" />
|
||||
<module name="util.runtime_test" target="1.8" />
|
||||
<module name="util_main" target="1.8" />
|
||||
<module name="util_test" target="1.8" />
|
||||
</bytecodeTargetLevel>
|
||||
</component>
|
||||
</project>
|
||||
@@ -7,7 +7,7 @@ dependencies {
|
||||
val compile by configurations
|
||||
compile(commonDep("org.apache.ant", "ant"))
|
||||
compile(project(":compiler:preloader"))
|
||||
compile(kotlinDep("stdlib"))
|
||||
compile(project(":kotlin-stdlib"))
|
||||
buildVersion()
|
||||
}
|
||||
|
||||
|
||||
+9
-5
@@ -11,7 +11,8 @@ buildscript {
|
||||
extra["kotlin_gradle_plugin_version"] = extra["kotlin_version"]
|
||||
extra["repos"] = listOf("https://dl.bintray.com/kotlin/kotlin-dev",
|
||||
"https://repo.gradle.org/gradle/repo",
|
||||
"https://plugins.gradle.org/m2")
|
||||
"https://plugins.gradle.org/m2",
|
||||
"http://repository.jetbrains.com/utils/")
|
||||
|
||||
repositories {
|
||||
for (repo in (rootProject.extra["repos"] as List<String>)) {
|
||||
@@ -83,7 +84,7 @@ extra["versions.javax.inject"] = "1"
|
||||
extra["versions.jsr305"] = "1.3.9"
|
||||
extra["versions.cli-parser"] = "1.1.2"
|
||||
extra["versions.jansi"] = "1.11"
|
||||
extra["versions.jline"] = "2.12.1"
|
||||
extra["versions.jline"] = "3.3.1"
|
||||
extra["versions.junit"] = "4.12"
|
||||
extra["versions.javaslang"] = "2.0.6"
|
||||
extra["versions.ant"] = "1.8.2"
|
||||
@@ -124,9 +125,12 @@ allprojects {
|
||||
version = buildNumber
|
||||
}
|
||||
|
||||
applyFrom("libraries/commonConfiguration.gradle")
|
||||
applyFrom("libraries/gradlePluginsConfiguration.gradle")
|
||||
applyFrom("libraries/configureGradleTools.gradle")
|
||||
apply {
|
||||
from("libraries/commonConfiguration.gradle")
|
||||
from("libraries/gradlePluginsConfiguration.gradle")
|
||||
from("libraries/configureGradleTools.gradle")
|
||||
// from("libraries/prepareSonatypeStaging.gradle")
|
||||
}
|
||||
|
||||
val importedAntTasksPrefix = "imported-ant-update-"
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
rootProject.buildFileName = 'build.gradle.kts'
|
||||
@@ -0,0 +1,93 @@
|
||||
package plugins
|
||||
|
||||
import org.codehaus.groovy.runtime.InvokerHelper
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.artifacts.dsl.RepositoryHandler
|
||||
import org.gradle.api.artifacts.maven.GroovyMavenDeployer
|
||||
|
||||
import org.gradle.api.plugins.MavenRepositoryHandlerConvention
|
||||
import org.gradle.api.tasks.Upload
|
||||
import org.gradle.kotlin.dsl.*
|
||||
|
||||
|
||||
/**
|
||||
* Configures a Kotlin module for publication.
|
||||
*
|
||||
*/
|
||||
open class PublishedKotlinModule : Plugin<Project> {
|
||||
|
||||
override fun apply(project: Project) {
|
||||
|
||||
project.run {
|
||||
|
||||
plugins.apply("maven")
|
||||
|
||||
(tasks.getByName("uploadArchives") as Upload).apply {
|
||||
|
||||
val preparePublication = project.rootProject.tasks.getByName("preparePublication")
|
||||
dependsOn(preparePublication)
|
||||
|
||||
val username: String? by preparePublication.extra
|
||||
val password: String? by preparePublication.extra
|
||||
|
||||
repositories {
|
||||
withConvention(MavenRepositoryHandlerConvention::class) {
|
||||
|
||||
mavenDeployer {
|
||||
withGroovyBuilder {
|
||||
"repository"("url" to uri(preparePublication.extra["repoUrl"]))
|
||||
|
||||
if (username != null && password != null) {
|
||||
"authentication"("userName" to username, "password" to password)
|
||||
}
|
||||
}
|
||||
|
||||
pom.project {
|
||||
withGroovyBuilder {
|
||||
"licenses" {
|
||||
"license" {
|
||||
"name"("The Apache Software License, Version 2.0")
|
||||
"url"("http://www.apache.org/licenses/LICENSE-2.0.txt")
|
||||
"distribution"("repo")
|
||||
}
|
||||
}
|
||||
"name"("${project.group}:${project.name}")
|
||||
"packaging"("jar")
|
||||
// optionally artifactId can be defined here
|
||||
"description"(project.description)
|
||||
"url"("https://kotlinlang.org/")
|
||||
"licenses" {
|
||||
"license" {
|
||||
"name"("The Apache License, Version 2.0")
|
||||
"url"("http://www.apache.org/licenses/LICENSE-2.0.txt")
|
||||
}
|
||||
}
|
||||
"scm" {
|
||||
"url"("https://github.com/JetBrains/kotlin")
|
||||
"connection"("scm:git:https://github.com/JetBrains/kotlin.git")
|
||||
"developerConnection"("scm:git:https://github.com/JetBrains/kotlin.git")
|
||||
}
|
||||
"developers" {
|
||||
"developer" {
|
||||
"name"("Kotlin Team")
|
||||
"organization" {
|
||||
"name"("JetBrains")
|
||||
"url"("https://www.jetbrains.com")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
pom.whenConfigured {
|
||||
dependencies.removeIf {
|
||||
InvokerHelper.getMetaClass(it).getProperty(it, "scope") == "test"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,7 @@ dependencies {
|
||||
compile(project(":js:js.frontend"))
|
||||
compile(project(":js:js.translator"))
|
||||
compile(project(":plugins:android-extensions-compiler"))
|
||||
compile(kotlinDep("test"))
|
||||
compile(project(":kotlin-test:kotlin-test-jvm"))
|
||||
compile(commonDep("junit"))
|
||||
compile(ideaSdkCoreDeps("intellij-core"))
|
||||
compile(ideaSdkDeps("openapi", "idea", "idea_rt"))
|
||||
|
||||
@@ -7,6 +7,7 @@ dependencies {
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":compiler:frontend"))
|
||||
compile(project(":compiler:ir.tree"))
|
||||
compile(project(":compiler:cli-common"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSources("backend-common/src", "ir/backend.common/src", sourcesBaseDir = File(rootDir, "compiler"))
|
||||
|
||||
@@ -77,7 +77,7 @@ dependencies {
|
||||
compileOnly(project(":build-common"))
|
||||
compileOnly(ideaSdkCoreDeps(*(rootProject.extra["ideaCoreSdkJars"] as Array<String>)))
|
||||
compileOnly(commonDep("org.fusesource.jansi", "jansi"))
|
||||
compileOnly(commonDep("jline"))
|
||||
compileOnly(commonDep("org.jline", "jline"))
|
||||
|
||||
testCompile(commonDep("junit:junit"))
|
||||
testCompile(project(":kotlin-test:kotlin-test-jvm"))
|
||||
@@ -108,7 +108,7 @@ dependencies {
|
||||
fatJarContents(ideaSdkDeps("jna-platform", "oromatcher"))
|
||||
fatJarContents(ideaSdkDeps("jps-model.jar", subdir = "jps"))
|
||||
fatJarContents(commonDep("javax.inject"))
|
||||
fatJarContents(commonDep("jline"))
|
||||
fatJarContents(commonDep("org.jline", "jline"))
|
||||
fatJarContents(protobufFull())
|
||||
fatJarContents(commonDep("com.github.spullara.cli-parser", "cli-parser"))
|
||||
fatJarContents(commonDep("com.google.code.findbugs", "jsr305"))
|
||||
@@ -118,9 +118,9 @@ dependencies {
|
||||
proguardLibraryJars(files(firstFromJavaHomeThatExists("lib/rt.jar", "../Classes/classes.jar"),
|
||||
firstFromJavaHomeThatExists("lib/jsse.jar", "../Classes/jsse.jar"),
|
||||
firstFromJavaHomeThatExists("../lib/tools.jar", "../Classes/tools.jar")))
|
||||
proguardLibraryJars(kotlinDep("stdlib"))
|
||||
proguardLibraryJars(kotlinDep("script-runtime"))
|
||||
proguardLibraryJars(kotlinDep("reflect"))
|
||||
proguardLibraryJars(project(":kotlin-stdlib", configuration = "mainJar"))
|
||||
proguardLibraryJars(project(":kotlin-script-runtime", configuration = "mainJar"))
|
||||
proguardLibraryJars(project(":kotlin-reflect", configuration = "mainJar"))
|
||||
proguardLibraryJars(preloadedDeps("kotlinx-coroutines-core"))
|
||||
|
||||
// proguardLibraryJars(project(":prepare:runtime", configuration = "default").apply { isTransitive = false })
|
||||
|
||||
@@ -18,7 +18,7 @@ dependencies {
|
||||
compile(project(":js:js.dce"))
|
||||
compile(ideaSdkCoreDeps(*(rootProject.extra["ideaCoreSdkJars"] as Array<String>)))
|
||||
compile(commonDep("org.fusesource.jansi", "jansi"))
|
||||
compile(commonDep("jline"))
|
||||
compile(commonDep("org.jline", "jline"))
|
||||
compile(files("${System.getProperty("java.home")}/../lib/tools.jar"))
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(kotlinDep("stdlib"))
|
||||
compile(project(":kotlin-stdlib"))
|
||||
buildVersion()
|
||||
}
|
||||
|
||||
|
||||
@@ -498,7 +498,7 @@ class KotlinCoreEnvironment private constructor(
|
||||
val pluginRoot =
|
||||
configuration.get(CLIConfigurationKeys.INTELLIJ_PLUGIN_ROOT)?.let(::File)
|
||||
?: configuration.get(CLIConfigurationKeys.COMPILER_JAR_LOCATOR)?.compilerJar
|
||||
?: PathUtil.getPathUtilJar().takeIf { it.hasConfigFile(configFilePath) }
|
||||
?: PathUtil.pathUtilJar.takeIf { it.hasConfigFile(configFilePath) }
|
||||
// hack for load extensions when compiler run directly from project directory (e.g. in tests)
|
||||
?: File("idea/src").takeIf { it.hasConfigFile(configFilePath) }
|
||||
?: throw IllegalStateException("Unable to find extension point configuration $configFilePath")
|
||||
|
||||
@@ -5,7 +5,7 @@ dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":compiler:frontend"))
|
||||
compile(kotlinDep("reflect"))
|
||||
compile(project(":kotlin-reflect"))
|
||||
compile(preloadedDeps("kotlinx-coroutines-core"))
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ dependencies {
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":compiler:container"))
|
||||
compile(project(":compiler:resolution"))
|
||||
compile(kotlinDep("script-runtime"))
|
||||
compile(project(":kotlin-script-runtime"))
|
||||
compile(commonDep("io.javaslang","javaslang"))
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ apply { plugin("kotlin") }
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":core:builtins"))
|
||||
compile(kotlinDep("stdlib"))
|
||||
compile(project(":kotlin-stdlib"))
|
||||
buildVersion()
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ apply {
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":core:builtins"))
|
||||
compile(kotlinDep("stdlib"))
|
||||
compile(project(":kotlin-stdlib"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
|
||||
@@ -7,7 +7,7 @@ dependencies {
|
||||
val testCompileOnly by configurations
|
||||
val testRuntime by configurations
|
||||
|
||||
compile(kotlinDep("reflect"))
|
||||
compile(project(":kotlin-reflect"))
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":compiler:light-classes"))
|
||||
compile(project(":compiler:frontend"))
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.1.4-eap-33
|
||||
1.1.5-dev-393
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.1.4-eap-33
|
||||
1.1.5-dev-393
|
||||
|
||||
@@ -4,7 +4,7 @@ apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(kotlinDep("stdlib"))
|
||||
compile(project(":kotlin-stdlib"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSources("src/kotlin")
|
||||
|
||||
@@ -15,6 +15,7 @@ dependencies {
|
||||
}
|
||||
|
||||
configureKotlinProjectSources("android-extensions-compiler/src", "android-extensions-runtime/src", sourcesBaseDir = File(rootDir, "plugins", "android-extensions"))
|
||||
configureKotlinProjectResourcesDefault(sourcesBaseDir = File(rootDir, "plugins", "android-extensions", "android-extensions-compiler", "src"))
|
||||
configureKotlinProjectNoTests()
|
||||
|
||||
val jar: Jar by tasks
|
||||
|
||||
@@ -0,0 +1,190 @@
|
||||
/*
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath("com.github.jengelman.gradle.plugins:shadow:1.2.3")
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
maven
|
||||
}
|
||||
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
val jarContents by configurations.creating
|
||||
val testRuntimeCompilerJar by configurations.creating
|
||||
val testStdlibJar by configurations.creating
|
||||
val testScriptRuntimeJar by configurations.creating
|
||||
val default by configurations
|
||||
val archives by configurations
|
||||
|
||||
val projectsToInclude = listOf(
|
||||
":compiler:cli-common",
|
||||
":compiler:daemon-common",
|
||||
":compiler:daemon-client")
|
||||
|
||||
dependencies {
|
||||
val testCompile by configurations
|
||||
projectsToInclude.forEach {
|
||||
jarContents(project(it)) { isTransitive = false }
|
||||
testCompile(project(it))
|
||||
}
|
||||
testCompile(commonDep("junit:junit"))
|
||||
testCompile(project(":kotlin-test:kotlin-test-jvm"))
|
||||
testCompile(project(":kotlin-test:kotlin-test-junit"))
|
||||
testRuntimeCompilerJar(project(":compiler", configuration = "compilerJar"))
|
||||
testStdlibJar(project(":kotlin-stdlib", configuration = "mainJar"))
|
||||
testScriptRuntimeJar(project(":kotlin-script-runtime", configuration = "mainJar"))
|
||||
}
|
||||
|
||||
val shadowJar by task<ShadowJar> {
|
||||
setupRuntimeJar("Kotlin compiler client embeddable")
|
||||
baseName = "kotlin-compiler-client-embeddable"
|
||||
from(jarContents)
|
||||
classifier = ""
|
||||
}
|
||||
|
||||
configureKotlinProjectSources() // no sources
|
||||
configureKotlinProjectTests("libraries/tools/kotlin-compiler-client-embeddable-test/src", sourcesBaseDir = rootDir)
|
||||
|
||||
tasks.withType<Test> {
|
||||
dependsOnTaskIfExistsRec("dist", project = rootProject)
|
||||
workingDir = File(rootDir, "libraries/tools/kotlin-compiler-client-embeddable-test/src")
|
||||
systemProperty("idea.is.unit.test", "true")
|
||||
environment("NO_FS_ROOTS_ACCESS_CHECK", "true")
|
||||
systemProperty("kotlin.test.script.classpath", the<JavaPluginConvention>().sourceSets.getByName("test").output.classesDirs.joinToString(File.pathSeparator))
|
||||
jvmArgs("-ea", "-XX:+HeapDumpOnOutOfMemoryError", "-Xmx1200m", "-XX:+UseCodeCacheFlushing", "-XX:ReservedCodeCacheSize=128m", "-Djna.nosys=true")
|
||||
maxHeapSize = "1200m"
|
||||
ignoreFailures = true
|
||||
systemProperty("idea.is.unit.test", "true")
|
||||
systemProperty("compilerJar", testRuntimeCompilerJar.singleFile.canonicalPath)
|
||||
systemProperty("stdlibJar", testStdlibJar.singleFile.canonicalPath)
|
||||
systemProperty("scriptRuntimeJar", testScriptRuntimeJar.singleFile.canonicalPath)
|
||||
}
|
||||
|
||||
archives.artifacts.let { artifacts ->
|
||||
artifacts.forEach {
|
||||
if (it.type == "jar") {
|
||||
artifacts.remove(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
artifacts.add(default.name, shadowJar.outputs.files.singleFile) {
|
||||
builtBy(shadowJar)
|
||||
classifier = ""
|
||||
}
|
||||
|
||||
artifacts.add("archives", shadowJar.outputs.files.singleFile) {
|
||||
builtBy(shadowJar)
|
||||
classifier = ""
|
||||
}
|
||||
|
||||
apply<plugins.PublishedKotlinModule>()
|
||||
|
||||
//tasks {
|
||||
// "uploadArchives"(Upload::class) {
|
||||
//
|
||||
// val preparePublication by rootProject.tasks
|
||||
// dependsOn(preparePublication)
|
||||
//
|
||||
// val username: String? by preparePublication.extra
|
||||
// val password: String? by preparePublication.extra
|
||||
//
|
||||
// repositories {
|
||||
// withConvention(MavenRepositoryHandlerConvention::class) {
|
||||
//
|
||||
// mavenDeployer {
|
||||
// withGroovyBuilder {
|
||||
// "repository"("url" to uri(preparePublication.extra["repoUrl"]))
|
||||
//
|
||||
// if (username != null && password != null) {
|
||||
// "authentication"("userName" to username, "password" to password)
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// pom.project {
|
||||
// withGroovyBuilder {
|
||||
// "licenses" {
|
||||
// "license" {
|
||||
// "name"("The Apache Software License, Version 2.0")
|
||||
// "url"("http://www.apache.org/licenses/LICENSE-2.0.txt")
|
||||
// "distribution"("repo")
|
||||
// }
|
||||
// }
|
||||
// "name"("${project.group}:${project.name}")
|
||||
// "packaging"("jar")
|
||||
// // optionally artifactId can be defined here
|
||||
// "description"(project.description)
|
||||
// "url"("https://kotlinlang.org/")
|
||||
// "licenses" {
|
||||
// "license" {
|
||||
// "name"("The Apache License, Version 2.0")
|
||||
// "url"("http://www.apache.org/licenses/LICENSE-2.0.txt")
|
||||
// }
|
||||
// }
|
||||
// "scm" {
|
||||
// "url"("https://github.com/JetBrains/kotlin")
|
||||
// "connection"("scm:git:https://github.com/JetBrains/kotlin.git")
|
||||
// "developerConnection"("scm:git:https://github.com/JetBrains/kotlin.git")
|
||||
// }
|
||||
// "developers" {
|
||||
// "developer" {
|
||||
// "name"("Kotlin Team")
|
||||
// "organization"("JetBrains")
|
||||
// "organizationUrl"("https://www.jetbrains.com")
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// pom.whenConfigured {
|
||||
// dependencies.clear()
|
||||
//// dependencies.removeIf {
|
||||
//// withGroovyBuilder {
|
||||
//// "scope"(*emptyArray()) == "test"
|
||||
//// }
|
||||
//// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
@@ -45,7 +45,7 @@ dependencies {
|
||||
ideaSdkCoreCfg(ideaSdkDeps("jna-platform", "oromatcher"))
|
||||
ideaSdkCoreCfg(ideaSdkDeps("jps-model.jar", subdir = "jps"))
|
||||
otherDepsCfg(commonDep("javax.inject"))
|
||||
otherDepsCfg(commonDep("jline"))
|
||||
otherDepsCfg(commonDep("org.jline", "jline"))
|
||||
otherDepsCfg(protobufFull())
|
||||
otherDepsCfg(commonDep("com.github.spullara.cli-parser", "cli-parser"))
|
||||
otherDepsCfg(commonDep("com.google.code.findbugs", "jsr305"))
|
||||
|
||||
+105
-107
@@ -1,111 +1,108 @@
|
||||
// modules
|
||||
include 'buildSrc' // this fixes import into idea, so buildsrc is not longer imported with different gradle version
|
||||
include "build-common"
|
||||
include "compiler"
|
||||
include "compiler:util"
|
||||
include "compiler:daemon-common"
|
||||
include "compiler:daemon-client"
|
||||
include "compiler:preloader"
|
||||
include "compiler:cli-runner"
|
||||
include "compiler:container"
|
||||
include "compiler:resolution"
|
||||
include "compiler:serialization"
|
||||
include "compiler:frontend"
|
||||
include "compiler:frontend.java"
|
||||
include "compiler:frontend.script"
|
||||
include "compiler:compiler-runner"
|
||||
include "compiler:cli-common"
|
||||
include "compiler:ir.tree"
|
||||
include "compiler:ir.psi2ir"
|
||||
include "compiler:ir.ir2cfg"
|
||||
include "compiler:backend-common"
|
||||
include "compiler:backend"
|
||||
include "compiler:plugin-api"
|
||||
include "compiler:light-classes"
|
||||
include "compiler:cli"
|
||||
include "compiler:incremental-compilation-impl"
|
||||
include "compiler:android-tests"
|
||||
include "compiler.tests-common"
|
||||
include "js:js.ast"
|
||||
include "js:js.serializer"
|
||||
include "js:js.parser"
|
||||
include "js:js.frontend"
|
||||
include "js:js.translator"
|
||||
include "js:js.dce"
|
||||
include "js:js.tests"
|
||||
include "jps-plugin"
|
||||
include "core"
|
||||
include "core:builtins"
|
||||
include "core:reflection.jvm"
|
||||
include "core:script.runtime"
|
||||
include "core:util.runtime"
|
||||
include "custom-dependencies:protobuf-lite"
|
||||
include "idea:idea-jps-common"
|
||||
include "idea:formatter"
|
||||
include "idea:ide-common"
|
||||
include "idea:idea-core"
|
||||
include "idea:kotlin-gradle-tooling"
|
||||
include "idea:idea-android"
|
||||
include "idea:idea-android-output-parser"
|
||||
include "idea:idea-test-framework"
|
||||
include "idea"
|
||||
include "eval4j"
|
||||
include "j2k"
|
||||
include "plugins:lint"
|
||||
include "plugins:android-extensions-compiler"
|
||||
include "plugins:android-extensions-idea"
|
||||
include "plugins:android-extensions-jps"
|
||||
include "plugins:allopen-cli"
|
||||
include "plugins:allopen-ide"
|
||||
include "plugins:noarg-cli"
|
||||
include "plugins:noarg-ide"
|
||||
include "plugins:sam-with-receiver-cli"
|
||||
include "plugins:sam-with-receiver-ide"
|
||||
include "plugins:source-sections-compiler"
|
||||
include "plugins:uast-kotlin"
|
||||
include "plugins:uast-kotlin-idea"
|
||||
include "plugins:annotation-based-compiler-plugins-ide-support"
|
||||
include "plugins:kapt3"
|
||||
include "plugins:plugins-tests"
|
||||
include "kotlin-script-runtime"
|
||||
include "kotlin-runtime"
|
||||
include "kotlin-test:kotlin-test-common"
|
||||
include "kotlin-test:kotlin-test-jvm"
|
||||
include "kotlin-test:kotlin-test-junit"
|
||||
include "kotlin-test:kotlin-test-js"
|
||||
include "kotlin-stdlib-common"
|
||||
include "kotlin-stdlib"
|
||||
include "kotlin-stdlib-js"
|
||||
include "kotlin-stdlib-jre7"
|
||||
include "kotlin-stdlib-jre8"
|
||||
include "kotlin-stdlib:samples"
|
||||
include "prepare:build.version"
|
||||
//include "prepare:compiler"
|
||||
//include "prepare:compiler-embeddable"
|
||||
//include "prepare:reflect"
|
||||
//include "prepare:runtime"
|
||||
include "prepare:jps-plugin"
|
||||
include "prepare:formatter"
|
||||
include "prepare:ide-lazy-resolver"
|
||||
include "prepare:kotlin-plugin"
|
||||
include "prepare:android-lint"
|
||||
include "prepare:mock-runtime-for-test"
|
||||
include "kotlin-reflect"
|
||||
include "ant"
|
||||
include "compiler:tests-java8"
|
||||
include "generators"
|
||||
include 'tools:binary-compatibility-validator'
|
||||
include 'tools:kotlin-stdlib-js-merger'
|
||||
include 'tools:kotlin-stdlib-gen'
|
||||
include ':kotlin-gradle-plugin-api',
|
||||
':kotlin-gradle-plugin',
|
||||
':kotlin-gradle-plugin-integration-tests',
|
||||
':kotlin-allopen',
|
||||
':kotlin-noarg',
|
||||
':kotlin-sam-with-receiver',
|
||||
':kotlin-gradle-subplugin-example'
|
||||
|
||||
include ':examples:annotation-processor-example'
|
||||
//include ":buildSrc" // this fixes import into idea, so buildsrc is not longer imported with different gradle version
|
||||
include ":build-common",
|
||||
":compiler",
|
||||
":compiler:util",
|
||||
":compiler:daemon-common",
|
||||
":compiler:daemon-client",
|
||||
":compiler:preloader",
|
||||
":compiler:cli-runner",
|
||||
":compiler:container",
|
||||
":compiler:resolution",
|
||||
":compiler:serialization",
|
||||
":compiler:frontend",
|
||||
":compiler:frontend.java",
|
||||
":compiler:frontend.script",
|
||||
":compiler:compiler-runner",
|
||||
":compiler:cli-common",
|
||||
":compiler:ir.tree",
|
||||
":compiler:ir.psi2ir",
|
||||
":compiler:ir.ir2cfg",
|
||||
":compiler:backend-common",
|
||||
":compiler:backend",
|
||||
":compiler:plugin-api",
|
||||
":compiler:light-classes",
|
||||
":compiler:cli",
|
||||
":compiler:incremental-compilation-impl",
|
||||
":compiler:android-tests",
|
||||
":compiler.tests-common",
|
||||
":js:js.ast",
|
||||
":js:js.serializer",
|
||||
":js:js.parser",
|
||||
":js:js.frontend",
|
||||
":js:js.translator",
|
||||
":js:js.dce",
|
||||
":js:js.tests",
|
||||
":jps-plugin",
|
||||
":core",
|
||||
":core:builtins",
|
||||
":core:reflection.jvm",
|
||||
":core:script.runtime",
|
||||
":core:util.runtime",
|
||||
":custom-dependencies:protobuf-lite",
|
||||
":idea:idea-jps-common",
|
||||
":idea:formatter",
|
||||
":idea:ide-common",
|
||||
":idea:idea-core",
|
||||
":idea:kotlin-gradle-tooling",
|
||||
":idea:idea-android",
|
||||
":idea:idea-android-output-parser",
|
||||
":idea:idea-test-framework",
|
||||
":idea",
|
||||
":eval4j",
|
||||
":j2k",
|
||||
":plugins:lint",
|
||||
":plugins:android-extensions-compiler",
|
||||
":plugins:android-extensions-idea",
|
||||
":plugins:android-extensions-jps",
|
||||
":plugins:allopen-cli",
|
||||
":plugins:allopen-ide",
|
||||
":plugins:noarg-cli",
|
||||
":plugins:noarg-ide",
|
||||
":plugins:sam-with-receiver-cli",
|
||||
":plugins:sam-with-receiver-ide",
|
||||
":plugins:source-sections-compiler",
|
||||
":plugins:uast-kotlin",
|
||||
":plugins:uast-kotlin-idea",
|
||||
":plugins:annotation-based-compiler-plugins-ide-support",
|
||||
":plugins:kapt3",
|
||||
":plugins:plugins-tests",
|
||||
":kotlin-script-runtime",
|
||||
":kotlin-runtime",
|
||||
":kotlin-test:kotlin-test-common",
|
||||
":kotlin-test:kotlin-test-jvm",
|
||||
":kotlin-test:kotlin-test-junit",
|
||||
":kotlin-test:kotlin-test-js",
|
||||
":kotlin-stdlib-common",
|
||||
":kotlin-stdlib",
|
||||
":kotlin-stdlib-js",
|
||||
":kotlin-stdlib-jre7",
|
||||
":kotlin-stdlib-jre8",
|
||||
":kotlin-stdlib:samples",
|
||||
":prepare:build.version",
|
||||
":prepare:jps-plugin",
|
||||
":prepare:formatter",
|
||||
":prepare:ide-lazy-resolver",
|
||||
":prepare:kotlin-plugin",
|
||||
":prepare:android-lint",
|
||||
":prepare:mock-runtime-for-test",
|
||||
":prepare:compiler-client-embeddable",
|
||||
":kotlin-reflect",
|
||||
":ant",
|
||||
":compiler:tests-java8",
|
||||
":generators",
|
||||
":tools:binary-compatibility-validator",
|
||||
":tools:kotlin-stdlib-js-merger",
|
||||
":tools:kotlin-stdlib-gen",
|
||||
":kotlin-gradle-plugin-api",
|
||||
":kotlin-gradle-plugin",
|
||||
":kotlin-gradle-plugin-integration-tests",
|
||||
":kotlin-allopen",
|
||||
":kotlin-noarg",
|
||||
":kotlin-sam-with-receiver",
|
||||
":kotlin-gradle-subplugin-example",
|
||||
":examples:annotation-processor-example",
|
||||
":kotlin-annotation-processing"
|
||||
|
||||
rootProject.name = "kotlin"
|
||||
|
||||
@@ -151,6 +148,7 @@ project(':kotlin-noarg').projectDir = "$rootDir/libraries/tools/kotlin-noarg" as
|
||||
project(':kotlin-sam-with-receiver').projectDir = "$rootDir/libraries/tools/kotlin-sam-with-receiver" as File
|
||||
project(':kotlin-gradle-subplugin-example').projectDir = "$rootDir/libraries/examples/kotlin-gradle-subplugin-example" as File
|
||||
project(':examples:annotation-processor-example').projectDir = "$rootDir/libraries/examples/annotation-processor-example" as File
|
||||
project(':kotlin-annotation-processing').projectDir = "$rootDir/libraries/tools/kotlin-annotation-processing" as File
|
||||
|
||||
def setBuildFile(ProjectDescriptor project) {
|
||||
if (project.projectDir.listFiles().any { file -> file.name == "build.gradle.kts"}) {
|
||||
|
||||
Reference in New Issue
Block a user