From 987b9a355cd6fd89fa838408892cbdf30259c13a Mon Sep 17 00:00:00 2001 From: Evgeny Goldin Date: Fri, 27 Jan 2012 04:11:53 +0200 Subject: [PATCH] Ant task - Wiki page added --- build-tools/Wiki.txt | 59 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 build-tools/Wiki.txt diff --git a/build-tools/Wiki.txt b/build-tools/Wiki.txt new file mode 100644 index 00000000000..242343b3972 --- /dev/null +++ b/build-tools/Wiki.txt @@ -0,0 +1,59 @@ +h1. Ant + +To define an Ant's {{**}} task you need to define a {{*KOTLIN_HOME*}} environment variable and reference it in your Ant build: + +{code} + + + + + + +{code} + +h2. {{**}} attributes: + + +|| {align:center}Name{align} || {align:center}Description{align} || {align:center}Required{align} || {align:center}Default Value{align} || +| {align:center}{{*file*}}{align} | Kotlin source file to compile | {{"file"}}, {{"srcdir"}}, or {{"module"}} needs to be specified |   | +| {align:center}{{*srcdir*}}{align} | Kotlin source directory to compile | {{"file"}}, {{"srcdir"}}, or {{"module"}} needs to be specified |   | +| {align:center}{{*module*}}{align} | Kotlin [module|http://confluence.jetbrains.net/display/Kotlin/Modules+and+Compilation] to compile, can only be used with {{*"destjar"*}}.| {{"file"}}, {{"srcdir"}}, or {{"module"}} needs to be specified |   | +| {align:center}{{*destdir*}}{align} | Destination directory | {{"destdir"}} or {{"destjar"}} needs to be specified |   | +| {align:center}{{*destjar*}}{align} | Destination jar file | {{"destdir"}} or {{"destjar"}} needs to be specified |   | +| {align:center}{{*stdlib*}}{align} | Path to {{"kotlin-runtime.jar"}} | {align:center}{{false}}{align} | {align:center}{{""}}{align} | +| {align:center}{{*includeRuntime*}}{align} | Whether Kotlin runtime library is included in compilation | {align:center}{{false}}{align} | {align:center}{{true}}{align} | + + +h2. Examples + + +{code} + + + + + + + +{code} + +{{"Smoke.kts"}}: + +{code} +import kotlin.modules.* + +fun project() { + module("smoke") { + sources += "Smoke.kt" + } +} +{code} +{{"Smoke.kt"}}: + +{code} +package Smoke + +fun main(args: Array) { + print("${args[0]}|${args[1]}|${args[2]}") +} +{code}