diff --git a/build-tools/Wiki.txt b/build-tools/Wiki.txt index c69db004c5c..e6e0577fd5b 100644 --- a/build-tools/Wiki.txt +++ b/build-tools/Wiki.txt @@ -37,19 +37,14 @@ Another way to define Ant's {{**}} task is by using Ivy: - - - - - - + - - + + {code} @@ -60,11 +55,13 @@ Another way to define Ant's {{**}} task is by using Ivy: - + + + - - + + @@ -167,3 +164,10 @@ h3. Classpath examples {code} + + +h1. Maven + +See [{{"kotlin-maven-plugin"}}|http://evgeny-goldin.com/wiki/Kotlin-maven-plugin]. + +h1. Gradle \ No newline at end of file diff --git a/build-tools/build.xml b/build-tools/build.xml index 5067ddff48e..af7996b5a32 100644 --- a/build-tools/build.xml +++ b/build-tools/build.xml @@ -263,16 +263,16 @@ - - + + - - + + diff --git a/build-tools/ivy.xml b/build-tools/ivy.xml index bf6e10537ab..72a5931b172 100644 --- a/build-tools/ivy.xml +++ b/build-tools/ivy.xml @@ -5,12 +5,14 @@ - - + + + + + - diff --git a/build-tools/ivyconf.xml b/build-tools/ivyconf.xml index c4b5415d6e5..2020a9e6114 100644 --- a/build-tools/ivyconf.xml +++ b/build-tools/ivyconf.xml @@ -13,17 +13,13 @@ - - - - - + - - + + \ No newline at end of file diff --git a/build-tools/test/longer-examples/Bottles.kt b/build-tools/test/longer-examples/Bottles.kt index ae7a832956c..aec2e41c0e7 100644 --- a/build-tools/test/longer-examples/Bottles.kt +++ b/build-tools/test/longer-examples/Bottles.kt @@ -73,6 +73,7 @@ fun bottlesOfBeer(count : Int) : String = * An excerpt from the Standard Library */ + // From the std package // This is an extension property, i.e. a property that is defined for the // type Array, but does not sit inside the class Array diff --git a/build-tools/test/longer-examples/HtmlBuilder.kt b/build-tools/test/longer-examples/HtmlBuilder.kt index e4aef5f6362..dabff966180 100644 --- a/build-tools/test/longer-examples/HtmlBuilder.kt +++ b/build-tools/test/longer-examples/HtmlBuilder.kt @@ -144,4 +144,3 @@ fun html(init : HTML.() -> Unit) : HTML { // An excerpt from the Standard Library fun Map.set(key : K, value : V) = this.put(key, value) - diff --git a/build-tools/test/longer-examples/Life.kt b/build-tools/test/longer-examples/Life.kt index 0c043a44659..d660385cbb6 100644 --- a/build-tools/test/longer-examples/Life.kt +++ b/build-tools/test/longer-examples/Life.kt @@ -146,20 +146,22 @@ fun makeField(s : String) : Field { return Field(w.size, lines.size) {i, j -> data[i][j]} } + + // An excerpt from the Standard Library val String?.indices : IntRange get() = IntRange(0, this.sure().size) fun Map.set(k : K, v : V) { put(k, v) } fun comparator (f : (T, T) -> Int) : Comparator = object : Comparator { - override fun compare(o1 : T, o2 : T) : Int = f(o1, o2) - override fun equals(p : Any?) : Boolean = false + override fun compare(o1 : T, o2 : T) : Int = f(o1, o2) + override fun equals(p : Any?) : Boolean = false } val Array.isEmpty : Boolean get() = size == 0 fun > Array.to(result: C) : C { for (elem in this) - result.add(elem) + result.add(elem) return result } diff --git a/build-tools/test/longer-examples/Maze.txt b/build-tools/test/longer-examples/Maze.txt index 0e7b6f2bd65..54988184680 100644 --- a/build-tools/test/longer-examples/Maze.txt +++ b/build-tools/test/longer-examples/Maze.txt @@ -134,27 +134,28 @@ fun main(args : Array) { // UTILITIES fun printMaze(str : String) { - val maze = makeMaze(str) + val maze = makeMaze(str) - println("Maze:") - val path = findPath(maze) - for (i in 0..maze.height - 1) { - for (j in 0..maze.width - 1) { - val cell = #(i, j) - print( - if (maze.walls[i][j]) "O" - else if (cell == maze.start) "I" - else if (cell == maze.end) "$" - else if (path != null && path.contains(cell)) "~" - else " " - ) - } - println("") - } - println("Result: " + if (path == null) "No path" else "Path found") - println("") + println("Maze:") + val path = findPath(maze) + for (i in 0..maze.height - 1) { + for (j in 0..maze.width - 1) { + val cell = #(i, j) + print( + if (maze.walls[i][j]) "O" + else if (cell == maze.start) "I" + else if (cell == maze.end) "$" + else if (path != null && path.contains(cell)) "~" + else " " + ) + } + println("") + } + println("Result: " + if (path == null) "No path" else "Path found") + println("") } + /** * A maze is encoded in the string s: the big 'O' letters are walls. * I stand where a big 'I' stands and the prize is marked with @@ -207,18 +208,19 @@ fun makeMaze(s : String) : Maze { return Maze(w.size, lines.size, data, start.sure(), end.sure()) } + // An excerpt from the Standard Library val String?.indices : IntRange get() = IntRange(0, this.sure().size) fun Map.set(k : K, v : V) { put(k, v) } fun comparator (f : (T, T) -> Int) : Comparator = object : Comparator { - override fun compare(o1 : T, o2 : T) : Int = f(o1, o2) - override fun equals(p : Any?) : Boolean = false + override fun compare(o1 : T, o2 : T) : Int = f(o1, o2) + override fun equals(p : Any?) : Boolean = false } fun > Array.to(result: C) : C { for (elem in this) - result.add(elem) + result.add(elem) return result }