-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
101 lines (82 loc) · 2.37 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
95
96
97
98
99
100
101
buildscript {
repositories {
mavenLocal()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
jcenter()
}
}
version = '0.2.0'
ext {
appName = "pfxr"
gdxVersion = '1.9.6'
pdVersion = '0.7.0'
junitVersion = '4.12'
mainClassName = "net.mgsx.pfxr.PFXR"
assetsDir = new File("assets");
}
repositories {
mavenLocal()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
}
apply plugin: "eclipse"
eclipse {
project {
name = appName
}
}
apply plugin: "idea"
apply plugin: "java"
dependencies {
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
compile "net.mgsx.gdx:gdx-pd:$pdVersion"
compile "net.mgsx.gdx:gdx-pd-platform:$pdVersion:desktop"
compile "net.mgsx.gdx:gdx-pd-platform:$pdVersion:natives-desktop"
testCompile "junit:junit:$junitVersion"
}
sourceCompatibility = 1.6
sourceSets.main.java.srcDirs = [ "src/" ]
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
task run(dependsOn: classes, type: JavaExec) {
main = project.mainClassName
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
workingDir = project.assetsDir
ignoreExitValue = true
}
task debug(dependsOn: classes, type: JavaExec) {
main = project.mainClassName
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
workingDir = project.assetsDir
ignoreExitValue = true
debug = true
}
task dist(type: Jar) {
from files(sourceSets.main.output.classesDir)
from files(sourceSets.main.output.resourcesDir)
from {configurations.compile.collect {zipTree(it)}}
archiveName = "${appName}.jar"
manifest {
attributes 'Main-Class': project.mainClassName
}
}
dist.dependsOn classes
task distZip(type: Zip, dependsOn: dist){
from files('build/libs/'){
include 'pfxr.jar'
fileMode = 0755
}
from files('dist/'){
include "*.txt"
}
from files('.'){
include 'pd/*.pd', 'presets/*.txt', 'audio', 'assets/skins/*'
}
archiveName "${appName}-${version}.zip"
destinationDir(file("build"))
}