-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle
More file actions
134 lines (114 loc) · 3.85 KB
/
build.gradle
File metadata and controls
134 lines (114 loc) · 3.85 KB
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
apply plugin: 'java'
version = '0.0.4dev'
sourceCompatibility = 1.7
targetCompatibility = 1.7
def applicationName = 'mad-pp'
def applicationNameAndVersion = applicationName + '-' + version
def releasedir = applicationNameAndVersion
def releaseball = applicationNameAndVersion + '.tar.gz'
repositories { mavenCentral() }
dependencies {
compile project(':external-libs')
compile project(':util')
compile project(':util-test')
compile project(':util-audio')
compile project(':util-audio-test')
compile project(':util-gui')
compile project(':util-gui-test')
compile project(':util-audio-gui')
compile project(':util-audio-gui-test')
compile project(':common-services')
compile project(':common-services-test')
compile project(':audio-services')
compile project(':audio-services-test')
compile project(':external-libmpg123-wrapper')
compile project(':external-libsndfile-wrapper')
compile project(':component-designer-services')
compile project(':component-designer')
compile project(':component-designer-test')
compile project(':external-libsndfile-services')
compile project(':external-libsndfile-services-test')
compile project(':external-libmpg123-services')
compile project(':external-libmpg123-services-test')
}
task appJar(type: Jar) {
baseName = applicationName
manifest {
attributes 'Main-Class': 'uk.co.modularaudio.componentdesigner.ComponentDesigner'
}
from {
subprojects.jar.archivePath.collect {
zipTree(it)
}
}
into('images') {
from fileTree(dir: '2COMMONPROJECTS/audio-services-images/images', includes: ['*.png'])
}
}
appJar.dependsOn build
test {
systemProperties = System.getProperties();
systemProperties['org.jboss.logging.provider'] = 'slf4j'
}
task copyNativeLibs(type: Copy) {
from '4EXTERNAL/external-libmpg123-wrapper/lib/libmpg123_wrap.so'
from '4EXTERNAL/external-libmpg123-wrapper/lib/libmpg123_wrap.dylib'
from '4EXTERNAL/external-libsndfile-wrapper/lib/libsndfile_wrap.so'
from '4EXTERNAL/external-libsndfile-wrapper/lib/libsndfile_wrap.dylib'
into releasedir + '/natives'
}
task copyLaunchScripts(type: Copy) {
from '1PROJECTS/COMPONENTDESIGNER/component-designer/scripts'
include '*.sh'
include '*.bat'
into releasedir
}
task copySupportJars(type: Copy) {
from '4EXTERNAL/external-libs/libs'
into releasedir + '/supportlibs'
}
copySupportJars.dependsOn(':external-libs:get_libs')
task copyCdJar(type: Copy) {
from 'build/libs/' + applicationNameAndVersion + '.jar'
into releasedir
}
copyCdJar.dependsOn build
task copyUserPatches(type: Copy) {
from '1PROJECTS/COMPONENTDESIGNER/component-designer/userpatches'
into releasedir + '/userpatches'
}
task copyUserSubRackPatches(type: Copy) {
from '1PROJECTS/COMPONENTDESIGNER/component-designer/usersubrackpatches'
into releasedir + '/usersubrackpatches'
}
task appSupportFiles(type: JavaExec) {
classpath += project(':component-designer').sourceSets.main.runtimeClasspath
def jarFilePath = file(releasedir + '/' + applicationNameAndVersion + '.jar')
classpath += files { jarFilePath }
main = "uk.co.modularaudio.componentdesigner.generators.ComponentDesignerSupportFileGenerator"
jvmArgs = [
'-Djava.library.path=../4EXTERNAL/external-libsndfile-wrapper/lib:../4EXTERNAL/external-libmpg123-wrapper/lib',
'-Dorg.jboss.logging.provider=slf4j',
'-Djava.awt.headless=true'
]
args = [
'.'
]
workingDir = releasedir
}
appSupportFiles.dependsOn build, copyNativeLibs, copyLaunchScripts,
copySupportJars, copyCdJar, copyUserPatches, copyUserSubRackPatches
task appRelease(type:Exec) {
commandLine 'tar'
args '-zcf', releaseball, releasedir
}
appRelease.dependsOn build, appJar, appSupportFiles
task appReleaseClean {
doLast {
def maindir = file(releasedir)
maindir.deleteDir()
def mainball = file(releaseball)
mainball.delete()
}
}
clean.dependsOn appReleaseClean