X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=build.gradle;h=ce95eb95c38fd767893e371b7efb62e93f8b0dfd;hb=de7568a82eb4150bf6d2b0553841b7b69f84c968;hp=f19c86161a48ea1df4b8e77bfd361f85bd784a3d;hpb=615544dfc6d5d9d33bfc5e4cf823af4289b1743f;p=Sone.git diff --git a/build.gradle b/build.gradle index f19c861..ce95eb9 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ version = '0.9.6' buildscript { ext { - kotlinVersion = '1.0.5' + 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 +}