Extracted manifest values to manifest.properties file.
This commit is contained in:
Generated
+1
@@ -38,6 +38,7 @@
|
|||||||
<element id="module-output" name="cli-common" />
|
<element id="module-output" name="cli-common" />
|
||||||
<element id="module-output" name="util" />
|
<element id="module-output" name="util" />
|
||||||
<element id="module-output" name="preloader" />
|
<element id="module-output" name="preloader" />
|
||||||
|
<element id="file-copy" path="$PROJECT_DIR$/resources/manifest.properties" />
|
||||||
</element>
|
</element>
|
||||||
</element>
|
</element>
|
||||||
<element id="library" level="project" name="kotlin-runtime" />
|
<element id="library" level="project" name="kotlin-runtime" />
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
<exclude-output />
|
<exclude-output />
|
||||||
<content url="file://$MODULE_DIR$">
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/resources" isTestSource="false" />
|
||||||
<excludeFolder url="$MODULE_DIR$/libraries/out" />
|
<excludeFolder url="$MODULE_DIR$/libraries/out" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/android.tests.dependencies" />
|
<excludeFolder url="file://$MODULE_DIR$/android.tests.dependencies" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/dependencies" />
|
<excludeFolder url="file://$MODULE_DIR$/dependencies" />
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
<project name="Kotlin" default="dist">
|
<project name="Kotlin" default="dist">
|
||||||
|
|
||||||
|
<property file="resources/manifest.properties" />
|
||||||
|
|
||||||
<!-- Set to false to disable proguard run on kotlin-compiler.jar. Speeds up the build -->
|
<!-- Set to false to disable proguard run on kotlin-compiler.jar. Speeds up the build -->
|
||||||
<property name="shrink" value="true"/>
|
<property name="shrink" value="true"/>
|
||||||
<!-- Set to false to disable compiler's @NotNull assertions. Speeds up the build -->
|
<!-- Set to false to disable compiler's @NotNull assertions. Speeds up the build -->
|
||||||
@@ -146,10 +148,10 @@
|
|||||||
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
|
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
|
||||||
|
|
||||||
<manifest>
|
<manifest>
|
||||||
<attribute name="Built-By" value="JetBrains"/>
|
<attribute name="Built-By" value="${manifest.impl.vendor}"/>
|
||||||
|
|
||||||
<attribute name="Implementation-Vendor" value="JetBrains"/>
|
<attribute name="Implementation-Vendor" value="${manifest.impl.vendor}"/>
|
||||||
<attribute name="Implementation-Title" value="Kotlin Compiler Sources"/>
|
<attribute name="Implementation-Title" value="${manifest.impl.title.kotlin.compiler.sources}"/>
|
||||||
<attribute name="Implementation-Version" value="${build.number}"/>
|
<attribute name="Implementation-Version" value="${build.number}"/>
|
||||||
</manifest>
|
</manifest>
|
||||||
</jar>
|
</jar>
|
||||||
@@ -163,16 +165,16 @@
|
|||||||
sourcepathref="compilerSources.path"
|
sourcepathref="compilerSources.path"
|
||||||
classpathref="classpath"
|
classpathref="classpath"
|
||||||
linksource="yes"
|
linksource="yes"
|
||||||
windowtitle="Kotlin Compiler"/>
|
windowtitle="${manifest.impl.title.kotlin.compiler}"/>
|
||||||
<jar jarfile="${output}/kotlin-compiler-javadoc.jar">
|
<jar jarfile="${output}/kotlin-compiler-javadoc.jar">
|
||||||
<fileset dir="${output}/kotlin-compiler-javadoc"/>
|
<fileset dir="${output}/kotlin-compiler-javadoc"/>
|
||||||
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
|
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
|
||||||
|
|
||||||
<manifest>
|
<manifest>
|
||||||
<attribute name="Built-By" value="JetBrains"/>
|
<attribute name="Built-By" value="${manifest.impl.vendor}"/>
|
||||||
|
|
||||||
<attribute name="Implementation-Vendor" value="JetBrains"/>
|
<attribute name="Implementation-Vendor" value="${manifest.impl.vendor}"/>
|
||||||
<attribute name="Implementation-Title" value="Kotlin Compiler Javadoc"/>
|
<attribute name="Implementation-Title" value="${manifest.impl.title.kotlin.compiler.javadoc}"/>
|
||||||
<attribute name="Implementation-Version" value="${build.number}"/>
|
<attribute name="Implementation-Version" value="${build.number}"/>
|
||||||
</manifest>
|
</manifest>
|
||||||
</jar>
|
</jar>
|
||||||
@@ -181,10 +183,10 @@
|
|||||||
<else>
|
<else>
|
||||||
<jar jarfile="${output}/kotlin-compiler-javadoc.jar">
|
<jar jarfile="${output}/kotlin-compiler-javadoc.jar">
|
||||||
<manifest>
|
<manifest>
|
||||||
<attribute name="Built-By" value="JetBrains"/>
|
<attribute name="Built-By" value="${manifest.impl.vendor}"/>
|
||||||
|
|
||||||
<attribute name="Implementation-Vendor" value="JetBrains"/>
|
<attribute name="Implementation-Vendor" value="${manifest.impl.vendor}"/>
|
||||||
<attribute name="Implementation-Title" value="Kotlin Compiler Javadoc"/>
|
<attribute name="Implementation-Title" value="${manifest.impl.title.kotlin.compiler.javadoc}"/>
|
||||||
<attribute name="Implementation-Version" value="${build.number}"/>
|
<attribute name="Implementation-Version" value="${build.number}"/>
|
||||||
</manifest>
|
</manifest>
|
||||||
</jar>
|
</jar>
|
||||||
@@ -204,10 +206,10 @@
|
|||||||
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
|
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
|
||||||
|
|
||||||
<manifest>
|
<manifest>
|
||||||
<attribute name="Built-By" value="JetBrains"/>
|
<attribute name="Built-By" value="${manifest.impl.vendor}"/>
|
||||||
|
|
||||||
<attribute name="Implementation-Vendor" value="JetBrains"/>
|
<attribute name="Implementation-Vendor" value="${manifest.impl.vendor}"/>
|
||||||
<attribute name="Implementation-Title" value="Kotlin JavaScript StdLib"/>
|
<attribute name="Implementation-Title" value="${manifest.impl.title.kotlin.javascript.stdlib}"/>
|
||||||
<attribute name="Implementation-Version" value="${build.number}"/>
|
<attribute name="Implementation-Version" value="${build.number}"/>
|
||||||
</manifest>
|
</manifest>
|
||||||
</jar>
|
</jar>
|
||||||
@@ -242,10 +244,10 @@
|
|||||||
<fileset dir="${output}/classes/preloader"/>
|
<fileset dir="${output}/classes/preloader"/>
|
||||||
|
|
||||||
<manifest>
|
<manifest>
|
||||||
<attribute name="Built-By" value="JetBrains"/>
|
<attribute name="Built-By" value="${manifest.impl.vendor}"/>
|
||||||
|
|
||||||
<attribute name="Implementation-Vendor" value="JetBrains"/>
|
<attribute name="Implementation-Vendor" value="${manifest.impl.vendor}"/>
|
||||||
<attribute name="Implementation-Title" value="Kotlin Preloader"/>
|
<attribute name="Implementation-Title" value="${manifest.impl.title.kotlin.preloader}"/>
|
||||||
<attribute name="Implementation-Version" value="${build.number}"/>
|
<attribute name="Implementation-Version" value="${build.number}"/>
|
||||||
|
|
||||||
<attribute name="Main-Class" value="org.jetbrains.jet.preloading.Preloader"/>
|
<attribute name="Main-Class" value="org.jetbrains.jet.preloading.Preloader"/>
|
||||||
@@ -273,10 +275,10 @@
|
|||||||
<zipgroupfileset dir="${basedir}/dependencies" includes="cli-parser-1.1.1.jar"/>
|
<zipgroupfileset dir="${basedir}/dependencies" includes="cli-parser-1.1.1.jar"/>
|
||||||
|
|
||||||
<manifest>
|
<manifest>
|
||||||
<attribute name="Built-By" value="JetBrains"/>
|
<attribute name="Built-By" value="${manifest.impl.vendor}"/>
|
||||||
|
|
||||||
<attribute name="Implementation-Vendor" value="JetBrains"/>
|
<attribute name="Implementation-Vendor" value="${manifest.impl.vendor}"/>
|
||||||
<attribute name="Implementation-Title" value="Kotlin Compiler"/>
|
<attribute name="Implementation-Title" value="${manifest.impl.title.kotlin.compiler}"/>
|
||||||
<attribute name="Implementation-Version" value="${build.number}"/>
|
<attribute name="Implementation-Version" value="${build.number}"/>
|
||||||
|
|
||||||
<attribute name="Main-Class" value="org.jetbrains.jet.cli.jvm.K2JVMCompiler"/>
|
<attribute name="Main-Class" value="org.jetbrains.jet.cli.jvm.K2JVMCompiler"/>
|
||||||
@@ -430,10 +432,10 @@
|
|||||||
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
|
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
|
||||||
|
|
||||||
<manifest>
|
<manifest>
|
||||||
<attribute name="Built-By" value="JetBrains"/>
|
<attribute name="Built-By" value="${manifest.impl.vendor}"/>
|
||||||
|
|
||||||
<attribute name="Implementation-Vendor" value="JetBrains"/>
|
<attribute name="Implementation-Vendor" value="${manifest.impl.vendor}"/>
|
||||||
<attribute name="Implementation-Title" value="Kotlin Compiler Ant Tasks"/>
|
<attribute name="Implementation-Title" value="${manifest.impl.title.kotlin.compiler.ant.task}"/>
|
||||||
<attribute name="Implementation-Version" value="${build.number}"/>
|
<attribute name="Implementation-Version" value="${build.number}"/>
|
||||||
|
|
||||||
<attribute name="Class-Path" value="kotlin-compiler.jar"/>
|
<attribute name="Class-Path" value="kotlin-compiler.jar"/>
|
||||||
@@ -444,13 +446,13 @@
|
|||||||
<target name="jdkAnnotations">
|
<target name="jdkAnnotations">
|
||||||
<pack_annotations jarfile="kotlin-jdk-annotations.jar"
|
<pack_annotations jarfile="kotlin-jdk-annotations.jar"
|
||||||
annotationsdir="${basedir}/jdk-annotations"
|
annotationsdir="${basedir}/jdk-annotations"
|
||||||
title="Kotlin Compiler JDK Annotations"/>
|
title="${manifest.impl.title.kotlin.compiler.annotations.jdk}"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="androidSdkAnnotations">
|
<target name="androidSdkAnnotations">
|
||||||
<pack_annotations jarfile="kotlin-android-sdk-annotations.jar"
|
<pack_annotations jarfile="kotlin-android-sdk-annotations.jar"
|
||||||
annotationsdir="${basedir}/android-sdk-annotations"
|
annotationsdir="${basedir}/android-sdk-annotations"
|
||||||
title="Kotlin Compiler Android SDK Annotations"/>
|
title="${manifest.impl.title.kotlin.compiler.annotations.android.sdk}"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<macrodef name="pack_annotations">
|
<macrodef name="pack_annotations">
|
||||||
@@ -464,9 +466,9 @@
|
|||||||
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
|
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
|
||||||
|
|
||||||
<manifest>
|
<manifest>
|
||||||
<attribute name="Built-By" value="JetBrains"/>
|
<attribute name="Built-By" value="${manifest.impl.vendor}"/>
|
||||||
|
|
||||||
<attribute name="Implementation-Vendor" value="JetBrains"/>
|
<attribute name="Implementation-Vendor" value="${manifest.impl.vendor}"/>
|
||||||
<attribute name="Implementation-Title" value="@{title}"/>
|
<attribute name="Implementation-Title" value="@{title}"/>
|
||||||
<attribute name="Implementation-Version" value="${build.number}"/>
|
<attribute name="Implementation-Version" value="${build.number}"/>
|
||||||
</manifest>
|
</manifest>
|
||||||
@@ -486,10 +488,10 @@
|
|||||||
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
|
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
|
||||||
|
|
||||||
<manifest>
|
<manifest>
|
||||||
<attribute name="Built-By" value="JetBrains"/>
|
<attribute name="Built-By" value="${manifest.impl.vendor}"/>
|
||||||
|
|
||||||
<attribute name="Implementation-Vendor" value="JetBrains"/>
|
<attribute name="Implementation-Vendor" value="${manifest.impl.vendor}"/>
|
||||||
<attribute name="Implementation-Title" value="Kotlin Extended Annotations"/>
|
<attribute name="Implementation-Title" value="${manifest.impl.title.kotlin.compiler.annotations.extended}"/>
|
||||||
<attribute name="Implementation-Version" value="${build.number}"/>
|
<attribute name="Implementation-Version" value="${build.number}"/>
|
||||||
</manifest>
|
</manifest>
|
||||||
</jar>
|
</jar>
|
||||||
@@ -522,10 +524,10 @@
|
|||||||
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
|
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
|
||||||
|
|
||||||
<manifest>
|
<manifest>
|
||||||
<attribute name="Built-By" value="JetBrains"/>
|
<attribute name="Built-By" value="${manifest.impl.vendor}"/>
|
||||||
|
|
||||||
<attribute name="Implementation-Vendor" value="JetBrains"/>
|
<attribute name="Implementation-Vendor" value="${manifest.impl.vendor}"/>
|
||||||
<attribute name="Implementation-Title" value="Kotlin Compiler Runtime + StdLib"/>
|
<attribute name="Implementation-Title" value="${manifest.impl.title.kotlin.jvm.runtime.and.stdlib}"/>
|
||||||
<attribute name="Implementation-Version" value="${build.number}"/>
|
<attribute name="Implementation-Version" value="${build.number}"/>
|
||||||
</manifest>
|
</manifest>
|
||||||
</jar>
|
</jar>
|
||||||
@@ -538,10 +540,10 @@
|
|||||||
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
|
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
|
||||||
|
|
||||||
<manifest>
|
<manifest>
|
||||||
<attribute name="Built-By" value="JetBrains"/>
|
<attribute name="Built-By" value="${manifest.impl.vendor}"/>
|
||||||
|
|
||||||
<attribute name="Implementation-Vendor" value="JetBrains"/>
|
<attribute name="Implementation-Vendor" value="${manifest.impl.vendor}"/>
|
||||||
<attribute name="Implementation-Title" value="Kotlin Compiler Runtime + StdLib Sources"/>
|
<attribute name="Implementation-Title" value="${manifest.impl.title.kotlin.runtime.and.stdlib.sources}"/>
|
||||||
<attribute name="Implementation-Version" value="${build.number}"/>
|
<attribute name="Implementation-Version" value="${build.number}"/>
|
||||||
</manifest>
|
</manifest>
|
||||||
</jar>
|
</jar>
|
||||||
@@ -561,10 +563,10 @@
|
|||||||
<fileset dir="${output}/classes/j2k" includes="org/jetbrains/jet/j2k/**"/>
|
<fileset dir="${output}/classes/j2k" includes="org/jetbrains/jet/j2k/**"/>
|
||||||
|
|
||||||
<manifest>
|
<manifest>
|
||||||
<attribute name="Built-By" value="JetBrains"/>
|
<attribute name="Built-By" value="${manifest.impl.vendor}"/>
|
||||||
|
|
||||||
<attribute name="Implementation-Vendor" value="JetBrains"/>
|
<attribute name="Implementation-Vendor" value="${manifest.impl.vendor}"/>
|
||||||
<attribute name="Implementation-Title" value="Java to Kotlin Converter"/>
|
<attribute name="Implementation-Title" value="${manifest.impl.title.java2kotlin.converter}"/>
|
||||||
<attribute name="Implementation-Version" value="${build.number}"/>
|
<attribute name="Implementation-Version" value="${build.number}"/>
|
||||||
|
|
||||||
<attribute name="Main-Class" value="org.jetbrains.jet.j2k.JavaToKotlinTranslator"/>
|
<attribute name="Main-Class" value="org.jetbrains.jet.j2k.JavaToKotlinTranslator"/>
|
||||||
|
|||||||
@@ -16,21 +16,47 @@
|
|||||||
|
|
||||||
package org.jetbrains.jet.utils;
|
package org.jetbrains.jet.utils;
|
||||||
|
|
||||||
|
import com.intellij.openapi.diagnostic.Logger;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.util.Properties;
|
||||||
import java.util.jar.Attributes;
|
import java.util.jar.Attributes;
|
||||||
import java.util.jar.JarFile;
|
import java.util.jar.JarFile;
|
||||||
import java.util.jar.Manifest;
|
import java.util.jar.Manifest;
|
||||||
|
|
||||||
public class LibraryUtils {
|
public class LibraryUtils {
|
||||||
public static final String VENDOR_JETBRAINS = "JetBrains";
|
private static final Logger LOG = Logger.getInstance(LibraryUtils.class);
|
||||||
|
|
||||||
public static final String TITLE_KOTLIN_RUNTIME_AND_STDLIB = "Kotlin Compiler Runtime + StdLib";
|
public static final String TITLE_KOTLIN_JVM_RUNTIME_AND_STDLIB;
|
||||||
public static final String TITLE_KOTLIN_RUNTIME_AND_STDLIB_SOURCES = "Kotlin Compiler Runtime + StdLib Sources";
|
public static final String TITLE_KOTLIN_JAVASCRIPT_STDLIB;
|
||||||
public static final String TITLE_KOTLIN_JAVASCRIPT_STDLIB = "Kotlin JavaScript StdLib";
|
|
||||||
|
static {
|
||||||
|
String jsStdLib = "";
|
||||||
|
String jvmStdLib = "";
|
||||||
|
|
||||||
|
InputStream manifestProperties = LibraryUtils.class.getResourceAsStream("/manifest.properties");
|
||||||
|
if (manifestProperties != null) {
|
||||||
|
try {
|
||||||
|
Properties properties = new Properties();
|
||||||
|
properties.load(manifestProperties);
|
||||||
|
jvmStdLib = properties.getProperty("manifest.impl.title.kotlin.jvm.runtime.and.stdlib");
|
||||||
|
jsStdLib = properties.getProperty("manifest.impl.title.kotlin.javascript.stdlib");
|
||||||
|
}
|
||||||
|
catch (IOException e) {
|
||||||
|
LOG.error(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
LOG.error("Resource 'manifest.properties' not found.");
|
||||||
|
}
|
||||||
|
|
||||||
|
TITLE_KOTLIN_JVM_RUNTIME_AND_STDLIB = jvmStdLib;
|
||||||
|
TITLE_KOTLIN_JAVASCRIPT_STDLIB = jsStdLib;
|
||||||
|
}
|
||||||
|
|
||||||
private LibraryUtils() {}
|
private LibraryUtils() {}
|
||||||
|
|
||||||
@@ -71,6 +97,6 @@ public class LibraryUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isJvmRuntimeLibrary(@NotNull File library) {
|
public static boolean isJvmRuntimeLibrary(@NotNull File library) {
|
||||||
return checkImplTitle(library, TITLE_KOTLIN_RUNTIME_AND_STDLIB);
|
return checkImplTitle(library, TITLE_KOTLIN_JVM_RUNTIME_AND_STDLIB);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="intellij-core" level="project" />
|
<orderEntry type="library" scope="PROVIDED" name="intellij-core" level="project" />
|
||||||
<orderEntry type="module" module-name="util.runtime" exported="" />
|
<orderEntry type="module" module-name="util.runtime" exported="" />
|
||||||
|
<orderEntry type="module" module-name="Kotlin" exported="" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
manifest.impl.vendor=JetBrains
|
||||||
|
|
||||||
|
manifest.impl.title.kotlin.compiler=Kotlin Compiler
|
||||||
|
manifest.impl.title.kotlin.compiler.javadoc=Kotlin Compiler Javadoc
|
||||||
|
manifest.impl.title.kotlin.compiler.sources=Kotlin Compiler Sources
|
||||||
|
|
||||||
|
manifest.impl.title.kotlin.compiler.ant.task=Kotlin Compiler Ant Tasks
|
||||||
|
|
||||||
|
manifest.impl.title.kotlin.compiler.annotations.jdk=Kotlin Compiler JDK Annotations
|
||||||
|
manifest.impl.title.kotlin.compiler.annotations.android.sdk=Kotlin Compiler Android SDK Annotations
|
||||||
|
manifest.impl.title.kotlin.compiler.annotations.extended=Kotlin Extended Annotations
|
||||||
|
|
||||||
|
manifest.impl.title.kotlin.jvm.runtime.and.stdlib=Kotlin Compiler Runtime + StdLib
|
||||||
|
manifest.impl.title.kotlin.runtime.and.stdlib.sources=Kotlin Compiler Runtime + StdLib Sources
|
||||||
|
manifest.impl.title.kotlin.javascript.stdlib=Kotlin JavaScript StdLib
|
||||||
|
|
||||||
|
manifest.impl.title.kotlin.preloader=Kotlin Preloader
|
||||||
|
|
||||||
|
manifest.impl.title.java2kotlin.converter=Java to Kotlin Converter
|
||||||
Reference in New Issue
Block a user