Fixed maven build. Renamed usages of upto to rangeTo. Excluded DownTo.kt from js lib compilation.

This commit is contained in:
Evgeny Gerashchenko
2012-08-08 17:25:16 +04:00
parent 8ad8849853
commit 39daa11e13
3 changed files with 6 additions and 5 deletions
@@ -517,7 +517,7 @@ class KModel(val context: BindingContext, val config: KDocConfig, val sourceDirs
// lets remove the /** ... * ... */ tokens // lets remove the /** ... * ... */ tokens
val buffer = StringBuilder() val buffer = StringBuilder()
val last = lines.size - 1 val last = lines.size - 1
for (i in 0.upto(last)) { for (i in 0.rangeTo(last)) {
var text = lines[i] ?: "" var text = lines[i] ?: ""
text = text.trim() text = text.trim()
if (i == 0) { if (i == 0) {
@@ -630,7 +630,7 @@ $highlight"""
break break
} }
var count = 1 var count = 1
for (i in 0.upto(remaining.size - 1)) { for (i in 0.rangeTo(remaining.size - 1)) {
val ch = remaining[i] val ch = remaining[i]
if (ch == '{') count ++ if (ch == '{') count ++
else if (ch == '}') { else if (ch == '}') {
@@ -653,7 +653,7 @@ $highlight"""
// lets try resolve the include name relative to this file // lets try resolve the include name relative to this file
val paths = relativeName.split("/") val paths = relativeName.split("/")
val size = paths.size val size = paths.size
for (i in 0.upto(size - 2)) { for (i in 0.rangeTo(size - 2)) {
val path = paths[i] val path = paths[i]
if (path == ".") continue if (path == ".") continue
else if (path == "..") dir = dir?.getParent() else if (path == "..") dir = dir?.getParent()
@@ -72,6 +72,7 @@
<fileset dir="${basedir}/../../stdlib/src/generated"> <fileset dir="${basedir}/../../stdlib/src/generated">
<include name="*.kt"/> <include name="*.kt"/>
<exclude name="**/*JVM.kt"/> <exclude name="**/*JVM.kt"/>
<exclude name="DownTo.kt"/>
<!-- <!--
<include name="JUtilIteratorsFromJLangIterables.kt"/> <include name="JUtilIteratorsFromJLangIterables.kt"/>
<include name="JUtilIterablesFromJUtilCollections.kt"/> <include name="JUtilIterablesFromJUtilCollections.kt"/>
+2 -2
View File
@@ -33,9 +33,9 @@ public final class IntRange implements Range<Integer>, IntIterable {
@Override @Override
public String toString() { public String toString() {
if (count >= 0) { if (count >= 0) {
return getStart() + ".upto(" + getEnd() + ")"; return getStart() + ".rangeTo(" + getEnd() + ")";
} else { } else {
return getStart() + ".downto(" + getEnd() + ")"; return getStart() + ".downTo(" + getEnd() + ")";
} }
} }