-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
85 lines (75 loc) · 2.26 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
apply plugin: 'java'
apply plugin: 'pmd'
apply plugin: 'application'
apply plugin: 'eclipse'
apply plugin: 'gradle-one-jar'
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.github.rholder:gradle-one-jar:1.0.4'
}
}
if (hasProperty("teamcity")) {
version="0.0.1."+teamcity['build.number']
} else {
version="0.0.1.n"
}
group="pl.grm"
description="LWJGL Base Game Model"
def archieveFileName="LWJGL GRM Game"
mainClassName="pl.grm.game.Main"
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
compile group: 'com.google.guava', name: 'guava', version: '18.0'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.3.2'
compile group: 'org.lwjgl.lwjgl', name: 'lwjgl', version: '2.9.3'
compile group: 'org.lwjgl.lwjgl', name: 'lwjgl_util', version: '2.9.3'
compile group: 'org.ini4j', name: 'ini4j', version: '0.5.2'
compile group: 'net.java.jinput', name: 'jinput', version: '2.0.6'
compile group: 'com.typesafe.slick', name: 'slick_2.11', version: '2.1.0'
compile group: 'org.slick2d', name: 'slick2d-core', version: '1.0.1'
testCompile 'junit:junit:4.12'
}
jar {
manifest {
attributes 'Main-Class': mainClassName
attributes "Class-Path": configurations.compile.collect { it.getName() }.join(' ')
}
}
task execJar(type: OneJar) {
mainClass = mainClassName
archiveName = archieveFileName+"-"+version+".jar"
binLib = files("libs/native/windows/lwjgl.dll", "libs/native/windows/lwjgl64.dll")
}
run {
systemProperty 'java.library.path', file( 'libs/native/windows' )
}
pmd {
ignoreFailures = true
sourceSets = [sourceSets.main]
reportsDir = file("$project.buildDir/reports/pmd")
ruleSets = [
"java-basic",
"java-braces"
]
}
check << {
File outDir = new File('build/reports/pmd/')
outDir.mkdirs()
ant.taskdef(name: 'cpd', classname: 'net.sourceforge.pmd.cpd.CPDTask',
classpath: configurations.pmd.asPath)
ant.cpd(minimumTokenCount: '100', format: 'xml',
outputFile: new File(outDir , 'cpd.xml')) {
fileset(dir: "src/main/java") {
include(name: '**/*.java')
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.2.1'
}