Kotlinc: Exclude module-info.class from resulting jar when "-include-runtime" is specified
This commit is contained in:
committed by
Alexander Udalov
parent
742fef9042
commit
4374438ff1
@@ -19,6 +19,7 @@ package org.jetbrains.kotlin.cli.jvm.compiler;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.io.FileUtilRt;
|
||||
import kotlin.io.FilesKt;
|
||||
import kotlin.text.StringsKt;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.backend.common.output.OutputFile;
|
||||
@@ -131,6 +132,9 @@ public class CompileEnvironmentUtil {
|
||||
if (e == null) {
|
||||
break;
|
||||
}
|
||||
if (StringsKt.substringAfterLast(e.getName(), "/", e.getName()).equals("module-info.class")) {
|
||||
continue;
|
||||
}
|
||||
if (resetJarTimestamps) {
|
||||
e.setTime(DOS_EPOCH);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user