Don’t specify charsets in content types
[rhynodge.git] / build.gradle
1 apply plugin: "java"
2 apply plugin: "war"
3 apply plugin: "jacoco"
4 apply plugin: "idea"
5
6 idea {
7         project {
8                 languageLevel = "1.8"
9         }
10 }
11
12 group = "net.pterodactylus"
13 version = "0.1"
14
15 sourceCompatibility = 1.8
16 targetCompatibility = 1.8
17
18 buildscript {
19     repositories {
20         mavenCentral()
21     }
22     dependencies {
23         classpath group: "org.ajoberstar", name: "gradle-git", version: "1.1.0"
24     }
25 }
26
27 repositories {
28         mavenCentral()
29 }
30
31 dependencies {
32     compile group: "com.google.guava", name: "guava", version: "14.0-rc1"
33     compile group: "log4j", name: "log4j", version: "1.2.17"
34     compile group: "org.apache.httpcomponents", name: "httpclient", version: "4.4"
35     compile group: "org.jsoup", name: "jsoup", version: "1.7.1"
36     compile group: "javax.mail", name: "mail", version: "1.4.6-rc1"
37     compile group: "org.apache.commons", name: "commons-lang3", version: "3.1"
38     compile group: "com.fasterxml.jackson.core", name: "jackson-core", version: "2.1.2"
39     compile group: "com.fasterxml.jackson.core", name: "jackson-annotations", version: "2.1.2"
40     compile group: "com.fasterxml.jackson.core", name: "jackson-databind", version: "2.1.2"
41     compile group: "com.google.inject", name: "guice", version: "4.0"
42
43     testCompile group: "junit", name: "junit", version:"4.12"
44     testCompile group: "org.hamcrest", name: "hamcrest-library", version:"1.3"
45     testCompile group: "org.mockito", name: "mockito-core", version:"1.9.5"
46 }
47
48 task fatJar(type: Jar) {
49         baseName = project.name + "-all"
50         manifest {
51                 attributes(
52                         "Main-Class": "net.pterodactylus.rhynodge.engine.Starter"
53                 )
54         }
55         from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
56         from { sourceSets.generated.resources.srcDirs }
57         with jar
58         dependsOn test
59 }
60
61 task createVersion() {
62     sourceSets {
63         generated {
64             resources {
65                 srcDir "src/generated/resources"
66             }
67         }
68     }
69     processResources.dependsOn(createVersion)
70 }
71
72
73 import org.ajoberstar.grgit.Grgit
74 createVersion << {
75     def gitRepo = Grgit.open(".")
76     version = gitRepo.describe()
77     new File("src/generated/resources").mkdirs()
78     new File("src/generated/resources/version.txt").withWriter() { it.write(version) }
79 }
80
81 war {
82     classpath sourceSets.generated.output
83     dependsOn(test)
84 }
85
86 /* vim: set ts=4 sw=4 et: */