3 id 'org.jetbrains.kotlin.jvm' version '1.3.50'
4 id 'org.jetbrains.kotlin.plugin.noarg' version '1.3.50'
5 id 'info.solidsoft.pitest' version '1.4.5'
8 group = 'net.pterodactylus'
13 maven { url "https://maven.pterodactylus.net/" }
18 sourceCompatibility = 1.8
19 targetCompatibility = 1.8
21 tasks.withType(JavaCompile) {
22 options.encoding = 'UTF-8'
27 dependencies.all { dep ->
28 configurations.default.exclude group: dep.group, module: dep.name
31 compile.extendsFrom provided
35 provided group: 'org.freenetproject', name: 'fred', version: '0.7.5.1475'
36 provided group: 'org.freenetproject', name: 'freenet-ext', version: '29'
37 provided group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.54'
39 compile group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8'
40 compile group: 'org.jetbrains.kotlinx', name: 'kotlinx-coroutines-core', version: '1.3.0-RC'
42 compile group: 'net.pterodactylus', name: 'utils', version: '0.12.4'
43 compile group: 'com.google.inject', name: 'guice', version: '4.2.2'
44 compile group: 'com.google.guava', name: 'guava', version: '27.0.1-android'
45 compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.1'
46 compile group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: '2.9.1'
47 compile group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.2'
48 compile group: 'org.jsoup', name: 'jsoup', version: '1.10.2'
49 compile group: 'io.dropwizard.metrics', name: 'metrics-core', version: '4.1.0'
50 compile group: 'javax.activation', name: 'javax.activation-api', version: '1.2.0'
52 testCompile group: 'org.jetbrains.kotlin', name: 'kotlin-test-junit'
53 testCompile group: 'junit', name: 'junit', version: '4.11'
54 testCompile group: 'org.mockito', name: 'mockito-core', version: '2.28.2'
55 testCompile group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3'
58 apply from: 'version.gradle'
61 maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
64 task fatJar(type: Jar) {
65 archiveName = project.name.toLowerCase() + '-jar-with-dependencies.jar'
66 from { (configurations.runtime - configurations.provided).collect { it.isDirectory() ? it : zipTree(it) } }
68 attributes('Plugin-Main-Class': 'net.pterodactylus.sone.main.SonePlugin')
77 footer('© 2010–2013 David ‘Bombe’ Roden')
78 links('http://docs.oracle.com/javase/7/docs/api/')
83 apply plugin: 'jacoco'
89 jacocoTestReport.dependsOn test
92 pitestVersion = '1.4.10'
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
125 annotation('net.pterodactylus.sone.main.NoArg')