-
Notifications
You must be signed in to change notification settings - Fork 13
/
build.gradle
94 lines (77 loc) · 2.3 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
apply plugin: "java-library"
apply plugin: "eclipse"
apply plugin: "idea"
version '0.7.1'
sourceCompatibility = 1.8
targetCompatibility = 1.8
if (JavaVersion.current().isJava9Compatible()) {
tasks.withType(Javadoc) {
options.addStringOption("-release", "8");
}
}
repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
maven { url "https://jitpack.io" }
}
// PUBLISH SOURCES & JAVADOC
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allSource
}
javadoc {
failOnError = false
options.addStringOption('Xdoclint:none', '-quiet')
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = "javadoc"
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
// EXAMPLES
sourceSets {
example {
compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output
java {
}
}
}
// DEPENDENCIES
ext {
gdxVersion = "1.12.1"
guacamoleVersion = "92d161f06c" // =v.0.3.6
// Test dependencies
junitVersion = "5.10.0"
mockitoVersion = "4.11.0"
}
dependencies {
implementation "com.badlogicgames.gdx:gdx:$gdxVersion"
api "com.github.crykn.guacamole:gdx:$guacamoleVersion" // is exposed because of NestableFrameBuffer
testImplementation "org.junit.platform:junit-platform-launcher:1.2.0" // needed for a bug in older eclipse versions
testImplementation "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
testImplementation "org.mockito:mockito-inline:$mockitoVersion"
testImplementation "com.badlogicgames.gdx:gdx:$gdxVersion"
testImplementation "com.badlogicgames.gdx:gdx-backend-headless:$gdxVersion"
testImplementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
exampleImplementation "com.badlogicgames.gdx:gdx-backend-lwjgl3:$gdxVersion"
exampleImplementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
}
// TESTS
test {
useJUnitPlatform()
testLogging {
events "failed"
exceptionFormat "full"
}
}
// Clearing Eclipse project data in root folder
tasks.eclipse.doLast {
delete '.project'
delete '.classpath'
delete '.settings/'
}