-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
76 lines (64 loc) · 1.76 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
plugins {
id 'java'
id 'idea'
//id 'net.ltgt.errorprone' version '0.0.11'
id 'com.github.sherter.google-java-format' version '0.7.1'
}
group 'com.github.gvacaliuc'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
compile 'com.google.guava:guava:26.0-jre'
testCompile group: 'junit', name: 'junit', version: '4.12'
}
// Enforces Java 10 Compatibility
allprojects {
tasks.withType(JavaCompile) {
sourceCompatibility = JavaVersion.VERSION_1_10
targetCompatibility = JavaVersion.VERSION_1_10
}
}
jar {
manifest {
attributes 'Main-Class': 'com.github.gvacaliuc.solitaire.game.GameController'
}
}
// Setup Compilation Options
compileJava {
options.fork = true
options.incremental = true
}
// turn on all warnings, except for the ones that are annoying or unhelpful
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:all" << "-Xlint:-serial" << "-Xlint:-processing"
}
// set Java flags to use more memory than default so we avoid unnecessary stack
// overflows
task run(type: JavaExec) {
jvmArgs = ['-Xss1m', '-Xms256m'] // 1MB stack, 256MB heap
}
idea {
project {
jdkName = '1.10'
languageLevel = '1.10'
}
}
// Javadocs
task docs (type: Javadoc) {
source = sourceSets.main.allJava
classpath = sourceSets.main.compileClasspath
destinationDir = file("${rootDir}/doc")
//options.showFromPrivate()
options.addBooleanOption('html5', true)
}
// Cleans the "doc" folder where our javadocs are generated
clean.doFirst {
delete "${rootDir}/doc"
}
task play (dependsOn: classes, type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
main = "com.github.gvacaliuc.solitaire.game.GameController"
standardInput = System.in
}