♻️ Rename “TicketLink” to “Performance”
[rhynodge.git] / build.gradle
1 buildscript {
2     ext.kotlinVersion = '1.4.10'
3
4     repositories {
5         mavenCentral()
6     }
7     dependencies {
8         classpath group: "org.ajoberstar", name: "gradle-git", version: "1.1.0"
9     }
10 }
11
12 plugins {
13     id 'java'
14     id('org.jetbrains.kotlin.jvm') version '1.4.10'
15 }
16
17 apply plugin: "war"
18 apply plugin: "jacoco"
19 apply plugin: "idea"
20
21 idea {
22         project {
23                 languageLevel = "1.8"
24         }
25 }
26
27 group = "net.pterodactylus"
28 version = "0.1"
29
30 sourceCompatibility = 1.8
31 targetCompatibility = 1.8
32
33 repositories {
34     mavenCentral()
35     jcenter()
36 }
37
38 dependencies {
39     compile group: "org.jetbrains.kotlin", name: "kotlin-stdlib", version: "$kotlinVersion"
40     compile group: "com.google.guava", name: "guava", version: "14.0-rc1"
41     compile group: "log4j", name: "log4j", version: "1.2.17"
42     compile group: "org.apache.httpcomponents", name: "httpclient", version: "4.4"
43     compile group: "org.jsoup", name: "jsoup", version: "1.16.1"
44     compile group: "javax.mail", name: "mail", version: "1.4.6-rc1"
45     compile group: "org.apache.commons", name: "commons-lang3", version: "3.1"
46     compile group: "com.fasterxml.jackson.core", name: "jackson-databind", version: "2.15.1"
47     compile group: "com.google.inject", name: "guice", version: "4.0"
48     compile group: "org.jetbrains.kotlinx", name: "kotlinx-html-jvm", version: "0.7.1"
49     compile group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.2'
50
51     testCompile group: "junit", name: "junit", version:"4.12"
52     testCompile group: "org.hamcrest", name: "hamcrest-library", version:"1.3"
53     testCompile group: "org.mockito", name: "mockito-core", version:"1.9.5"
54 }
55
56 task fatJar(type: Jar) {
57         baseName = project.name + "-all"
58         manifest {
59                 attributes(
60                         "Main-Class": "net.pterodactylus.rhynodge.engine.Starter"
61                 )
62         }
63         from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
64         from { sourceSets.generated.resources.srcDirs }
65         with jar
66         dependsOn test
67 }
68
69 task createVersion() {
70     sourceSets {
71         generated {
72             resources {
73                 srcDir "src/generated/resources"
74             }
75         }
76     }
77     processResources.dependsOn(createVersion)
78 }
79
80
81 import org.ajoberstar.grgit.Grgit
82 createVersion {
83     doLast {
84         def gitRepo = Grgit.open(projectDir)
85         version = gitRepo.describe()
86         new File("src/generated/resources").mkdirs()
87         new File("src/generated/resources/version.txt").withWriter() { it.write(version) }
88     }
89 }
90
91 war {
92     classpath sourceSets.generated.output
93     dependsOn(test)
94 }
95
96 jacoco {
97     toolVersion = "0.7.6.201602180812"
98 }
99
100 /* vim: set ts=4 sw=4 et: */