Skip to content

Commit

Permalink
devonfw#1039 add support for kotlin
Browse files Browse the repository at this point in the history
devonfw#1039 add support for kotlin
  • Loading branch information
CREITZ25 committed Apr 13, 2023
1 parent f4389dd commit 862c735
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 37 deletions.
1 change: 1 addition & 0 deletions documentation/LICENSE.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ The following table shows the components that may be used. The column `inclusion
|https://quarkus.io/guides/cli-tooling[QuarkusCLI]|Optional|https://github.com/quarkusio/quarkus/blob/main/LICENSE.txt[ASL 2.0]
|https://cloud.google.com/sdk/gcloud[GCloudCLI]|Optional|https://github.com/twistedpair/google-cloud-sdk/blob/master/google-cloud-sdk/LICENSE[ASL 2.0]
|https://github.com/openrewrite/rewrite-maven-plugin[Openrewrite]|Optional|https://github.com/openrewrite/rewrite-maven-plugin/blob/main/LICENSE[ASL 2.0]
|https://kotlinlang.org//[kotlinc]|Optional|https://github.com/JetBrains/kotlin-web-site/blob/master/LICENSE[ASL 2.0]
|=======================

== Apache Software License - Version 2.0
Expand Down
2 changes: 2 additions & 0 deletions documentation/devonfw-ide-usage.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ include::java.asciidoc[leveloffset=3]

include::jenkins.asciidoc[leveloffset=3]

include::kotlinc.asciidoc[leveloffset=3]

include::kubectl.asciidoc[leveloffset=3]

include::lazydocker.asciidoc[leveloffset=3]
Expand Down
13 changes: 0 additions & 13 deletions documentation/kotlin.asciidoc

This file was deleted.

13 changes: 0 additions & 13 deletions documentation/kotlin_native.asciidoc

This file was deleted.

13 changes: 13 additions & 0 deletions documentation/kotlinc-native.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
:toc:
toc::[]

# Kotlin_Native

The `kotlinc-native` commandlet allows to install and setup https://kotlinlang.org/[Kotlin_Native]. The arguments (`devon kotlinc-native «args»`) are explained by the following table:

[options="header"]
|=======================
|*Argument(s)* |*Meaning*
|`setup` |setup Kotlin_Native (install or update and verify), via `KOTLIN_NATIVE_VERSION` (use `devon kotlinc-native version list` to get available versions or `devon kotlinc-native version set [TAB]` to set version with auto-completion)
|`«args»` |run Kotlin native with the given `«args»`
|=======================
13 changes: 13 additions & 0 deletions documentation/kotlinc.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
:toc:
toc::[]

# Kotlin

The `kotlinc` commandlet allows to install and setup https://kotlinlang.org/[Kotlin]. The arguments (`devon kotlinc «args»`) are explained by the following table:

[options="header"]
|=======================
|*Argument(s)* |*Meaning*
|`setup` |setup Kotlin (install or update and verify), via `KOTLIN_VERSION` (use `devon kotlinc version list` to get available versions or `devon kotlinc version set [TAB]` to set version with auto-completion)
|`«args»` |run Kotlin with the given `«args»`
|=======================
3 changes: 2 additions & 1 deletion documentation/scripts.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ This directory is the heart of the `devonfw-ide` and contains the required link:
│ ├── link:gh.asciidoc[gh]
│ ├── link:graalvm.asciidoc[graalvm]
│ ├── link:gradle.asciidoc[gradle]
| ├── link:helm.asciidoc[helm]
├── link:helm.asciidoc[helm]
│ ├── link:help.asciidoc[help]
│ ├── link:ide.asciidoc[ide]
│ ├── link:intellij.asciidoc[intellij]
│ ├── link:ionic.asciidoc[ionic]
│ ├── link:jasypt.asciidoc[jasypt]
│ ├── link:java.asciidoc[java]
│ ├── link:jenkins.asciidoc[jenkins]
│ ├── link:kotlinc.asciidoc[kotlinc]
│ ├── link:kubectl.asciidoc[kubectl]
│ ├── link:lazydocker.asciidoc[lazydocker]
│ ├── link:mvn.asciidoc[mvn]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,31 @@ fi

# shellcheck source=scripts/functions
source "$(dirname "${0}")"/../functions
KOTLIN_HOME="${DEVON_IDE_HOME}/software/kotlin"
KOTLINC_HOME="${DEVON_IDE_HOME}/software/kotlinc"
TOOL_VERSION_COMMAND="kotlinc -version"
# shellcheck source=scripts/commandlet-cli
source "$(dirname "${0}")"/../commandlet-cli

# Call kotlin with specified arguments.
function doRun() {
doSetup silent
doRunCommand "${KOTLIN_HOME}/kotlin ${*}"
doRunCommand "${KOTLINC_HOME}/kotlinc ${*}"
}

# $1: optional silent mode
function doSetup() {
doInstall "kotlin" "${KOTLIN_VERSION}" "${1}"
doInstall "kotlinc" "${KOTLINC_VERSION}" "${1}"
return 0
}

# CLI
case ${1} in
"help" | "-h")
echo "Install kotlin."
echo "Install kotlinc."
echo
echo "Arguments:"
echo " setup install kotlin on your machine."
echo " «args» call kotlin with the specified arguments. Call kotlin --help for details or use kotlin directly as preferred."
echo " setup install kotlinc on your machine."
echo " «args» call kotlin with the specified arguments. Call kotlinc --help for details or use kotlinc directly as preferred."
;;
"setup" | "s" | "")
doSetup "${2}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,25 @@ fi

# shellcheck source=scripts/functions
source "$(dirname "${0}")"/../functions
KOTLINC_NATIVE_HOME="${DEVON_IDE_HOME}/software/kotlinc-native"
TOOL_VERSION_COMMAND="kotlinc-native -version"
# shellcheck source=scripts/commandlet-cli
source "$(dirname "${0}")"/../commandlet-cli

# $1: optional silent mode
function doSetup() {
doInstall "kotlin_native" "${KOTLIN_NATIVE_VERSION}" "${1}"
doInstall "kotlinc-native" "${KOTLINC_NATIVE_VERSION}" "${1}"
return 0
}

# CLI
case ${1} in
"help" | "-h")
echo "Install kotlin native."
echo "Install kotlinc-native."
echo
echo "Arguments:"
echo " setup install kotlin native on your machine."
echo " «args» call kotlinnative with the specified arguments. Call kotlinnative --help for details or use kotlinnative directly as preferred."
echo " setup install kotlinc native on your machine."
echo " «args» call kotlinc-native with the specified arguments. Call kotlinc-native --help for details or use kotlinc-native directly as preferred."
;;
"setup" | "s" | "")
doSetup "${2}"
Expand Down

0 comments on commit 862c735

Please sign in to comment.