-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
180 lines (150 loc) · 4.64 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
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "com.monochromeroad.gradle-plugins:gradle-aws-s3-sync:0.10"
}
}
//plugins {
// id "com.dorongold.task-tree" version "1.3"
//}
import com.monochromeroad.gradle.plugin.aws.s3.S3Sync
subprojects {
apply plugin: 'java'
version '7.5.0'
repositories {
mavenLocal()
maven {
url "https://m2.convertigo.com"
}
maven {
url "http://maven.teamdev.com/repository/products"
}
jcenter()
}
task syncLibs(type: Sync) {
into 'lib'
from configurations.runtime
}
task syncAll(dependsOn: 'syncLibs') {
doLast {
if (file('templates').exists()) {
def classpath = file('templates/classpath').text
def manifest = file('templates/MANIFEST.MF').text
fileTree('lib').each { f ->
manifest += ',\n lib/' + f.name
classpath += '\n\t<classpathentry kind="lib" path="lib/' + f.name + '"/>'
}
file('.classpath').text = classpath + '\n</classpath>\n'
file('META-INF/MANIFEST.MF').text = manifest + '\n'
}
}
}
}
project(':convertigo-eclipse-jxbrowser-linux64') {
dependencies {
runtime 'com.teamdev.jxbrowser:jxbrowser-linux64:6.18', { exclude module: 'jxbrowser'}
}
}
project(':convertigo-eclipse-jxbrowser-mac') {
dependencies {
runtime 'com.teamdev.jxbrowser:jxbrowser-mac:6.18', { exclude module: 'jxbrowser'}
}
}
project(':convertigo-eclipse-jxbrowser-win') {
dependencies {
runtime 'com.teamdev.jxbrowser:jxbrowser-win:6.18', { exclude module: 'jxbrowser'}
}
}
project(':convertigo-eclipse-plugin') {
configurations {
war
}
dependencies {
war 'com.convertigo.webapp:convertigo:' + version
runtime 'com.convertigo.lib:jxbrowser-license:2017.04.26'
runtime 'com.teamdev.jxbrowser:jxbrowser:6.18'
runtime 'org.apache.tomcat.embed:tomcat-embed-core:7.0.82'
runtime 'org.apache.tomcat.embed:tomcat-embed-logging-log4j:7.0.82'
runtime 'org.apache.tomcat:tomcat-dbcp:7.0.82'
runtime 'org.apache.axis2:axis2-adb:1.6.2@jar'
}
task unzipWarLib(type: Copy, dependsOn: 'syncLibs') {
from zipTree(configurations.war[0])
include 'WEB-INF/lib/**'
into 'lib'
eachFile { f ->
f.path = f.path.replaceFirst('WEB-INF/lib', '')
}
includeEmptyDirs false
}
task unzipWarNoLib(type: Sync) {
from zipTree(configurations.war[0])
exclude 'WEB-INF/lib/**'
into 'tomcat/webapps/convertigo'
}
task syncWar(dependsOn: [unzipWarLib, unzipWarNoLib])
tasks['syncAll'].dependsOn += 'syncWar'
}
project(':convertigo-eclipse-repository') {
task zipStudioLinux64(type: Tar, dependsOn: ':buildStudio') {
from 'target/products/com.convertigo.studio/linux/gtk/x86_64/'
compression = Compression.GZIP
archiveName 'convertigo-studio-linux64-' + version + '.tar.gz'
destinationDir file('target/upload')
}
task zipStudioMac(type: Tar, dependsOn: ':buildStudio') {
from 'target/products/com.convertigo.studio/macosx/cocoa/x86_64/'
compression = Compression.GZIP
archiveName 'convertigo-studio-mac-' + version + '.tar.gz'
destinationDir file('target/upload')
}
task zipStudioWin64(type: Zip, dependsOn: ':buildStudio') {
from 'target/products/com.convertigo.studio/win32/win32/x86_64/'
archiveName 'convertigo-studio-win64-' + version + '.zip'
destinationDir file('target/upload')
}
task zipStudioWin32(type: Zip, dependsOn: ':buildStudio') {
from 'target/products/com.convertigo.studio/win32/win32/x86/'
archiveName 'convertigo-studio-win32-' + version + '.zip'
destinationDir file('target/upload')
}
task zipStudioAll(dependsOn: ['zipStudioLinux64', 'zipStudioMac', 'zipStudioWin64', 'zipStudioWin32'])
task publish(type: S3Sync, dependsOn: 'zipStudioAll') {
accessKey project.properties['c8o.build.ak']
secretKey project.properties['c8o.build.sk']
from 'target/upload/'
into 'convertigo-download/build/' + version
}
publish.group = 'publishing'
}
project(':convertigo-eclipse-xulrunner-win32') {
configurations {
xul
}
dependencies {
xul 'com.convertigo.packages:xulrunner-win32:1.9.0.17-patched3'
}
task untarXulrunner(type: Copy) {
from tarTree(resources.gzip(configurations.xul[0]))
into 'xulrunner'
}
tasks['syncAll'].dependsOn += 'untarXulrunner'
}
task syncAll(dependsOn: subprojects.collect { it.tasks['syncAll'] })
task buildStudio(type: Exec, dependsOn: 'syncAll') {
if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
commandLine 'cmd', '/c', 'mvn'
} else {
commandLine 'mvn'
}
args 'clean', 'install'
}
buildStudio.onlyIf { !file('convertigo-eclipse-repository/target/products').exists() }
buildStudio.group = 'build'
allprojects.each { p ->
['syncAll', 'syncLibs', 'syncWar'].each { n ->
try { p.tasks[n].group = 'convertigo' } catch (all) {}
}
}