/
build.gradle
executable file
·77 lines (60 loc) · 2.6 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
subprojects {
apply plugin: 'java'
group = "se.fearlessgames.fear"
project.ext.coreLibDir = new File("fearless-render-core/lib")
project.ext.twlLibDir = new File("fearless-render-twl/lib")
repositories {
flatDir name: 'coreLibs', dirs: project.ext.coreLibDir.absolutePath
flatDir name: 'twlLibs', dirs: project.ext.twlLibDir.absolutePath
mavenCentral()
}
sourceCompatibility = 1.6
defaultTasks 'build'
test {
maxParallelForks = 10
}
buildDir = "build"
project.ext.slf4jVersion = '1.6.4'
project.ext.lwjglVersion = '2.8.3'
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.10'
testCompile group: 'se.mockachino', name: 'mockachino', version: '0.6.0'
compile group: 'org.slf4j', name: 'slf4j-api', version: project.ext.slf4jVersion
runtime group: 'ch.qos.logback', name: 'logback-classic', version: "1.0.1"
}
}
evaluationDependsOnChildren()
// Find any 3rd party libraries which have released new versions
// to the central Maven repo since we last upgraded.
task checkLibVersions << {
def checked = [:]
allprojects {
configurations.each { configuration ->
configuration.allDependencies.each { dependency ->
def version = dependency.version
if (!version.contains('SNAPSHOT') && !checked[dependency]) {
def group = dependency.group
def name = dependency.name
def url = "http://search.maven.org/solrsearch/select?q=g:\"$group\"+AND+a:\"$name\"+AND+p:\"jar\"&rows=20&wt=xml".toString()
try {
def response = new XmlSlurper().parseText(url.toURL().text)
def newestVersion = response.result.doc.str.findAll {
it.@name.text().contains("latestVersion")
}
if (!version.toString().equals(newestVersion.toString())) {
println "$group:$name $version -> $newestVersion"
}
} catch (FileNotFoundException e) {
logger.debug "Unable to download $url: $e.message"
} catch (org.xml.sax.SAXParseException e) {
logger.debug "Unable to parse $url: $e.message"
}
checked[dependency] = true
}
}
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '1.0-milestone-9'
}