summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurimas Liutikas <aurimas@google.com>2021-05-05 11:39:13 -0700
committerAurimas Liutikas <aurimas@google.com>2021-05-05 11:39:13 -0700
commit74359acd4d05aaf956d92677d2c9725e2a4d59a9 (patch)
tree16699bbec06f6037c80e8e6b4b1c5514357a6ae2
parent16a27a93915e7e59117846e74bf0a82b036dd2f9 (diff)
downloadkotlinc-74359acd4d05aaf956d92677d2c9725e2a4d59a9.tar.gz
Upgrade to kotlinc v1.5.0
Test: make Change-Id: I091e7030682fb6656edd2c43a64a068bda066472
-rw-r--r--METADATA8
-rwxr-xr-xbin/kapt15
-rw-r--r--bin/kapt.bat15
-rwxr-xr-xbin/kotlin15
-rwxr-xr-xbin/kotlin-dce-js15
-rw-r--r--bin/kotlin-dce-js.bat15
-rw-r--r--bin/kotlin.bat15
-rwxr-xr-xbin/kotlinc40
-rwxr-xr-xbin/kotlinc-js15
-rw-r--r--bin/kotlinc-js.bat15
-rwxr-xr-xbin/kotlinc-jvm15
-rw-r--r--bin/kotlinc-jvm.bat15
-rw-r--r--bin/kotlinc.bat65
-rw-r--r--build.txt2
-rw-r--r--lib/allopen-compiler-plugin.jarbin13535 -> 13382 bytes
-rw-r--r--lib/android-extensions-compiler.jarbin491694 -> 488136 bytes
-rw-r--r--lib/android-extensions-runtime.jarbin9062 -> 8940 bytes
-rw-r--r--lib/js.engines.jarbin10202 -> 11091 bytes
-rw-r--r--lib/jvm-abi-gen.jarbin31010 -> 30063 bytes
-rw-r--r--lib/kotlin-annotation-processing-cli.jarbin26494 -> 26469 bytes
-rw-r--r--lib/kotlin-annotation-processing-runtime.jarbin1389 -> 1373 bytes
-rw-r--r--lib/kotlin-annotation-processing.jarbin431805 -> 430422 bytes
-rw-r--r--lib/kotlin-ant.jarbin24588 -> 25593 bytes
-rw-r--r--lib/kotlin-compiler.jarbin48245785 -> 47816561 bytes
-rw-r--r--lib/kotlin-daemon-client.jarbin678058 -> 674558 bytes
-rw-r--r--lib/kotlin-daemon.jarbin725153 -> 721752 bytes
-rw-r--r--lib/kotlin-imports-dumper-compiler-plugin.jarbin274515 -> 274431 bytes
-rw-r--r--lib/kotlin-main-kts.jarbin1644929 -> 1638122 bytes
-rw-r--r--lib/kotlin-preloader.jarbin52235 -> 52235 bytes
-rw-r--r--lib/kotlin-reflect-sources.jarbin683883 -> 684660 bytes
-rw-r--r--lib/kotlin-reflect.jarbin2974472 -> 2971925 bytes
-rw-r--r--lib/kotlin-runner.jarbin31660 -> 30343 bytes
-rw-r--r--lib/kotlin-script-runtime.jarbin42041 -> 41555 bytes
-rw-r--r--lib/kotlin-scripting-common.jarbin220356 -> 218668 bytes
-rw-r--r--lib/kotlin-scripting-compiler-impl.jarbin317797 -> 309799 bytes
-rw-r--r--lib/kotlin-scripting-compiler.jarbin385112 -> 402834 bytes
-rw-r--r--lib/kotlin-scripting-js.jarbin9795 -> 7775 bytes
-rw-r--r--lib/kotlin-scripting-jvm.jarbin196280 -> 195475 bytes
-rw-r--r--lib/kotlin-stdlib-jdk7-sources.jarbin12003 -> 12130 bytes
-rw-r--r--lib/kotlin-stdlib-jdk7.jarbin22890 -> 22987 bytes
-rw-r--r--lib/kotlin-stdlib-jdk8-sources.jarbin6451 -> 6456 bytes
-rw-r--r--lib/kotlin-stdlib-jdk8.jarbin16216 -> 16119 bytes
-rw-r--r--lib/kotlin-stdlib-js-sources.jarbin479021 -> 496474 bytes
-rw-r--r--lib/kotlin-stdlib-js.jarbin5192110 -> 4099184 bytes
-rw-r--r--lib/kotlin-stdlib-sources.jarbin494918 -> 505671 bytes
-rw-r--r--lib/kotlin-stdlib.jarbin1495016 -> 1497594 bytes
-rw-r--r--lib/kotlin-test-js.jarbin67668 -> 130702 bytes
-rw-r--r--lib/kotlin-test-junit.jarbin5178 -> 5139 bytes
-rw-r--r--lib/kotlin-test-junit5.jarbin5191 -> 5144 bytes
-rw-r--r--lib/kotlin-test-sources.jarbin2040 -> 2272 bytes
-rw-r--r--lib/kotlin-test-testng.jarbin5181 -> 5139 bytes
-rw-r--r--lib/kotlin-test.jarbin25279 -> 133820 bytes
-rw-r--r--lib/kotlinx-serialization-compiler-plugin.jarbin604617 -> 624877 bytes
-rw-r--r--lib/noarg-compiler-plugin.jarbin49006 -> 48675 bytes
-rw-r--r--lib/parcelize-compiler.jarbin295854 -> 294453 bytes
-rw-r--r--lib/parcelize-runtime.jarbin5240 -> 5150 bytes
-rw-r--r--lib/sam-with-receiver-compiler-plugin.jarbin11900 -> 11778 bytes
-rw-r--r--license/COPYRIGHT_HEADER.txt4
58 files changed, 103 insertions, 166 deletions
diff --git a/METADATA b/METADATA
index ad0467a..d181aac 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,13 @@ third_party {
}
url {
type: ARCHIVE
- value: "https://github.com/JetBrains/kotlin/releases/download/v1.4.30/kotlin-compiler-1.4.30.zip"
+ value: "https://github.com/JetBrains/kotlin/releases/download/v1.5.0/kotlin-compiler-1.5.0.zip"
}
url {
type: ARCHIVE
value: "https://github.com/JetBrains/intellij-community/raw/171/lib/src/trove4j_src.jar"
}
- version: "v1.4.30"
+ version: "v1.5.0"
# would be RECIPROCAL save for:
# license/third_party/rhino_LICENSE.txt
# license/third_party/testdata/findbugs_license.txt
@@ -22,7 +22,7 @@ third_party {
license_type: RESTRICTED
last_upgrade_date {
year: 2021
- month: 2
- day: 17
+ month: 5
+ day: 5
}
}
diff --git a/bin/kapt b/bin/kapt
index 29be2ad..510eabb 100755
--- a/bin/kapt
+++ b/bin/kapt
@@ -1,18 +1,7 @@
#!/usr/bin/env bash
-# Copyright 2010-2015 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.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
+# Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
export KOTLIN_TOOL=kotlin-annotation-processing-cli.jar
diff --git a/bin/kapt.bat b/bin/kapt.bat
index dacbc54..245a409 100644
--- a/bin/kapt.bat
+++ b/bin/kapt.bat
@@ -1,18 +1,7 @@
@echo off
-rem Copyright 2010-2015 JetBrains s.r.o.
-rem
-rem Licensed under the Apache License, Version 2.0 (the "License");
-rem you may not use this file except in compliance with the License.
-rem You may obtain a copy of the License at
-rem
-rem http://www.apache.org/licenses/LICENSE-2.0
-rem
-rem Unless required by applicable law or agreed to in writing, software
-rem distributed under the License is distributed on an "AS IS" BASIS,
-rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-rem See the License for the specific language governing permissions and
-rem limitations under the License.
+rem Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
+rem Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
setlocal
set _KOTLIN_COMPILER=org.jetbrains.kotlin.kapt.cli.KaptCli
diff --git a/bin/kotlin b/bin/kotlin
index 68a0da4..8bd1922 100755
--- a/bin/kotlin
+++ b/bin/kotlin
@@ -1,18 +1,7 @@
#!/usr/bin/env bash
-# Copyright 2010-2015 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.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
+# Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
export KOTLIN_RUNNER=1
diff --git a/bin/kotlin-dce-js b/bin/kotlin-dce-js
index aa4cfdd..5526054 100755
--- a/bin/kotlin-dce-js
+++ b/bin/kotlin-dce-js
@@ -1,18 +1,7 @@
#!/usr/bin/env bash
-# Copyright 2010-2017 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.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
+# Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
export KOTLIN_COMPILER=org.jetbrains.kotlin.cli.js.dce.K2JSDce
diff --git a/bin/kotlin-dce-js.bat b/bin/kotlin-dce-js.bat
index 5d0b0c4..fca25f7 100644
--- a/bin/kotlin-dce-js.bat
+++ b/bin/kotlin-dce-js.bat
@@ -1,18 +1,7 @@
@echo off
-rem Copyright 2010-2015 JetBrains s.r.o.
-rem
-rem Licensed under the Apache License, Version 2.0 (the "License");
-rem you may not use this file except in compliance with the License.
-rem You may obtain a copy of the License at
-rem
-rem http://www.apache.org/licenses/LICENSE-2.0
-rem
-rem Unless required by applicable law or agreed to in writing, software
-rem distributed under the License is distributed on an "AS IS" BASIS,
-rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-rem See the License for the specific language governing permissions and
-rem limitations under the License.
+rem Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
+rem Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
setlocal
set _KOTLIN_COMPILER=org.jetbrains.kotlin.cli.js.dce.K2JSDce
diff --git a/bin/kotlin.bat b/bin/kotlin.bat
index fcbbd1f..7cbd49f 100644
--- a/bin/kotlin.bat
+++ b/bin/kotlin.bat
@@ -1,18 +1,7 @@
@echo off
-rem Copyright 2010-2015 JetBrains s.r.o.
-rem
-rem Licensed under the Apache License, Version 2.0 (the "License");
-rem you may not use this file except in compliance with the License.
-rem You may obtain a copy of the License at
-rem
-rem http://www.apache.org/licenses/LICENSE-2.0
-rem
-rem Unless required by applicable law or agreed to in writing, software
-rem distributed under the License is distributed on an "AS IS" BASIS,
-rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-rem See the License for the specific language governing permissions and
-rem limitations under the License.
+rem Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
+rem Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
setlocal
set _KOTLIN_RUNNER=1
diff --git a/bin/kotlinc b/bin/kotlinc
index 7f45ac9..b1cd401 100755
--- a/bin/kotlinc
+++ b/bin/kotlinc
@@ -1,13 +1,9 @@
#!/usr/bin/env bash
-#
-##############################################################################
+
+# Based on scalac from the Scala distribution
# Copyright 2002-2011, LAMP/EPFL
-# Copyright 2011-2015, JetBrains
-#
-# This is free software; see the distribution for copying conditions.
-# There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-##############################################################################
+# Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
+# Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
cygwin=false;
case "`uname`" in
@@ -25,6 +21,17 @@ findKotlinHome() {
(cd -P "$(dirname "$source")/.." && pwd)
}
+findJavaVersion() {
+ # Note that this only loads the first component of the version, so "1.8.0_265" -> "1".
+ # But it's fine because major version is 9 for JDK 9, and so on.
+ regex='^.*version "([[:digit:]]+).*$'
+ while read -r line; do
+ if [[ "$line" =~ $regex ]]; then
+ echo ${BASH_REMATCH[1]}
+ fi
+ done <<< $("${JAVACMD:=java}" -version 2>&1)
+}
+
KOTLIN_HOME="$(findKotlinHome)"
if $cygwin; then
@@ -60,17 +67,24 @@ fi
declare -a kotlin_app
-if [ -n "$KOTLIN_RUNNER" ];
-then
+java_version="$(findJavaVersion)"
+if [[ $java_version -ge 9 ]]; then
+ # Workaround the illegal reflective access warning from ReflectionUtil to ResourceBundle.setParent, see IDEA-248785.
+ java_args=("${java_args[@]}" "--add-opens" "java.base/java.util=ALL-UNNAMED")
+fi
+
+if [ -n "$KOTLIN_RUNNER" ]; then
java_args=("${java_args[@]}" "-Dkotlin.home=${KOTLIN_HOME}")
kotlin_app=("${KOTLIN_HOME}/lib/kotlin-runner.jar" "org.jetbrains.kotlin.runner.Main")
else
[ -n "$KOTLIN_COMPILER" ] || KOTLIN_COMPILER=org.jetbrains.kotlin.cli.jvm.K2JVMCompiler
- java_args=("${java_args[@]}" "-noverify")
+
+ if [[ $java_version < 13 ]]; then
+ java_args=("${java_args[@]}" "-noverify")
+ fi
declare additional_classpath=""
- if [ -n "$KOTLIN_TOOL" ];
- then
+ if [ -n "$KOTLIN_TOOL" ]; then
additional_classpath=":${KOTLIN_HOME}/lib/${KOTLIN_TOOL}"
fi
diff --git a/bin/kotlinc-js b/bin/kotlinc-js
index 72a0403..1ed7904 100755
--- a/bin/kotlinc-js
+++ b/bin/kotlinc-js
@@ -1,18 +1,7 @@
#!/usr/bin/env bash
-# Copyright 2010-2015 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.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
+# Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
export KOTLIN_COMPILER=org.jetbrains.kotlin.cli.js.K2JSCompiler
diff --git a/bin/kotlinc-js.bat b/bin/kotlinc-js.bat
index b3b5c24..b6c65c0 100644
--- a/bin/kotlinc-js.bat
+++ b/bin/kotlinc-js.bat
@@ -1,18 +1,7 @@
@echo off
-rem Copyright 2010-2015 JetBrains s.r.o.
-rem
-rem Licensed under the Apache License, Version 2.0 (the "License");
-rem you may not use this file except in compliance with the License.
-rem You may obtain a copy of the License at
-rem
-rem http://www.apache.org/licenses/LICENSE-2.0
-rem
-rem Unless required by applicable law or agreed to in writing, software
-rem distributed under the License is distributed on an "AS IS" BASIS,
-rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-rem See the License for the specific language governing permissions and
-rem limitations under the License.
+rem Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
+rem Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
setlocal
set _KOTLIN_COMPILER=org.jetbrains.kotlin.cli.js.K2JSCompiler
diff --git a/bin/kotlinc-jvm b/bin/kotlinc-jvm
index 9725efa..4ca34f7 100755
--- a/bin/kotlinc-jvm
+++ b/bin/kotlinc-jvm
@@ -1,18 +1,7 @@
#!/usr/bin/env bash
-# Copyright 2010-2015 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.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
+# Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
DIR="${BASH_SOURCE[0]%/*}"
: ${DIR:="."}
diff --git a/bin/kotlinc-jvm.bat b/bin/kotlinc-jvm.bat
index a4f620a..e56d302 100644
--- a/bin/kotlinc-jvm.bat
+++ b/bin/kotlinc-jvm.bat
@@ -1,17 +1,6 @@
@echo off
-rem Copyright 2010-2015 JetBrains s.r.o.
-rem
-rem Licensed under the Apache License, Version 2.0 (the "License");
-rem you may not use this file except in compliance with the License.
-rem You may obtain a copy of the License at
-rem
-rem http://www.apache.org/licenses/LICENSE-2.0
-rem
-rem Unless required by applicable law or agreed to in writing, software
-rem distributed under the License is distributed on an "AS IS" BASIS,
-rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-rem See the License for the specific language governing permissions and
-rem limitations under the License.
+rem Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
+rem Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
call %~dps0kotlinc.bat %*
diff --git a/bin/kotlinc.bat b/bin/kotlinc.bat
index 81edc5d..3c60526 100644
--- a/bin/kotlinc.bat
+++ b/bin/kotlinc.bat
@@ -1,13 +1,9 @@
@echo off
-rem based on scalac.bat from the Scala distribution
-rem ##########################################################################
-rem # Copyright 2002-2011, LAMP/EPFL
-rem # Copyright 2011-2015, JetBrains
-rem #
-rem # This is free software; see the distribution for copying conditions.
-rem # There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
-rem # PARTICULAR PURPOSE.
-rem ##########################################################################
+
+rem Based on scalac.bat from the Scala distribution
+rem Copyright 2002-2011, LAMP/EPFL
+rem Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
+rem Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
rem We adopt the following conventions:
rem - System/user environment variables start with a letter
@@ -19,11 +15,10 @@ call :set_home
if "%_KOTLIN_COMPILER%"=="" set _KOTLIN_COMPILER=org.jetbrains.kotlin.cli.jvm.K2JVMCompiler
if not "%JAVA_HOME%"=="" (
- if exist "%JAVA_HOME%\bin\java.exe" set "_JAVACMD=%JAVA_HOME%\bin\java.exe"
+ rem Prepend JAVA_HOME to local PATH to be able to simply execute "java" later in the script.
+ set "PATH=%JAVA_HOME%\bin;%PATH%"
)
-if "%_JAVACMD%"=="" set _JAVACMD=java
-
rem We use the value of the JAVA_OPTS environment variable if defined
if "%JAVA_OPTS%"=="" set JAVA_OPTS=-Xmx256M -Xms32M
@@ -45,18 +40,29 @@ shift
goto loop
:loopend
-if "%_KOTLIN_RUNNER%"=="1" (
- "%_JAVACMD%" %JAVA_OPTS% "-Dkotlin.home=%_KOTLIN_HOME%" -cp "%_KOTLIN_HOME%\lib\kotlin-runner.jar" ^
+setlocal EnableDelayedExpansion
+
+call :set_java_version
+if !_java_major_version! geq 9 (
+ rem Workaround the illegal reflective access warning from ReflectionUtil to ResourceBundle.setParent, see IDEA-248785.
+ set JAVA_OPTS=!JAVA_OPTS! "--add-opens" "java.base/java.util=ALL-UNNAMED"
+)
+
+if "!_KOTLIN_RUNNER!"=="1" (
+ java !JAVA_OPTS! "-Dkotlin.home=%_KOTLIN_HOME%" -cp "%_KOTLIN_HOME%\lib\kotlin-runner.jar" ^
org.jetbrains.kotlin.runner.Main %KOTLIN_OPTS%
) else (
- setlocal EnableDelayedExpansion
- SET _ADDITIONAL_CLASSPATH=
+ set _ADDITIONAL_CLASSPATH=
+
+ if !_java_major_version! lss 13 (
+ set JAVA_OPTS=!JAVA_OPTS! "-noverify"
+ )
if not "%_KOTLIN_TOOL%"=="" (
set _ADDITIONAL_CLASSPATH=;%_KOTLIN_HOME%\lib\%_KOTLIN_TOOL%
)
- "%_JAVACMD%" %JAVA_OPTS% -noverify -cp "%_KOTLIN_HOME%\lib\kotlin-preloader.jar" ^
+ java !JAVA_OPTS! -cp "%_KOTLIN_HOME%\lib\kotlin-preloader.jar" ^
org.jetbrains.kotlin.preloading.Preloader -cp "%_KOTLIN_HOME%\lib\kotlin-compiler.jar!_ADDITIONAL_CLASSPATH!" ^
%_KOTLIN_COMPILER% %KOTLIN_OPTS%
)
@@ -73,6 +79,29 @@ rem # subroutines
set _KOTLIN_HOME=%_BIN_DIR%..
goto :eof
+rem Parses "java -version" output and stores the major version to _java_major_version.
+rem Note that this only loads the first component of the version, so "1.8.0_265" -> "1".
+rem But it's fine because major version is 9 for JDK 9, and so on.
+rem Needs to be executed in the EnableDelayedExpansion mode.
+:set_java_version
+ set _version=
+ rem Parse output and take the third token from the string containing " version ".
+ rem It should be something like "1.8.0_275" or "15.0.1".
+ for /f "tokens=3" %%i in ('java -version 2^>^&1 ^| findstr /i " version "') do (
+ rem Split the string by "-" or "." and take the first token.
+ for /f "delims=-. tokens=1" %%j in ("%%i") do (
+ rem At this point, _version should be something like "1 or "15. Note the leading quote.
+ set _version=%%j
+ )
+ )
+ if "!_version!"=="" (
+ rem If failed to parse the output, set the version to 1.
+ set _java_major_version=1
+ ) else (
+ rem Strip the leading quote.
+ set _java_major_version=!_version:~1!
+ )
+goto :eof
+
:end
endlocal
-
diff --git a/build.txt b/build.txt
index f599889..26e33f3 100644
--- a/build.txt
+++ b/build.txt
@@ -1 +1 @@
-1.4.30-release-302 \ No newline at end of file
+1.5.0-release-749 \ No newline at end of file
diff --git a/lib/allopen-compiler-plugin.jar b/lib/allopen-compiler-plugin.jar
index 8aad3b3..d06d12e 100644
--- a/lib/allopen-compiler-plugin.jar
+++ b/lib/allopen-compiler-plugin.jar
Binary files differ
diff --git a/lib/android-extensions-compiler.jar b/lib/android-extensions-compiler.jar
index c7f5a2c..9abcb78 100644
--- a/lib/android-extensions-compiler.jar
+++ b/lib/android-extensions-compiler.jar
Binary files differ
diff --git a/lib/android-extensions-runtime.jar b/lib/android-extensions-runtime.jar
index 0f9f519..d95483f 100644
--- a/lib/android-extensions-runtime.jar
+++ b/lib/android-extensions-runtime.jar
Binary files differ
diff --git a/lib/js.engines.jar b/lib/js.engines.jar
index 935bb7b..377d608 100644
--- a/lib/js.engines.jar
+++ b/lib/js.engines.jar
Binary files differ
diff --git a/lib/jvm-abi-gen.jar b/lib/jvm-abi-gen.jar
index 07f7807..687fe1c 100644
--- a/lib/jvm-abi-gen.jar
+++ b/lib/jvm-abi-gen.jar
Binary files differ
diff --git a/lib/kotlin-annotation-processing-cli.jar b/lib/kotlin-annotation-processing-cli.jar
index 605ec4d..76087b5 100644
--- a/lib/kotlin-annotation-processing-cli.jar
+++ b/lib/kotlin-annotation-processing-cli.jar
Binary files differ
diff --git a/lib/kotlin-annotation-processing-runtime.jar b/lib/kotlin-annotation-processing-runtime.jar
index 2282892..4dd89d6 100644
--- a/lib/kotlin-annotation-processing-runtime.jar
+++ b/lib/kotlin-annotation-processing-runtime.jar
Binary files differ
diff --git a/lib/kotlin-annotation-processing.jar b/lib/kotlin-annotation-processing.jar
index 6b94c97..b19c9ed 100644
--- a/lib/kotlin-annotation-processing.jar
+++ b/lib/kotlin-annotation-processing.jar
Binary files differ
diff --git a/lib/kotlin-ant.jar b/lib/kotlin-ant.jar
index 6f1190d..8cc0415 100644
--- a/lib/kotlin-ant.jar
+++ b/lib/kotlin-ant.jar
Binary files differ
diff --git a/lib/kotlin-compiler.jar b/lib/kotlin-compiler.jar
index 8569317..88a3b49 100644
--- a/lib/kotlin-compiler.jar
+++ b/lib/kotlin-compiler.jar
Binary files differ
diff --git a/lib/kotlin-daemon-client.jar b/lib/kotlin-daemon-client.jar
index 42a1132..92945ae 100644
--- a/lib/kotlin-daemon-client.jar
+++ b/lib/kotlin-daemon-client.jar
Binary files differ
diff --git a/lib/kotlin-daemon.jar b/lib/kotlin-daemon.jar
index d8eabe5..94465d8 100644
--- a/lib/kotlin-daemon.jar
+++ b/lib/kotlin-daemon.jar
Binary files differ
diff --git a/lib/kotlin-imports-dumper-compiler-plugin.jar b/lib/kotlin-imports-dumper-compiler-plugin.jar
index 1e2f882..4787671 100644
--- a/lib/kotlin-imports-dumper-compiler-plugin.jar
+++ b/lib/kotlin-imports-dumper-compiler-plugin.jar
Binary files differ
diff --git a/lib/kotlin-main-kts.jar b/lib/kotlin-main-kts.jar
index 9fb178b..8208aeb 100644
--- a/lib/kotlin-main-kts.jar
+++ b/lib/kotlin-main-kts.jar
Binary files differ
diff --git a/lib/kotlin-preloader.jar b/lib/kotlin-preloader.jar
index 1f76885..7b1fee5 100644
--- a/lib/kotlin-preloader.jar
+++ b/lib/kotlin-preloader.jar
Binary files differ
diff --git a/lib/kotlin-reflect-sources.jar b/lib/kotlin-reflect-sources.jar
index 1a7573e..6e735d3 100644
--- a/lib/kotlin-reflect-sources.jar
+++ b/lib/kotlin-reflect-sources.jar
Binary files differ
diff --git a/lib/kotlin-reflect.jar b/lib/kotlin-reflect.jar
index 5fba5f5..8b83527 100644
--- a/lib/kotlin-reflect.jar
+++ b/lib/kotlin-reflect.jar
Binary files differ
diff --git a/lib/kotlin-runner.jar b/lib/kotlin-runner.jar
index 4a2c2fd..ec926c9 100644
--- a/lib/kotlin-runner.jar
+++ b/lib/kotlin-runner.jar
Binary files differ
diff --git a/lib/kotlin-script-runtime.jar b/lib/kotlin-script-runtime.jar
index cf275c6..2c9c069 100644
--- a/lib/kotlin-script-runtime.jar
+++ b/lib/kotlin-script-runtime.jar
Binary files differ
diff --git a/lib/kotlin-scripting-common.jar b/lib/kotlin-scripting-common.jar
index fa44343..5c398ea 100644
--- a/lib/kotlin-scripting-common.jar
+++ b/lib/kotlin-scripting-common.jar
Binary files differ
diff --git a/lib/kotlin-scripting-compiler-impl.jar b/lib/kotlin-scripting-compiler-impl.jar
index 14cbc86..26e7569 100644
--- a/lib/kotlin-scripting-compiler-impl.jar
+++ b/lib/kotlin-scripting-compiler-impl.jar
Binary files differ
diff --git a/lib/kotlin-scripting-compiler.jar b/lib/kotlin-scripting-compiler.jar
index 81c93d1..b74b4be 100644
--- a/lib/kotlin-scripting-compiler.jar
+++ b/lib/kotlin-scripting-compiler.jar
Binary files differ
diff --git a/lib/kotlin-scripting-js.jar b/lib/kotlin-scripting-js.jar
index f7d101c..844e4f8 100644
--- a/lib/kotlin-scripting-js.jar
+++ b/lib/kotlin-scripting-js.jar
Binary files differ
diff --git a/lib/kotlin-scripting-jvm.jar b/lib/kotlin-scripting-jvm.jar
index 300f2cb..6364596 100644
--- a/lib/kotlin-scripting-jvm.jar
+++ b/lib/kotlin-scripting-jvm.jar
Binary files differ
diff --git a/lib/kotlin-stdlib-jdk7-sources.jar b/lib/kotlin-stdlib-jdk7-sources.jar
index 5dbca97..20890c5 100644
--- a/lib/kotlin-stdlib-jdk7-sources.jar
+++ b/lib/kotlin-stdlib-jdk7-sources.jar
Binary files differ
diff --git a/lib/kotlin-stdlib-jdk7.jar b/lib/kotlin-stdlib-jdk7.jar
index 251a931..f3afc25 100644
--- a/lib/kotlin-stdlib-jdk7.jar
+++ b/lib/kotlin-stdlib-jdk7.jar
Binary files differ
diff --git a/lib/kotlin-stdlib-jdk8-sources.jar b/lib/kotlin-stdlib-jdk8-sources.jar
index 74f0d7a..def9b42 100644
--- a/lib/kotlin-stdlib-jdk8-sources.jar
+++ b/lib/kotlin-stdlib-jdk8-sources.jar
Binary files differ
diff --git a/lib/kotlin-stdlib-jdk8.jar b/lib/kotlin-stdlib-jdk8.jar
index 1eb78bf..47cd20a 100644
--- a/lib/kotlin-stdlib-jdk8.jar
+++ b/lib/kotlin-stdlib-jdk8.jar
Binary files differ
diff --git a/lib/kotlin-stdlib-js-sources.jar b/lib/kotlin-stdlib-js-sources.jar
index 969b851..dba621d 100644
--- a/lib/kotlin-stdlib-js-sources.jar
+++ b/lib/kotlin-stdlib-js-sources.jar
Binary files differ
diff --git a/lib/kotlin-stdlib-js.jar b/lib/kotlin-stdlib-js.jar
index 264f8e8..23f1517 100644
--- a/lib/kotlin-stdlib-js.jar
+++ b/lib/kotlin-stdlib-js.jar
Binary files differ
diff --git a/lib/kotlin-stdlib-sources.jar b/lib/kotlin-stdlib-sources.jar
index 216950e..01a3196 100644
--- a/lib/kotlin-stdlib-sources.jar
+++ b/lib/kotlin-stdlib-sources.jar
Binary files differ
diff --git a/lib/kotlin-stdlib.jar b/lib/kotlin-stdlib.jar
index 9084794..c6cbf5d 100644
--- a/lib/kotlin-stdlib.jar
+++ b/lib/kotlin-stdlib.jar
Binary files differ
diff --git a/lib/kotlin-test-js.jar b/lib/kotlin-test-js.jar
index b0fff68..b8e123a 100644
--- a/lib/kotlin-test-js.jar
+++ b/lib/kotlin-test-js.jar
Binary files differ
diff --git a/lib/kotlin-test-junit.jar b/lib/kotlin-test-junit.jar
index dd93e0e..b16a0e7 100644
--- a/lib/kotlin-test-junit.jar
+++ b/lib/kotlin-test-junit.jar
Binary files differ
diff --git a/lib/kotlin-test-junit5.jar b/lib/kotlin-test-junit5.jar
index e6b7e0c..96fb22b 100644
--- a/lib/kotlin-test-junit5.jar
+++ b/lib/kotlin-test-junit5.jar
Binary files differ
diff --git a/lib/kotlin-test-sources.jar b/lib/kotlin-test-sources.jar
index a4e895b..212e8f9 100644
--- a/lib/kotlin-test-sources.jar
+++ b/lib/kotlin-test-sources.jar
Binary files differ
diff --git a/lib/kotlin-test-testng.jar b/lib/kotlin-test-testng.jar
index 15f7051..b166934 100644
--- a/lib/kotlin-test-testng.jar
+++ b/lib/kotlin-test-testng.jar
Binary files differ
diff --git a/lib/kotlin-test.jar b/lib/kotlin-test.jar
index 43fef60..3f5b600 100644
--- a/lib/kotlin-test.jar
+++ b/lib/kotlin-test.jar
Binary files differ
diff --git a/lib/kotlinx-serialization-compiler-plugin.jar b/lib/kotlinx-serialization-compiler-plugin.jar
index 4f561b2..48f64d5 100644
--- a/lib/kotlinx-serialization-compiler-plugin.jar
+++ b/lib/kotlinx-serialization-compiler-plugin.jar
Binary files differ
diff --git a/lib/noarg-compiler-plugin.jar b/lib/noarg-compiler-plugin.jar
index 04d59cc..934eb4c 100644
--- a/lib/noarg-compiler-plugin.jar
+++ b/lib/noarg-compiler-plugin.jar
Binary files differ
diff --git a/lib/parcelize-compiler.jar b/lib/parcelize-compiler.jar
index f2d3b8c..db6e953 100644
--- a/lib/parcelize-compiler.jar
+++ b/lib/parcelize-compiler.jar
Binary files differ
diff --git a/lib/parcelize-runtime.jar b/lib/parcelize-runtime.jar
index 8b0d1e4..44e9797 100644
--- a/lib/parcelize-runtime.jar
+++ b/lib/parcelize-runtime.jar
Binary files differ
diff --git a/lib/sam-with-receiver-compiler-plugin.jar b/lib/sam-with-receiver-compiler-plugin.jar
index 8a08c0a..e02425f 100644
--- a/lib/sam-with-receiver-compiler-plugin.jar
+++ b/lib/sam-with-receiver-compiler-plugin.jar
Binary files differ
diff --git a/license/COPYRIGHT_HEADER.txt b/license/COPYRIGHT_HEADER.txt
new file mode 100644
index 0000000..41296a4
--- /dev/null
+++ b/license/COPYRIGHT_HEADER.txt
@@ -0,0 +1,4 @@
+/*
+ * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */ \ No newline at end of file