diff --git a/compiler/psi/build.gradle.kts b/compiler/psi/build.gradle.kts index c944dc97cfb..655ddf99d5b 100644 --- a/compiler/psi/build.gradle.kts +++ b/compiler/psi/build.gradle.kts @@ -39,4 +39,10 @@ sourceSets { ant.importBuild("buildLexer.xml") ant.properties["builddir"] = buildDir.absolutePath -ant.properties["flex.classpath"] = jflexPath.asPath + +tasks.findByName("lexer")!!.apply { + doFirst { + ant.properties["flex.classpath"] = jflexPath.asPath + } +} + diff --git a/include/kotlin-compiler/build.gradle.kts b/include/kotlin-compiler/build.gradle.kts index 865016a8dae..c781c85920f 100644 --- a/include/kotlin-compiler/build.gradle.kts +++ b/include/kotlin-compiler/build.gradle.kts @@ -34,10 +34,10 @@ dependencies { val jar: Jar by tasks jar.apply { dependsOn(fatJarContents) - from(compile.filter { it.extension == "jar" }.map { zipTree(it) }) - from(fatJarContents.map { zipTree(it) }) - from(fatJarContentsStripServices.map { zipTree(it) }) { exclude("META-INF/services/**") } - from(fatJarContentsStripMetadata.map { zipTree(it) }) { exclude("META-INF/jb/** META-INF/LICENSE") } + from { compile.filter { it.extension == "jar" }.map { zipTree(it) } } + from { fatJarContents.map { zipTree(it) } } + from { fatJarContentsStripServices.map { zipTree(it).matching { exclude("META-INF/services/**") } } } + from { fatJarContentsStripMetadata.map { zipTree(it).matching { exclude("META-INF/jb/** META-INF/LICENSE") } } } manifest.attributes["Class-Path"] = compilerManifestClassPath manifest.attributes["Main-Class"] = "org.jetbrains.kotlin.cli.jvm.K2JVMCompiler"