Skip to content

Commit

Permalink
Update Kotlin to 1.4.30 (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
fwilhe2 authored Feb 4, 2021
1 parent 6243c69 commit c7852c2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
exit 1
fi
env:
INPUT_VERSION: 1.4.21
INPUT_VERSION: 1.4.30
INPUT_INSTALL-NATIVE: false
test:
Expand All @@ -47,14 +47,14 @@ jobs:
- uses: actions/checkout@v2
- uses: ./
with:
version: 1.4.21
version: 1.4.30
script: |
#!/usr/bin/env kotlin
fun getInput(name: String): String {
return System.getenv("INPUT_${name.replace(" ", "_").toUpperCase()}")
}
if (getInput("version") != "1.4.21") {
throw RuntimeException("Expected version 1.4.21")
if (getInput("version") != "1.4.30") {
throw RuntimeException("Expected version 1.4.30")
}
test-with-arg-default-version:
Expand All @@ -71,8 +71,8 @@ jobs:
fun getInput(name: String): String {
return System.getenv("INPUT_${name.replace(" ", "_").toUpperCase()}")
}
if (getInput("version") != "1.4.21") {
throw RuntimeException("Expected version 1.4.21")
if (getInput("version") != "1.4.30") {
throw RuntimeException("Expected version 1.4.30")
}
test-with-native:
Expand All @@ -84,7 +84,7 @@ jobs:
- uses: actions/checkout@v2
- uses: ./
with:
version: 1.4.21
version: 1.4.30
- run: kotlinc -version
- run: kotlinc-native -version
- run: echo 'fun main() {println("Hello Kotlin/Native!")}' > hello.kt
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ If you provide a string-argument `script`, the action will execute it via [`kotl

### Using `kotlin` as a shell

Starting with version [`1.4.30-RC`](https://github.com/JetBrains/kotlin/releases/tag/v1.4.30-RC), you can configure `kotlin` as a shell in Actions like in this example:
Starting with version [`1.4.30`](https://github.com/JetBrains/kotlin/releases/tag/v1.4.30), you can configure `kotlin` as a shell in Actions like in this example:

```yaml
- uses: fwilhe2/setup-kotlin@main
with:
version: 1.4.30-RC
version: 1.4.30
- run: |
java.io.File(".").listFiles().forEach {it -> println(it.getName().toString())}
Expand Down
4 changes: 2 additions & 2 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ test('getInputInstallNative string empty', async () => {
// shows how the runner will run a javascript action with env / stdout protocol
test('test runs with explicit version', () => {
process.env['INPUT_SCRIPT'] = 'println(234234)'
process.env['INPUT_VERSION'] = '1.4.21'
process.env['INPUT_VERSION'] = '1.4.30'
process.env['INPUT_install-native'] = 'false'
const ip = path.join(__dirname, '..', 'lib', 'main.js')
const options: cp.ExecSyncOptions = {
env: process.env
}
const output = cp.execSync(`node ${ip}`, options).toString()
expect(output).toMatch(/kotlinc-jvm 1.4.21/)
expect(output).toMatch(/kotlinc-jvm 1.4.30/)
})
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ inputs:
version:
required: true
description: 'Version of the compiler to download, if not provided a default value is used.'
default: '1.4.21'
default: '1.4.30'
install-native:
required: false
description: 'Install Kotlin/Native tool chain (not needed for compiling jvm programs).'
Expand Down
2 changes: 2 additions & 0 deletions release-notes-draft.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@

Add `install-native` option which allows to control if Kotlin/Native should be downloaded and installed.
The default value is `true`.

Update default Kotlin version to 1.4.30

0 comments on commit c7852c2

Please sign in to comment.