1 group = 'net.pterodactylus'
5 ext.kotlinVersion = '1.2.20'
10 classpath group: 'info.solidsoft.gradle.pitest', name: 'gradle-pitest-plugin', version: '1.1.11'
11 classpath group: 'org.jetbrains.kotlin', name: 'kotlin-gradle-plugin', version: kotlinVersion
12 classpath group: 'org.jetbrains.kotlin', name: 'kotlin-noarg', version: kotlinVersion
17 maven { url "http://maven.pterodactylus.net/" }
23 sourceCompatibility = 1.7
24 targetCompatibility = 1.7
26 tasks.withType(JavaCompile) {
27 options.encoding = 'UTF-8'
30 apply plugin: 'kotlin'
34 dependencies.all { dep ->
35 configurations.default.exclude group: dep.group, module: dep.name
38 compile.extendsFrom provided
42 provided group: 'org.freenetproject', name: 'fred', version: '0.7.5.1475'
43 provided group: 'org.freenetproject', name: 'freenet-ext', version: '29'
44 provided group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.54'
46 compile group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib'
47 compile group: 'net.pterodactylus', name: 'utils', version: '0.12.4'
48 compile group: 'com.google.inject', name: 'guice', version: '3.0'
49 compile group: 'com.google.guava', name: 'guava', version: '14.0.1'
50 compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.1'
51 compile group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: '2.9.1'
52 compile group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.2'
53 compile group: 'org.jsoup', name: 'jsoup', version: '1.10.2'
55 testCompile group: 'org.jetbrains.kotlin', name: 'kotlin-test'
56 testCompile group: 'junit', name: 'junit', version: '4.11'
57 testCompile group: 'org.mockito', name: 'mockito-core', version: '2.10.0'
58 testCompile group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3'
61 apply from: 'version.gradle'
63 task fatJar(type: Jar) {
64 archiveName = project.name + '-jar-with-dependencies.jar'
65 from { (configurations.runtime - configurations.provided).collect { it.isDirectory() ? it : zipTree(it) } }
67 attributes('Plugin-Main-Class': 'net.pterodactylus.sone.main.SonePlugin')
76 footer('© 2010–2013 David ‘Bombe’ Roden')
77 links('http://docs.oracle.com/javase/7/docs/api/')
82 apply plugin: 'jacoco'
88 jacocoTestReport.dependsOn test
90 apply plugin: 'info.solidsoft.pitest'
93 outputFormats = ['HTML', 'XML']
94 timestampedReports = false
98 apply plugin: 'findbugs'
101 ignoreFailures = true
106 task countLinesMain(type: Exec) {
108 args = ['--by-file', '--xml', '--report-file=build/reports/cloc/main.xml', 'src/main']
109 standardOutput = new ByteArrayOutputStream()
112 task countLinesTest(type: Exec) {
114 args = ['--by-file', '--xml', '--report-file=build/reports/cloc/test.xml', 'src/test']
115 standardOutput = new ByteArrayOutputStream()
119 new File(buildDir, "reports/cloc").mkdirs()
120 dependsOn tasks.countLinesMain
121 dependsOn tasks.countLinesTest
124 apply plugin: 'kotlin-noarg'
127 annotation('net.pterodactylus.sone.main.NoArg')