-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
82 lines (72 loc) · 2.27 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
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'
}
}
version = "0.0.0"
group= "pl.grm.bol"
description = 'BOL Game'
archivesBaseName = "BattleOfLegends"
mainClassName = 'pl.grm.bol.game.BattleOfLegends'
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.1'
compile group: 'org.lwjgl.lwjgl', name: 'lwjgl_util', version: '2.9.1'
compile group: 'org.ini4j', name: 'ini4j', version: '0.5.2'
compile group: 'net.java.jinput', name: 'jinput', version: '2.0.6'
compile group: 'org.jcraft', name: 'jorbis', version: "0.0.17"
compile group: 'com.typesafe.slick', name: 'slick_2.11', version: '2.1.0'
compile files('libs/BoL-Launcher_Lib-0.0.2.jar')
compile files('libs/TimeLib.jar')
}
jar {
manifest {
attributes 'Main-Class': 'pl.grm.bol.game.BattleOfLegends'
attributes "Class-Path": configurations.compile.collect { it.getName() }.join(' ')
}
}
task execJar(type: OneJar) {
mainClass = mainClassName
archiveName = archivesBaseName+"-"+version+"-SNAPSHOT.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 = [
"basic",
"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.1'
}