fixed up the code generator after moving stuff around and updated with the latest/greatest documentation and function includes

This commit is contained in:
James Strachan
2012-03-27 12:48:37 +01:00
parent 224f7d706a
commit fe9d5ddf89
9 changed files with 274 additions and 81 deletions
+4 -4
View File
@@ -41,12 +41,12 @@ fun generateFile(outFile: File, header: String, inputFile: File, f: (String)-> S
* at runtime.
*/
fun main(args: Array<String>) {
var srcDir = File("src")
var srcDir = File("src/kotlin")
if (!srcDir.exists()) {
srcDir = File("stdlib/src")
require(srcDir.exists(), "Could not find the src directory!")
srcDir = File("stdlib/src/kotlin")
require(srcDir.exists(), "Could not find the src/kotlin directory!")
}
val outDir = File(srcDir, "generated")
val outDir = File(srcDir, "../generated")
// JavaIterables - Generic iterable stuff
generateFile(File(outDir, "ArraysFromJavaIterables.kt"), "package kotlin\n\nimport kotlin.util.*", File(srcDir, "JavaIterables.kt")) {