X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=build.gradle;h=ce95eb95c38fd767893e371b7efb62e93f8b0dfd;hb=e280cbaa00df256a60277ed8b3443126a9865b6e;hp=2ceb56a9db4c1bccd33727f4801aefb94f5a13a3;hpb=39d7f93adc1f8c966c818ed71a223461716f6a84;p=Sone.git diff --git a/build.gradle b/build.gradle index 2ceb56a..ce95eb9 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ version = '0.9.6' buildscript { ext { - kotlinVersion = '1.0.6' + kotlinVersion = '1.1.1' } repositories { mavenCentral() @@ -100,3 +100,21 @@ findbugs { } apply plugin: 'idea' + +task countLinesMain(type: Exec) { + executable = 'cloc' + args = ['--by-file', '--xml', '--report-file=build/reports/cloc/main.xml', 'src/main'] + standardOutput = new ByteArrayOutputStream() +} + +task countLinesTest(type: Exec) { + executable = 'cloc' + args = ['--by-file', '--xml', '--report-file=build/reports/cloc/test.xml', 'src/test'] + standardOutput = new ByteArrayOutputStream() +} + +task countLines { + new File(buildDir, "reports/cloc").mkdirs() + dependsOn tasks.countLinesMain + dependsOn tasks.countLinesTest +}