1 group = 'net.pterodactylus'
6 kotlinVersion = '1.1.1'
12 classpath group: 'info.solidsoft.gradle.pitest', name: 'gradle-pitest-plugin', version: '1.1.10'
13 classpath group: 'org.jetbrains.kotlin', name: 'kotlin-gradle-plugin', version: kotlinVersion
18 maven { url "http://maven.pterodactylus.net/" }
24 sourceCompatibility = 1.7
25 targetCompatibility = 1.7
27 tasks.withType(JavaCompile) {
28 options.encoding = 'UTF-8'
31 apply plugin: 'kotlin'
35 dependencies.all { dep ->
36 configurations.default.exclude group: dep.group, module: dep.name
39 compile.extendsFrom provided
43 provided group: 'org.freenetproject', name: 'fred', version: '0.7.5.1475'
44 provided group: 'org.freenetproject', name: 'freenet-ext', version: '29'
45 provided group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.54'
47 compile group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version: kotlinVersion
48 compile group: 'net.pterodactylus', name: 'utils', version: '0.12.4'
49 compile group: 'com.google.inject', name: 'guice', version: '3.0'
50 compile group: 'com.google.guava', name: 'guava', version: '14.0.1'
51 compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.1.2'
52 compile group: 'com.google.code.findbugs', name: 'jsr305', version: '2.0.1'
54 testCompile group: 'org.jetbrains.kotlin', name: 'kotlin-test', version: kotlinVersion
55 testCompile group: 'junit', name: 'junit', version: '4.11'
56 testCompile group: 'org.mockito', name: 'mockito-core', version: '2.1.0'
57 testCompile group: 'org.jsoup', name: 'jsoup', version: '1.7.1'
58 testCompile group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3'
61 task fatJar(type: Jar) {
62 archiveName = project.name + '-jar-with-dependencies.jar'
63 from { (configurations.runtime - configurations.provided).collect { it.isDirectory() ? it : zipTree(it) } }
65 attributes('Plugin-Main-Class': 'net.pterodactylus.sone.main.SonePlugin')
74 footer('© 2010–2013 David ‘Bombe’ Roden')
75 links('http://docs.oracle.com/javase/7/docs/api/')
80 apply plugin: 'jacoco'
83 toolVersion = '0.7.7.201606060606'
86 jacocoTestReport.dependsOn test
88 apply plugin: 'info.solidsoft.pitest'
91 outputFormats = ['HTML', 'XML']
92 timestampedReports = false
96 apply plugin: 'findbugs'
104 task countLinesMain(type: Exec) {
106 args = ['--by-file', '--xml', '--report-file=build/reports/cloc/main.xml', 'src/main']
107 standardOutput = new ByteArrayOutputStream()
110 task countLinesTest(type: Exec) {
112 args = ['--by-file', '--xml', '--report-file=build/reports/cloc/test.xml', 'src/test']
113 standardOutput = new ByteArrayOutputStream()
117 new File(buildDir, "reports/cloc").mkdirs()
118 dependsOn tasks.countLinesMain
119 dependsOn tasks.countLinesTest