Skip to content

Commit 6ac42f9

Browse files
Merge pull request #591 from AlexanderPrendota/1.8.0
chore(release): add kotlin 1.8.0
2 parents 37dd457 + e2c8a65 commit 6ac42f9

File tree

6 files changed

+80
-12
lines changed

6 files changed

+80
-12
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM openjdk:11.0.16-jdk as build
22

3-
ENV KOTLIN_LIB=1.8.0-Beta
4-
ENV KOTLIN_LIB_JS=1.8.0-Beta-js
3+
ENV KOTLIN_LIB=1.8.0
4+
ENV KOTLIN_LIB_JS=1.8.0-js
55

66
RUN mkdir -p /kotlin-compiler-server
77
WORKDIR /kotlin-compiler-server

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ val copyJSDependencies by tasks.creating(Copy::class) {
4646
plugins {
4747
id("org.springframework.boot") version "2.7.7"
4848
id("io.spring.dependency-management") version "1.1.0"
49-
kotlin("jvm") version "1.8.0-Beta"
50-
kotlin("plugin.spring") version "1.8.0-Beta"
49+
kotlin("jvm") version "1.8.0"
50+
kotlin("plugin.spring") version "1.8.0"
5151
}
5252

5353
allprojects {

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
systemProp.kotlinVersion=1.8.0-Beta
2-
systemProp.kotlinIdeVersion=1.8.0-Beta-223
1+
systemProp.kotlinVersion=1.8.0
2+
systemProp.kotlinIdeVersion=1.8.0-release-345
33
systemProp.policy=executor.policy
44
systemProp.indexes=indexes.json
55
systemProp.indexesJs=indexesJs.json
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# this file is autogenerated by build.gradle.kts
2-
kotlin.version=1.8.0-Beta
2+
kotlin.version=1.8.0
33
policy.file=executor.policy
44
indexes.file=indexes.json
55
indexesJs.file=indexesJs.json
6-
libraries.folder.jvm=1.8.0-Beta
7-
libraries.folder.js=1.8.0-Beta-js
6+
libraries.folder.jvm=1.8.0
7+
libraries.folder.js=1.8.0-js
88
spring.mvc.pathmatch.matching-strategy=ant_path_matcher
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
package com.compiler.server
2+
3+
import com.compiler.server.base.BaseExecutorTest
4+
import org.junit.jupiter.api.Test
5+
6+
class KotlinFeatureSince180 : BaseExecutorTest() {
7+
8+
@Test
9+
fun `stable cbrt() function`() {
10+
run(
11+
code = """
12+
import kotlin.math.*
13+
14+
fun main() {
15+
val num = 27
16+
val negNum = -num
17+
18+
println("The cube root of ${"$"}{num.toDouble()} is: " + cbrt(num.toDouble()))
19+
}
20+
""".trimIndent(),
21+
contains = "The cube root of 27.0 is: 3.0"
22+
)
23+
}
24+
25+
@Test
26+
fun `stable cbrt() function for negative values`() {
27+
run(
28+
code = """
29+
import kotlin.math.*
30+
31+
fun main() {
32+
val num = 27
33+
val negNum = -num
34+
35+
println("The cube root of ${"$"}{negNum.toDouble()} is: " + cbrt(negNum.toDouble()))
36+
}
37+
""".trimIndent(),
38+
contains = "The cube root of -27.0 is: -3.0"
39+
)
40+
}
41+
42+
@Test
43+
fun `calculate the time difference between multiple TimeMarks`() {
44+
run(
45+
code = """
46+
import kotlin.time.*
47+
48+
@OptIn(ExperimentalTime::class)
49+
fun main() {
50+
val timeSource = TimeSource.Monotonic
51+
val mark1 = timeSource.markNow()
52+
Thread.sleep(500) // Sleep 0.5 seconds.
53+
val mark2 = timeSource.markNow()
54+
55+
repeat(4) { n ->
56+
val mark3 = timeSource.markNow()
57+
val elapsed1 = mark3 - mark1
58+
val elapsed2 = mark3 - mark2
59+
60+
println(mark2 > mark1)
61+
}
62+
}
63+
""".trimIndent(),
64+
contains = "true"
65+
)
66+
}
67+
}
68+

versions.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
"version": "1.6.21"
1616
},
1717
{
18-
"version": "1.7.21",
19-
"latestStable": true
18+
"version": "1.7.21"
2019
},
2120
{
22-
"version": "1.8.0-RC2"
21+
"version": "1.8.0",
22+
"latestStable": true
2323
}
2424
]

0 commit comments

Comments
 (0)