1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt-line-count.git synced 2025-04-25 03:07:11 -07:00
This commit is contained in:
Cedric Beust 2015-10-11 19:28:23 -07:00
parent d772f498a8
commit 7780a54ffb
5 changed files with 8 additions and 10 deletions

View file

@ -5,9 +5,8 @@ import com.beust.kobalt.plugin.publish.*
import com.beust.kobalt.plugin.linecount.lineCount import com.beust.kobalt.plugin.linecount.lineCount
val plugins = plugins( val plugins = plugins(
// "com.beust.kobalt:kobalt-line-count:0.8" // "com.beust.kobalt:kobalt-line-count:0.14"
// file(homeDir("kotlin/kobalt-line-count/kobaltBuild/libs/kobalt-line-count-0.8.jar")) file(homeDir("kotlin/kobalt-line-count/kobaltBuild/libs/kobalt-line-count-0.14.jar"))
file(homeDir("kotlin/kobalt-line-count/kobaltBuild/libs/kobalt-line-count-0.12.jar"))
) )
val lc = lineCount { val lc = lineCount {
@ -17,11 +16,11 @@ val project = kotlinProject {
name = "kobalt-line-count" name = "kobalt-line-count"
group = "com.beust.kobalt" group = "com.beust.kobalt"
artifactId = name artifactId = name
version = "0.12" version = "0.14"
dependencies { dependencies {
// compile("file:" + homeDir("kotlin/kobalt/kobaltBuild/libs/kobalt-0.168.jar")) // compile("file:" + homeDir("kotlin/kobalt/kobaltBuild/libs/kobalt-0.168.jar"))
compile("com.beust:kobalt:0.171") compile("com.beust:kobalt:0.174")
} }
} }

View file

@ -23,7 +23,7 @@ apply plugin: 'kotlin'
dependencies { dependencies {
compile "com.google.guava:guava:18.0" compile "com.google.guava:guava:18.0"
compile "com.beust:kobalt:0.171" compile "com.beust:kobalt:0.174"
} }
sourceSets { sourceSets {
main.java.srcDirs += 'src/main/kotlin' main.java.srcDirs += 'src/main/kotlin'

View file

@ -36,6 +36,6 @@
<orderEntry type="library" name="Gradle: javax.inject:javax.inject:1" level="project" /> <orderEntry type="library" name="Gradle: javax.inject:javax.inject:1" level="project" />
<orderEntry type="library" name="Gradle: aopalliance:aopalliance:1.0" level="project" /> <orderEntry type="library" name="Gradle: aopalliance:aopalliance:1.0" level="project" />
<orderEntry type="library" name="Gradle: org.codehaus.plexus:plexus-utils:3.0.20" level="project" /> <orderEntry type="library" name="Gradle: org.codehaus.plexus:plexus-utils:3.0.20" level="project" />
<orderEntry type="library" name="Gradle: com.beust:kobalt:0.171" level="project" /> <orderEntry type="library" name="Gradle: com.beust:kobalt:0.174" level="project" />
</component> </component>
</module> </module>

View file

@ -1 +1 @@
kobalt.version=0.171 kobalt.version=0.174

View file

@ -43,11 +43,10 @@ public class LineCountPlugin : BasePlugin(), KobaltLogger {
if (path.toFile().exists()) { if (path.toFile().exists()) {
Files.walkFileTree(path, object : SimpleFileVisitor<Path>() { Files.walkFileTree(path, object : SimpleFileVisitor<Path>() {
override public fun visitFile(path: Path, attrs: BasicFileAttributes): FileVisitResult { override public fun visitFile(path: Path, attrs: BasicFileAttributes): FileVisitResult {
log(2, "File: $path")
if (matcher.matches(path)) { if (matcher.matches(path)) {
fileCount++ fileCount++
lineCount += Files.lines(path).count() lineCount += Files.lines(path).count()
log(2, " MATCH $path") log(3, " MATCH $path")
} }
return FileVisitResult.CONTINUE return FileVisitResult.CONTINUE
} }