Skip to content

Commit 5c7fd98

Browse files
authored
Update kotlin default to 2.0.21 (#534)
1 parent 323d98d commit 5c7fd98

File tree

5 files changed

+31
-15
lines changed

5 files changed

+31
-15
lines changed

.github/workflows/test.yml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v4
16+
- uses: actions/setup-java@v4
17+
with:
18+
distribution: 'temurin'
19+
java-version: '21'
1620
- name: Enable Corepack
1721
run: corepack enable
1822
- name: Use Node.js 20.x
@@ -25,7 +29,7 @@ jobs:
2529
- run: |
2630
yarn run all
2731
env:
28-
INPUT_VERSION: 2.0.21
32+
INPUT_VERSION: 2.2.10
2933
INPUT_INSTALL-NATIVE: false
3034
- run: |
3135
git diff --name-only --exit-code
@@ -37,7 +41,7 @@ jobs:
3741
exit 1
3842
fi
3943
env:
40-
INPUT_VERSION: 2.0.21
44+
INPUT_VERSION: 2.2.10
4145
INPUT_INSTALL-NATIVE: false
4246
4347
test:
@@ -56,16 +60,20 @@ jobs:
5660
os: [ubuntu-latest, windows-latest, macos-latest]
5761
steps:
5862
- uses: actions/checkout@v4
63+
- uses: actions/setup-java@v4
64+
with:
65+
distribution: 'temurin'
66+
java-version: '21'
5967
- uses: ./
6068
with:
61-
version: 2.0.21
69+
version: 2.2.10
6270
script: |
6371
#!/usr/bin/env kotlin
6472
fun getInput(name: String): String {
65-
return System.getenv("INPUT_${name.replace(" ", "_").toUpperCase()}")
73+
return System.getenv("INPUT_${name.replace(" ", "_").uppercase()}")
6674
}
67-
if (getInput("version") != "2.0.21") {
68-
throw RuntimeException("Expected version 2.0.21")
75+
if (getInput("version") != "2.2.10") {
76+
throw RuntimeException("Expected version 2.2.10")
6977
}
7078
7179
test-with-arg-default-version:
@@ -75,15 +83,19 @@ jobs:
7583
os: [ubuntu-latest, windows-latest, macos-latest]
7684
steps:
7785
- uses: actions/checkout@v4
86+
- uses: actions/setup-java@v4
87+
with:
88+
distribution: 'temurin'
89+
java-version: '21'
7890
- uses: ./
7991
with:
8092
script: |
8193
#!/usr/bin/env kotlin
8294
fun getInput(name: String): String {
83-
return System.getenv("INPUT_${name.replace(" ", "_").toUpperCase()}")
95+
return System.getenv("INPUT_${name.replace(" ", "_").uppercase()}")
8496
}
85-
if (getInput("version") != "2.0.21") {
86-
throw RuntimeException("Expected version 2.0.21")
97+
if (getInput("version") != "2.2.10") {
98+
throw RuntimeException("Expected version 2.2.10")
8799
}
88100
89101
test-with-native:
@@ -93,9 +105,13 @@ jobs:
93105
os: [ubuntu-latest, windows-latest, macos-latest]
94106
steps:
95107
- uses: actions/checkout@v4
108+
- uses: actions/setup-java@v4
109+
with:
110+
distribution: 'temurin'
111+
java-version: '21'
96112
- uses: ./
97113
with:
98-
version: 2.0.21
114+
version: 2.2.10
99115
install-native: true
100116
- run: kotlinc -version
101117
- run: kotlinc-native -version

DEVEL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Example for running the action manually inside a dev container:
22

33
```
4-
INPUT_VERSION=2.0.21 node dist/index.js
4+
INPUT_VERSION=2.2.10 node dist/index.js
55
```

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ If you provide a string-argument `script`, the action will execute it via [`kotl
7878
```yaml
7979
- uses: fwilhe2/setup-kotlin@main
8080
with:
81-
version: 2.0.21
81+
version: 2.2.10
8282
8383
- run: |
8484
java.io.File(".").listFiles().forEach {it -> println(it.getName().toString())}

__tests__/main.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ test('getInputInstallNative string empty', async () => {
2525
// shows how the runner will run a javascript action with env / stdout protocol
2626
test('test runs with explicit version', () => {
2727
process.env['INPUT_SCRIPT'] = 'println(234234)'
28-
process.env['INPUT_VERSION'] = '2.0.21'
28+
process.env['INPUT_VERSION'] = '2.2.10'
2929
process.env['INPUT_install-native'] = 'false'
3030
const ip = path.join(__dirname, '..', 'lib', 'main.js')
3131
const options: cp.ExecSyncOptions = {
3232
env: process.env
3333
}
3434
const output = cp.execSync(`node ${ip}`, options).toString()
35-
expect(output).toMatch(/kotlinc-jvm 2.0.21/)
35+
expect(output).toMatch(/kotlinc-jvm 2.2.10/)
3636
})

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ inputs:
88
version:
99
required: true
1010
description: 'Version of the compiler to download, if not provided a default value is used.'
11-
default: '2.0.21'
11+
default: '2.2.10'
1212
install-native:
1313
required: false
1414
description: 'Install Kotlin/Native tool chain (not needed for compiling jvm programs).'

0 commit comments

Comments
 (0)