forked from otros-systems/otroslogviewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
180 lines (153 loc) · 5.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
/*
* Copyright 2012 Krzysztof Otrebski
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
project.ext.set('sharedVersion', "1.3.2-SNAPSHOT-${new Date().format("yyyyMMdd-HHmmss")}")
subprojects {
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: "jacoco"
sourceCompatibility = 1.6
targetCompatibility = 1.6
dependencies {
testCompile 'org.testng:testng:6.8.8'
testCompile 'org.mockito:mockito-core:1.9.0'
}
repositories {
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
}
project(':Common-libs') {
dependencies {
compile fileTree(dir: 'lib', include: '*.jar')
compile 'com.beust:jcommander:1.29'
compile 'com.github.insubstantial:trident:7.1'
compile 'com.google.guava:guava:16.0.1'
compile 'com.jcraft:jsch:0.1.+'
compile 'com.jcraft:jzlib:1.+'
compile 'com.jgoodies:looks:2.+'
compile 'com.miglayout:miglayout-swing:4.2'
compile 'commons-beanutils:commons-beanutils-bean-collections:1.+'
compile 'commons-beanutils:commons-beanutils-core:1.+'
compile 'commons-beanutils:commons-beanutils:1.+'
compile 'commons-codec:commons-codec:1.+'
compile 'commons-collections:commons-collections:3.2.1'
compile 'commons-configuration:commons-configuration:1.+'
compile 'commons-digester:commons-digester:2.1'
compile 'commons-httpclient:commons-httpclient:3.1'
compile 'commons-io:commons-io:2.+'
compile 'commons-lang:commons-lang:2.+'
compile 'commons-logging:commons-logging:1.1.1'
compile 'jcifs:jcifs:1.+'
compile 'log4j:log4j:1.+'
compile 'org.apache.commons:commons-compress:1.3'
compile 'org.apache.commons:commons-vfs2:2.0'
compile 'org.slf4j:slf4j-api:1.6.6'
compile 'org.slf4j:slf4j-jdk14:1.6.6'
compile 'org.swinglabs.swingx:swingx-all:1.+'
compile 'org.swinglabs:jxlayer:3.0.4'
compile 'org.ocpsoft.prettytime:prettytime:3.1.0.Final'
compile 'com.github.insubstantial:substance:7.2.1'
compile 'org.apache.sling:org.apache.sling.commons.json:2.0.10'
}
}
project(':OtrosStarter') {
def today = new Date().format("yyyy-MM-dd")
jar {
manifest {
attributes(
'Main-Class': "pl.otros.starter.StartApp",
'Build-day': today,
'Build-date': new Date(),
'SplashScreen-Image': "img/otros/splash.png",
'Implementation-Version': sharedVersion,
)
}
}
}
project(':OtrosSwing') {
dependencies {
compile project(':Common-libs')
}
version = sharedVersion
}
project(':OtrosLogViewer-app') {
def today = new Date().format("yyyy-MM-dd");
dependencies {
compile project(':Common-libs')
compile project(':OtrosSwing')
}
version = sharedVersion
jar {
manifest.mainAttributes(
'Implementation-Title': 'OtrosLogViewer',
'Implementation-Version': sharedVersion,
'Main-Class': "pl.otros.logview.gui.LogViewMainFrame",
'Build-day': today,
'Build-date': new Date(),
'SplashScreen-Image': "img/otros/splash.png"
)
}
test {
useTestNG()
maxParallelForks = 4
}
}
project(':OtrosAppDist') {
println 'starting dist'
dependencies {
compile project(':Common-libs')
compile project(':OtrosStarter')
compile project(':OtrosLogViewer-app')
}
version = sharedVersion
def classpathList = configurations.runtime.collect { "./lib/" + it.getName() }.join('\n')
File f = new File("classpath.txt")
f.write(classpathList)
task dist(type: Zip, dependsOn: ':OtrosLogViewer-app:jar') {
baseName = "olv"
def baseDir = { baseName + "-" + version }
from(f.getAbsolutePath())
from(project.file('src/dist/otherFiles'))
from(project.file('src/dist/scriptsWin'))
from(file("src/dist/scriptsUnix").toString()) { fileMode = 0755 }
into(baseDir)
from(project.configurations.runtime) {
into("lib")
}
}
}
def allProcessResouresTasks() {
println "allProcessResourcesTasks"
project('OtrosLogViewer-app').sourceSets.processResourcesTaskName.collect { tasks[it] }
}
// This task only for SCM administrator.
// Execute external 'gradle' (of the desired version) and execute this task.
task upgradeWrapper(type: Wrapper) {
doFirst {
assert project.hasProperty('newVersion'):
'''Property 'newVersion' is required for task 'upgradeWrapper'.'''
assert project.newVersion == gradle.gradleVersion:
"You invoked Gradle system with version $gradle.gradleVersion instead of desired version $project.newVersion"
}
}
upgradeWrapper << {
gradleVersion = project['newVersion']
println 'WARNING: Merge our customizations into the newly-generated wrapper scripts'
}
upgradeWrapper.description = 'Upgrade Gradle version. For SCM Administrators.'