forked from gurkenlabs/litiengine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
133 lines (109 loc) · 2.8 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
buildscript {
repositories {
mavenCentral()
}
}
plugins {
id 'com.stehno.natives' version '0.3.1'
id 'org.sonarqube' version '2.6.2'
}
natives {
configurations = ['runtime']
outputDir = 'libs'
}
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'maven'
archivesBaseName = "litiengine"
version = "v0.4.15-alpha"
sourceSets {
main.java.srcDir "src"
main.java.srcDir "resources"
test {
java {
srcDirs = ["tests"]
}
}
}
repositories {
mavenCentral()
}
dependencies {
compile 'net.java.jinput:jinput:2.0.9'
compile 'net.java.jinput:jinput:2.0.9:natives-all'
compile 'com.googlecode.soundlibs:jorbis:0.0.17.4'
compile 'com.googlecode.soundlibs:tritonus-share:0.3.7.4'
compile 'com.googlecode.soundlibs:vorbisspi:1.0.3.3'
compile ('com.googlecode.soundlibs:mp3spi:1.9.5.4'){
exclude group:'junit'
}
compile 'com.code-disaster.steamworks4j:steamworks4j:1.8.0'
// JAXB modules for JDK 9 or higher
compile 'javax.xml.bind:jaxb-api:2.3.0'
compile 'com.sun.xml.bind:jaxb-core:2.3.0'
compile 'com.sun.xml.bind:jaxb-impl:2.3.0'
compile 'javax.activation:activation:1.1.1'
testCompile 'org.junit.jupiter:junit-jupiter-api:5.3.+'
testCompile 'org.junit.jupiter:junit-jupiter-params:5.3.+'
testRuntime 'org.junit.jupiter:junit-jupiter-engine:5.3.+'
testCompile 'org.mockito:mockito-core:2.23.+'
}
test {
useJUnitPlatform()
}
jar {
from {configurations.compile.collect { zipTree it }
} {
exclude 'META-INF/services/**'
}
from('resources') { include '**/*' }
exclude '**/*.dll'
exclude '**/*.jnilib'
exclude '**/*.dylib'
exclude '**/*.so'
exclude 'junit**/**'
}
javadoc {
options.encoding 'UTF-8'
}
jacocoTestReport {
sourceSets(sourceSets.main)
getSourceDirectories().setFrom(sourceSets.main.allSource.srcDirs)
getClassDirectories().setFrom(sourceSets.main.output)
reports {
xml.enabled true
html.enabled true
xml.destination file("${buildDir}/jacoco/report.xml")
html.destination file("${buildDir}/jacoco/html")
}
}
task createJavadocs(type: Javadoc) {
source sourceSets.main.allJava
classpath = configurations.compile
options.encoding 'UTF-8'
dependsOn build
}
task distZip(type: Zip) {
group 'build'
from 'build/libs/'
include '*'
archiveName archivesBaseName + '-' + version + '.zip'
exclude archiveName
destinationDir(file('build/libs/'))
}
task fullbuild{
group 'build'
description 'executes the build including coverage reports and javadoc'
dependsOn createJavadocs
}
task copyLicense(type: Copy) {
from(new File('.')) { include 'LICENSE' }
into new File(buildDir, 'libs')
}
fullbuild.dependsOn jacocoTestReport
fullbuild.dependsOn distZip
compileJava.dependsOn includeNatives
includeNatives.dependsOn copyLicense
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}