Skip to content

Commit bb80528

Browse files
dacrhuiwang
authored andcommitted
Add follow symlink in BundlerIO to help using scalakit as a git submodule (#58)
* do not take into account the generated scala file as itself a dependency * update scala release to 2.12.4 * Generated scala file is now formatted using scalafmt * Add FOLLOW_LINKS option to look for source file to integrate, really useful when scalakit is used as a git submodule * Add information on how to use the scalakit as a git submodule * Add vi/vim temporary file into ignore list
1 parent af7e62a commit bb80528

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,8 @@ project/boot/
1818

1919
### Kit
2020

21-
brutaltester
21+
brutaltester
22+
23+
### Vi
24+
*.swp
25+

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ The example Bot [Ghost in the Cell](https://www.codingame.com/multiplayer/bot-pr
4848

4949
5. Open CodinGame Sync to synchronize Player.scala file continuously to online IDE
5050

51+
## CodinGame Scala Kit integration into your own git depo
52+
53+
Using CodinGame Scala Kit as a git submodule inside your own git depot you can both store your solutions into
54+
a private depot, and still use and contribute to this scala kit.
55+
[All instructions are available within this example project](https://github.com/dacr/codingame-with-scalakit-example)
56+
5157
## Screenshot
5258
![alt tag](./asset/screenshot.png)
5359

src/main/scala/com/truelaurel/codingame/tool/bundle/BundlerIo.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.truelaurel.codingame.tool.bundle
22

33
import java.io.{File, PrintWriter}
4-
import java.nio.file.{Files, Paths}
4+
import java.nio.file.{Files, Paths, FileVisitOption}
55
import java.util.Objects
66

77
import scala.io.Source
@@ -55,7 +55,7 @@ case class StdBundlerIo(srcFolder: String = "./src/main/scala") extends BundlerI
5555
}
5656

5757
def findFile(fileName: String): File = {
58-
Files.find(Paths.get("src"), Int.MaxValue, (path, _) => path.endsWith(fileName))
58+
Files.find(Paths.get("src"), Int.MaxValue, (path, _) => path.endsWith(fileName), FileVisitOption.FOLLOW_LINKS)
5959
.findAny()
6060
.orElseThrow(() => new IllegalArgumentException(s"$fileName not found"))
6161
.toFile

0 commit comments

Comments
 (0)