diff --git a/TeamCityBuild.xml b/TeamCityBuild.xml
index f767ee1f867..2697df2f043 100644
--- a/TeamCityBuild.xml
+++ b/TeamCityBuild.xml
@@ -13,8 +13,8 @@
-
-
+
+
diff --git a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/repl/KotlinJsr223JvmScriptEngineFactoryBase.kt b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/repl/KotlinJsr223JvmScriptEngineFactoryBase.kt
index 9e0f7bfd0b5..cedfb1ba130 100644
--- a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/repl/KotlinJsr223JvmScriptEngineFactoryBase.kt
+++ b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/repl/KotlinJsr223JvmScriptEngineFactoryBase.kt
@@ -16,16 +16,16 @@
package org.jetbrains.kotlin.cli.common.repl
-import org.jetbrains.kotlin.cli.common.KotlinVersion
+import org.jetbrains.kotlin.config.KotlinCompilerVersion
import javax.script.ScriptEngine
import javax.script.ScriptEngineFactory
abstract class KotlinJsr223JvmScriptEngineFactoryBase : ScriptEngineFactory {
override fun getLanguageName(): String = "kotlin"
- override fun getLanguageVersion(): String = KotlinVersion.VERSION
+ override fun getLanguageVersion(): String = KotlinCompilerVersion.VERSION
override fun getEngineName(): String = "kotlin"
- override fun getEngineVersion(): String = KotlinVersion.VERSION
+ override fun getEngineVersion(): String = KotlinCompilerVersion.VERSION
override fun getExtensions(): List = listOf("kts")
override fun getMimeTypes(): List = listOf("text/x-kotlin")
override fun getNames(): List = listOf("kotlin")
diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/common/CLICompiler.java b/compiler/cli/src/org/jetbrains/kotlin/cli/common/CLICompiler.java
index 8fb63eda139..56ead052b66 100644
--- a/compiler/cli/src/org/jetbrains/kotlin/cli/common/CLICompiler.java
+++ b/compiler/cli/src/org/jetbrains/kotlin/cli/common/CLICompiler.java
@@ -342,7 +342,7 @@ public abstract class CLICompiler {
if (!arguments.version) return;
messageCollector.report(CompilerMessageSeverity.INFO,
- "Kotlin Compiler version " + KotlinVersion.VERSION,
+ "Kotlin Compiler version " + KotlinCompilerVersion.VERSION,
CompilerMessageLocation.NO_LOCATION);
}
diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/repl/ReplFromTerminal.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/repl/ReplFromTerminal.kt
index 7e4281600d1..39837828a35 100644
--- a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/repl/ReplFromTerminal.kt
+++ b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/repl/ReplFromTerminal.kt
@@ -18,10 +18,10 @@ package org.jetbrains.kotlin.cli.jvm.repl
import com.intellij.openapi.Disposable
import com.intellij.openapi.util.io.FileUtil
-import org.jetbrains.kotlin.cli.common.KotlinVersion
import org.jetbrains.kotlin.cli.jvm.repl.LineResult.*
import org.jetbrains.kotlin.cli.jvm.repl.messages.unescapeLineBreaks
import org.jetbrains.kotlin.config.CompilerConfiguration
+import org.jetbrains.kotlin.config.KotlinCompilerVersion
import java.io.File
import java.io.PrintWriter
import java.util.*
@@ -44,7 +44,7 @@ class ReplFromTerminal(
private fun doRun() {
try {
- writer.printlnWelcomeMessage("Welcome to Kotlin version ${KotlinVersion.VERSION} " +
+ writer.printlnWelcomeMessage("Welcome to Kotlin version ${KotlinCompilerVersion.VERSION} " +
"(JRE ${System.getProperty("java.runtime.version")})")
writer.printlnWelcomeMessage("Type :help for help, :quit for quit")
var next = WhatNextAfterOneLine.READ_LINE
diff --git a/compiler/tests-common/org/jetbrains/kotlin/integration/KotlinIntegrationTestBase.java b/compiler/tests-common/org/jetbrains/kotlin/integration/KotlinIntegrationTestBase.java
index d341fcec0c7..c14ba96636c 100644
--- a/compiler/tests-common/org/jetbrains/kotlin/integration/KotlinIntegrationTestBase.java
+++ b/compiler/tests-common/org/jetbrains/kotlin/integration/KotlinIntegrationTestBase.java
@@ -33,7 +33,7 @@ import kotlin.text.Regex;
import org.intellij.lang.annotations.Language;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
-import org.jetbrains.kotlin.cli.common.KotlinVersion;
+import org.jetbrains.kotlin.config.KotlinCompilerVersion;
import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TestCaseWithTmpdir;
import org.jetbrains.kotlin.utils.PathUtil;
@@ -85,7 +85,7 @@ public abstract class KotlinIntegrationTestBase extends TestCaseWithTmpdir {
content = normalizePath(content, tmpdir, "[Temp]");
content = normalizePath(content, getCompilerLib(), "[CompilerLib]");
content = normalizePath(content, getKotlinProjectHome(), "[KotlinProjectHome]");
- content = content.replaceAll(Pattern.quote(KotlinVersion.VERSION), "[KotlinVersion]");
+ content = content.replaceAll(Pattern.quote(KotlinCompilerVersion.VERSION), "[KotlinVersion]");
content = StringUtil.convertLineSeparators(content);
return content;
}
diff --git a/compiler/tests/org/jetbrains/kotlin/cli/AbstractCliTest.java b/compiler/tests/org/jetbrains/kotlin/cli/AbstractCliTest.java
index f5260e8b2e6..d9eaddbbe55 100644
--- a/compiler/tests/org/jetbrains/kotlin/cli/AbstractCliTest.java
+++ b/compiler/tests/org/jetbrains/kotlin/cli/AbstractCliTest.java
@@ -26,9 +26,9 @@ import kotlin.text.Charsets;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.kotlin.cli.common.CLICompiler;
import org.jetbrains.kotlin.cli.common.ExitCode;
-import org.jetbrains.kotlin.cli.common.KotlinVersion;
import org.jetbrains.kotlin.cli.js.K2JSCompiler;
import org.jetbrains.kotlin.cli.jvm.K2JVMCompiler;
+import org.jetbrains.kotlin.config.KotlinCompilerVersion;
import org.jetbrains.kotlin.load.kotlin.JvmMetadataVersion;
import org.jetbrains.kotlin.serialization.deserialization.BinaryVersion;
import org.jetbrains.kotlin.test.InTextDirectivesUtils;
@@ -77,7 +77,7 @@ public abstract class AbstractCliTest extends TestCaseWithTmpdir {
.replace(PathUtil.getKotlinPathsForDistDirectory().getHomePath().getAbsolutePath(), "$PROJECT_DIR$")
.replace("expected version is " + version, "expected version is $ABI_VERSION$")
.replace("\\", "/")
- .replace(KotlinVersion.VERSION, "$VERSION$");
+ .replace(KotlinCompilerVersion.VERSION, "$VERSION$");
return normalizedOutputWithoutExitCode + exitCode;
}
diff --git a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/KotlinVersion.java b/core/util.runtime/src/org/jetbrains/kotlin/config/KotlinCompilerVersion.java
similarity index 86%
rename from compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/KotlinVersion.java
rename to core/util.runtime/src/org/jetbrains/kotlin/config/KotlinCompilerVersion.java
index 3d9c2b0a875..3ccef057196 100644
--- a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/KotlinVersion.java
+++ b/core/util.runtime/src/org/jetbrains/kotlin/config/KotlinCompilerVersion.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2010-2015 JetBrains s.r.o.
+ * Copyright 2010-2016 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.
@@ -14,9 +14,9 @@
* limitations under the License.
*/
-package org.jetbrains.kotlin.cli.common;
+package org.jetbrains.kotlin.config;
-public class KotlinVersion {
+public class KotlinCompilerVersion {
// The value of this constant is generated by the build script
// DON'T MODIFY IT
public static final String VERSION = "@snapshot@";
diff --git a/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinBuilder.kt b/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinBuilder.kt
index e57be963c48..21eb4ad0cc8 100644
--- a/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinBuilder.kt
+++ b/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinBuilder.kt
@@ -40,7 +40,6 @@ import org.jetbrains.jps.model.module.JpsModule
import org.jetbrains.kotlin.build.GeneratedFile
import org.jetbrains.kotlin.build.GeneratedJvmClass
import org.jetbrains.kotlin.build.isModuleMappingFile
-import org.jetbrains.kotlin.cli.common.KotlinVersion
import org.jetbrains.kotlin.cli.common.arguments.CommonCompilerArguments
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageLocation
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity
@@ -53,6 +52,7 @@ import org.jetbrains.kotlin.compilerRunner.OutputItemsCollectorImpl
import org.jetbrains.kotlin.config.CompilerRunnerConstants
import org.jetbrains.kotlin.config.CompilerRunnerConstants.INTERNAL_ERROR_PREFIX
import org.jetbrains.kotlin.config.IncrementalCompilation
+import org.jetbrains.kotlin.config.KotlinCompilerVersion
import org.jetbrains.kotlin.config.Services
import org.jetbrains.kotlin.daemon.common.isDaemonEnabled
import org.jetbrains.kotlin.incremental.*
@@ -196,7 +196,7 @@ class KotlinBuilder : ModuleLevelBuilder(BuilderCategory.SOURCE_PROCESSOR) {
return NOTHING_DONE
}
- messageCollector.report(INFO, "Kotlin JPS plugin version " + KotlinVersion.VERSION, CompilerMessageLocation.NO_LOCATION)
+ messageCollector.report(INFO, "Kotlin JPS plugin version " + KotlinCompilerVersion.VERSION, CompilerMessageLocation.NO_LOCATION)
val targetsWithoutOutputDir = targets.filter { it.outputDir == null }
if (targetsWithoutOutputDir.isNotEmpty()) {
diff --git a/libraries/examples/kotlin-jsr223-daemon-local-eval-example/src/test/kotlin/org/jetbrains/kotlin/script/jsr223/KotlinJsr223ScriptEngineIT.kt b/libraries/examples/kotlin-jsr223-daemon-local-eval-example/src/test/kotlin/org/jetbrains/kotlin/script/jsr223/KotlinJsr223ScriptEngineIT.kt
index 100b36122d2..25e1bfad58d 100644
--- a/libraries/examples/kotlin-jsr223-daemon-local-eval-example/src/test/kotlin/org/jetbrains/kotlin/script/jsr223/KotlinJsr223ScriptEngineIT.kt
+++ b/libraries/examples/kotlin-jsr223-daemon-local-eval-example/src/test/kotlin/org/jetbrains/kotlin/script/jsr223/KotlinJsr223ScriptEngineIT.kt
@@ -16,7 +16,7 @@
package org.jetbrains.kotlin.script.jsr223
-import org.jetbrains.kotlin.cli.common.KotlinVersion
+import org.jetbrains.kotlin.config.KotlinCompilerVersion
import org.junit.Assert
import org.junit.Test
import javax.script.ScriptEngine
@@ -31,15 +31,15 @@ class KotlinJsr223ScriptEngineIT {
Assert.assertNotNull(factory)
factory!!.apply {
Assert.assertEquals("kotlin", languageName)
- Assert.assertEquals(KotlinVersion.VERSION, languageVersion)
+ Assert.assertEquals(KotlinCompilerVersion.VERSION, languageVersion)
Assert.assertEquals("kotlin", engineName)
- Assert.assertEquals(KotlinVersion.VERSION, engineVersion)
+ Assert.assertEquals(KotlinCompilerVersion.VERSION, engineVersion)
Assert.assertEquals(listOf("kts"), extensions)
Assert.assertEquals(listOf("text/x-kotlin"), mimeTypes)
Assert.assertEquals(listOf("kotlin"), names)
Assert.assertEquals("obj.method(arg1, arg2, arg3)", getMethodCallSyntax("obj", "method", "arg1", "arg2", "arg3"))
Assert.assertEquals("print(\"Hello, world!\")", getOutputStatement("Hello, world!"))
- Assert.assertEquals(KotlinVersion.VERSION, getParameter(ScriptEngine.LANGUAGE_VERSION))
+ Assert.assertEquals(KotlinCompilerVersion.VERSION, getParameter(ScriptEngine.LANGUAGE_VERSION))
val sep = System.getProperty("line.separator")
val prog = arrayOf("val x: Int = 3", "var y = x + 2")
Assert.assertEquals(prog.joinToString(sep) + sep, getProgram(*prog))
@@ -65,4 +65,4 @@ class KotlinJsr223ScriptEngineIT {
val res2 = engine.eval("x + 2")
Assert.assertEquals(5, res2)
}
-}
\ No newline at end of file
+}
diff --git a/libraries/examples/kotlin-jsr223-daemon-remote-eval-example/src/test/kotlin/org/jetbrains/kotlin/script/jsr223/KotlinJsr223ScriptEngineIT.kt b/libraries/examples/kotlin-jsr223-daemon-remote-eval-example/src/test/kotlin/org/jetbrains/kotlin/script/jsr223/KotlinJsr223ScriptEngineIT.kt
index 4645e6cf413..ea5f196220c 100644
--- a/libraries/examples/kotlin-jsr223-daemon-remote-eval-example/src/test/kotlin/org/jetbrains/kotlin/script/jsr223/KotlinJsr223ScriptEngineIT.kt
+++ b/libraries/examples/kotlin-jsr223-daemon-remote-eval-example/src/test/kotlin/org/jetbrains/kotlin/script/jsr223/KotlinJsr223ScriptEngineIT.kt
@@ -16,7 +16,7 @@
package org.jetbrains.kotlin.script.jsr223
-import org.jetbrains.kotlin.cli.common.KotlinVersion
+import org.jetbrains.kotlin.config.KotlinCompilerVersion
import org.junit.Assert
import org.junit.Test
import javax.script.ScriptEngine
@@ -31,15 +31,15 @@ class KotlinJsr223ScriptEngineIT {
Assert.assertNotNull(factory)
factory!!.apply {
Assert.assertEquals("kotlin", languageName)
- Assert.assertEquals(KotlinVersion.VERSION, languageVersion)
+ Assert.assertEquals(KotlinCompilerVersion.VERSION, languageVersion)
Assert.assertEquals("kotlin", engineName)
- Assert.assertEquals(KotlinVersion.VERSION, engineVersion)
+ Assert.assertEquals(KotlinCompilerVersion.VERSION, engineVersion)
Assert.assertEquals(listOf("kts"), extensions)
Assert.assertEquals(listOf("text/x-kotlin"), mimeTypes)
Assert.assertEquals(listOf("kotlin"), names)
Assert.assertEquals("obj.method(arg1, arg2, arg3)", getMethodCallSyntax("obj", "method", "arg1", "arg2", "arg3"))
Assert.assertEquals("print(\"Hello, world!\")", getOutputStatement("Hello, world!"))
- Assert.assertEquals(KotlinVersion.VERSION, getParameter(ScriptEngine.LANGUAGE_VERSION))
+ Assert.assertEquals(KotlinCompilerVersion.VERSION, getParameter(ScriptEngine.LANGUAGE_VERSION))
val sep = System.getProperty("line.separator")
val prog = arrayOf("val x: Int = 3", "var y = x + 2")
Assert.assertEquals(prog.joinToString(sep) + sep, getProgram(*prog))
@@ -65,4 +65,4 @@ class KotlinJsr223ScriptEngineIT {
val res2 = engine.eval("x + 2")
Assert.assertEquals(5, res2)
}
-}
\ No newline at end of file
+}
diff --git a/libraries/examples/kotlin-jsr223-local-example/src/test/kotlin/org/jetbrains/kotlin/script/jsr223/KotlinJsr223ScriptEngineIT.kt b/libraries/examples/kotlin-jsr223-local-example/src/test/kotlin/org/jetbrains/kotlin/script/jsr223/KotlinJsr223ScriptEngineIT.kt
index 0bd7611b438..917e0e69d83 100644
--- a/libraries/examples/kotlin-jsr223-local-example/src/test/kotlin/org/jetbrains/kotlin/script/jsr223/KotlinJsr223ScriptEngineIT.kt
+++ b/libraries/examples/kotlin-jsr223-local-example/src/test/kotlin/org/jetbrains/kotlin/script/jsr223/KotlinJsr223ScriptEngineIT.kt
@@ -16,7 +16,7 @@
package org.jetbrains.kotlin.script.jsr223
-import org.jetbrains.kotlin.cli.common.KotlinVersion
+import org.jetbrains.kotlin.config.KotlinCompilerVersion
import org.junit.Assert
import org.junit.Test
import javax.script.ScriptEngine
@@ -31,15 +31,15 @@ class KotlinJsr223ScriptEngineIT {
Assert.assertNotNull(factory)
factory!!.apply {
Assert.assertEquals("kotlin", languageName)
- Assert.assertEquals(KotlinVersion.VERSION, languageVersion)
+ Assert.assertEquals(KotlinCompilerVersion.VERSION, languageVersion)
Assert.assertEquals("kotlin", engineName)
- Assert.assertEquals(KotlinVersion.VERSION, engineVersion)
+ Assert.assertEquals(KotlinCompilerVersion.VERSION, engineVersion)
Assert.assertEquals(listOf("kts"), extensions)
Assert.assertEquals(listOf("text/x-kotlin"), mimeTypes)
Assert.assertEquals(listOf("kotlin"), names)
Assert.assertEquals("obj.method(arg1, arg2, arg3)", getMethodCallSyntax("obj", "method", "arg1", "arg2", "arg3"))
Assert.assertEquals("print(\"Hello, world!\")", getOutputStatement("Hello, world!"))
- Assert.assertEquals(KotlinVersion.VERSION, getParameter(ScriptEngine.LANGUAGE_VERSION))
+ Assert.assertEquals(KotlinCompilerVersion.VERSION, getParameter(ScriptEngine.LANGUAGE_VERSION))
val sep = System.getProperty("line.separator")
val prog = arrayOf("val x: Int = 3", "var y = x + 2")
Assert.assertEquals(prog.joinToString(sep) + sep, getProgram(*prog))
@@ -65,4 +65,4 @@ class KotlinJsr223ScriptEngineIT {
val res2 = engine.eval("x + 2")
Assert.assertEquals(5, res2)
}
-}
\ No newline at end of file
+}
diff --git a/libraries/tools/kotlin-maven-plugin/src/main/java/org/jetbrains/kotlin/maven/KotlinCompileMojoBase.java b/libraries/tools/kotlin-maven-plugin/src/main/java/org/jetbrains/kotlin/maven/KotlinCompileMojoBase.java
index 7c0943983dc..bad426a6b0c 100644
--- a/libraries/tools/kotlin-maven-plugin/src/main/java/org/jetbrains/kotlin/maven/KotlinCompileMojoBase.java
+++ b/libraries/tools/kotlin-maven-plugin/src/main/java/org/jetbrains/kotlin/maven/KotlinCompileMojoBase.java
@@ -27,8 +27,8 @@ import org.apache.maven.project.MavenProject;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.kotlin.cli.common.CLICompiler;
import org.jetbrains.kotlin.cli.common.ExitCode;
-import org.jetbrains.kotlin.cli.common.KotlinVersion;
import org.jetbrains.kotlin.cli.common.arguments.CommonCompilerArguments;
+import org.jetbrains.kotlin.config.KotlinCompilerVersion;
import org.jetbrains.kotlin.config.Services;
import java.io.File;
@@ -127,7 +127,7 @@ public abstract class KotlinCompileMojoBase e
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
- getLog().info("Kotlin Compiler version " + KotlinVersion.VERSION);
+ getLog().info("Kotlin Compiler version " + KotlinCompilerVersion.VERSION);
if (!hasKotlinFilesInSources()) {
getLog().warn("No sources found skipping Kotlin compile");