diff --git a/.gitignore b/.gitignore index 7082772f2b0..9b089b07c56 100644 --- a/.gitignore +++ b/.gitignore @@ -38,6 +38,7 @@ build/ .idea/artifacts/dist_auto_* .idea/artifacts/dist.xml .idea/artifacts/ideaPlugin.xml +.idea/artifacts/kotlin_compiler_jar.xml .idea/artifacts/kotlin_plugin_jar.xml .idea/artifacts/kotlin_jps_plugin_jar.xml .idea/artifacts/kotlin_daemon_client_jar.xml diff --git a/.idea/artifacts/kotlin_compiler_jar.xml b/.idea/artifacts/kotlin_compiler_jar.xml deleted file mode 100644 index 1fb47a78108..00000000000 --- a/.idea/artifacts/kotlin_compiler_jar.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - $PROJECT_DIR$/out/artifacts/kotlin_compiler_jar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/gradle/jps.gradle.kts b/gradle/jps.gradle.kts index 177d065f8e3..d488b8ca3d8 100644 --- a/gradle/jps.gradle.kts +++ b/gradle/jps.gradle.kts @@ -59,6 +59,8 @@ if (kotlinBuildProperties.isInJpsBuildIdeaSync) { ideArtifacts { generateIdeArtifacts(rootProject, this@ideArtifacts) + kotlinCompilerJar() + kotlinPluginJar() kotlinReflectJar() @@ -187,6 +189,9 @@ val jarArtifactProjects = listOf( "kotlin-reflect" ) +fun NamedDomainObjectContainer.kotlinCompilerJar() = + jarFromProject(project(":kotlin-compiler"), "kotlin-compiler.jar") + fun NamedDomainObjectContainer.kotlinReflectJar() = jarFromProject(project(":kotlin-reflect")) diff --git a/prepare/compiler/build.gradle.kts b/prepare/compiler/build.gradle.kts index 06a7fdff047..f55d8ca84bc 100644 --- a/prepare/compiler/build.gradle.kts +++ b/prepare/compiler/build.gradle.kts @@ -21,6 +21,17 @@ val fatJarContents by configurations.creating val fatJarContentsStripMetadata by configurations.creating val fatJarContentsStripServices by configurations.creating +// JPS build assumes fat jar is built from embedded configuration, +// but we can't use it in gradle build since slightly more complex processing is required like stripping metadata & services from some jars +if (kotlinBuildProperties.isInJpsBuildIdeaSync) { + val embedded by configurations + embedded.apply { + extendsFrom(fatJarContents) + extendsFrom(fatJarContentsStripMetadata) + extendsFrom(fatJarContentsStripServices) + } +} + val runtimeJar by configurations.creating val compile by configurations // maven plugin writes pom compile scope from compile configuration by default val proguardLibraries by configurations.creating { @@ -192,7 +203,7 @@ dependencies { } fatJarContentsStripServices(jpsStandalone()) { includeJars("jps-model") } - + fatJarContentsStripMetadata(intellijDep()) { includeJars("oro-2.0.8", "jdom", "log4j" ) } }