forked from kirill-grouchnikov/substance-flamingo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
executable file
·287 lines (249 loc) · 8.59 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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'de.huxhorn.gradle:de.huxhorn.gradle.pgp-plugin:0.0.3'
}
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'sign'
apply plugin: de.huxhorn.gradle.pgp.PgpPlugin
group = "com.github.insubstantial"
version = "6.3-SNAPSHOT"
versionKey = "6.3-defender-SNAPSHOT"
release = "internal"
timeStamp = new Date().format("MMMM d, yyyy HH:mm:ss z")
sourceCompatibility = 1.6
targetCompatibility = 1.6
configurations {
testCompile { extendsFrom compile }
toolsCompile { extendsFrom compile }
}
sourceSets {
main
// gradle bug - cannont include two different classifiers of the same dependency
//test
//tools {
//compileClasspath = sourceSets.main.classes + sourceSets.test.classes + configurations.toolsCompile + configurations.testCompile
//}
}
repositories {
mavenRepo name: 'sonatype staging', urls: 'https://oss.sonatype.org/content/groups/staging'
mavenCentral()
mavenRepo urls: new File(System.getProperty('user.home'), '.m2/repository').toURI().toString()
}
dependencies {
compile group:'com.github.insubstantial', name:'substance', version: version
compile group:'com.github.insubstantial', name:'flamingo', version: version
testCompile files('lib/substance-6.2-tst-hack.jar')
testCompile files('lib/flamingo-6.2-tst-hack.jar')
testCompile files('lib/batik-all.jar')
// testCompile group:'com.github.insubstantial', name:'substance', version: version, ext: 'tst'
// testCompile group:'com.github.insubstantial', name:'flamingo', version: version, ext: 'tst'
testCompile group:'com.jgoodies', name:'forms', version:'1.2.0'
toolsCompile group:'com.github.insubstantial', name:'substance', version: version, ext:'tools'
toolsCompile group:'org.easytesting', name:'fest-swing', version:'1.2'
}
task augmentation(dependsOn: classes) {
description = "Performs code augmentaiton for the laf-plugin and laf-widget libraries on the substance jar classes"
doLast {
// Explode laf-plugin and laf-widget
// copy {
// from zipTree('lib/build/laf-plugin.jar')
// into sourceSets.main.classesDir
// }
// copy {
// from zipTree('lib/build/laf-widget.jar')
// into sourceSets.main.classesDir
// }
augmentClassPath = configurations.toolsCompile.asPath + File.pathSeparator + configurations.compile.asPath
ant.taskdef(name: 'delegate-augment', classname: "org.pushingpixels.lafwidget.ant.AugmentTask", classpath: augmentClassPath)
ant.taskdef(name: 'delegate-update-augment', classname: "org.pushingpixels.lafwidget.ant.AugmentUpdateTask", classpath: augmentClassPath)
ant.taskdef(name: 'laf-augment', classname: "org.pushingpixels.lafwidget.ant.AugmentMainTask", classpath: augmentClassPath)
ant.taskdef(name: 'icon-ghosting-augment', classname: "org.pushingpixels.lafwidget.ant.AugmentIconGhostingTask", classpath: augmentClassPath)
ant.taskdef(name: 'container-ghosting-augment', classname: "org.pushingpixels.lafwidget.ant.AugmentContainerGhostingTask", classpath: augmentClassPath)
verboseAugmentation = false
//LAF augmentation
//ant.'laf-augment'(verbose: verboseAugmentaiton, mainlafclassname:"org.pushingpixels.substance.api.SubstanceLookAndFeel") {
// classpathset(dir:sourceSets.main.classesDir)
// delegate(name:"ViewportUI")
//}
// Delegate augmentation
ant.'delegate-update-augment'(verbose: verboseAugmentation, pattern: ".*UI\u002Eclass") {
classpathset(dir: sourceSets.main.classesDir)
}
ant.'delegate-augment'(verbose: verboseAugmentation, pattern: ".*UI\u002Eclass") {
classpathset(dir: sourceSets.main.classesDir)
}
// Container ghosting augmentation
ant.'container-ghosting-augment'(verbose: verboseAugmentation) {
classpathset(dir: sourceSets.main.classesDir)
containerghosting(className: "org.pushingpixels.substance.flamingo.ribbon.ui.SubstanceRibbonGalleryUI", toInjectAfterOriginal: "true")
containerghosting(className: "org.pushingpixels.substance.flamingo.ribbon.ui.SubstanceRibbonButtonUI", toInjectAfterOriginal: "true")
}
}
}
jar {
dependsOn augmentation
//dependsOn toolsClasses
manifest {
attributes(
"Substance-Version": version,
"Flamingo-Version": version,
"Substance-VersionName": versionKey,
"Flamingo-VersionName": versionKey,
"Substance-BuildStamp": timeStamp
)
}
}
task liteJar(type: Jar) {
dependsOn augmentation
//dependsOn toolsClasses
classifier = 'lite'
manifest {
attributes(
"Substance-Version": version,
"Flamingo-Version": version,
"Substance-VersionName": versionKey,
"Flamingo-VersionName": versionKey,
"Substance-BuildStamp": timeStamp
)
}
}
task testJar(type: Jar) {
classifier = 'tst'
from sourceSets.test.classes
manifest {
attributes(
"Substance-Version": version,
"Flamingo-Version": version,
"Substance-VersionName": versionKey,
"Flamingo-VersionName": versionKey,
"Substance-BuildStamp": timeStamp
)
}
}
//task testLiteJar(type: Jar) {
// classifier = 'tst-lite'
//
// from sourceSets.test.classes
//
// manifest {
// attributes(
// "Substance-Version": versionKey,
// "Substance-BuildStamp": timeStamp,
// "Main-Class": "test.Check",
// "Class-Path": "substance-lite.jar ../lib/trident.jar ../lib/build/forms-1.2.0.jar ../lib/build/swingx.jar ../lib/build/substance-swingx.jar"
// )
// }
//}
//
//task toolsJar(type: Jar) {
// classifier = 'tools'
// from sourceSets.tools.classes
// manifest {
// attributes(
// "Substance-Version": versionKey,
// "Substance-BuildStamp": timeStamp
// )
// }
//// the annotation factory class doesn't exist, ignore it?
//// doLast {
//// ant.apt(srcdir:sourceSets.tools.java.srcDirs.iterator().next(), classpath:"$libsDir/$archiveName", factory:"tools.apt.", compile:false)
//// }
//}
task distroJar(type: Jar) {
//dependsOn toolsJar, liteJar, testJar, testLiteJar, jar
dependsOn liteJar, jar
classifier = 'all'
from(projectDir)
include "lib/**"
include "src/**"
include "www/**/*.html"
include "www/docs/**"
include "www/images/**"
include "gradle.properties"
include "build.gradle"
}
//allSubstanceJars = [toolsJar, liteJar, testJar, testLiteJar, distroJar]
//uploadArchives.dependsOn << allSubstanceJars
//assemble.dependsOn << allSubstanceJars
task sourceJar(type: Jar) {
from sourceSets.main.java
from sourceSets.main.resources
classifier = 'sources'
}
task javadocJar(type: Jar) {
dependsOn javadoc
from javadoc.destinationDir
classifier = 'javadoc'
}
artifacts {
archives sourceJar
archives javadocJar
//archives toolsJar
archives liteJar
}
uploadArchives {
try {
def x = [deployUsername, deployPassword]
} catch (Exception e) {
deployUsername = 'unset'
deployPassword = ''
}
repositories {
mavenDeployer {
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication userName: deployUsername, password: deployPassword
}
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication userName: deployUsername, password: deployPassword
}
pom.project {
modelVersion '4.0.0'
packaging 'jar'
name "halberd"
description "A fork of @kirilcool's substance project"
url "http://insubstantial.github.com/insubstantialPeacock"
licenses {
license {
name 'BSD License'
url 'http://www.opensource.org/licenses/bsd-license.php'
distribution 'repo'
comments "Does not cover the Xoetrope Color Wheel"
}
license {
name 'Mozilla Public License 1.1'
url 'http://www.opensource.org/licenses/mozilla1.1'
distribution 'repo'
comments "Covers the Xoetrope Color Wheel"
}
}
scm {
connection 'scm:git:[email protected]:Insubstantial/insubstantialPeacock.git'
developerConnection 'scm:git:[email protected]:Insubstantial/insubstantialPeacock.git'
url 'scm:git:[email protected]:Insubstantial/insubstantialPeacock.git'
}
developers {
developer {
name 'Kirill Grouchnikov'
email '[email protected]'
roles {
role 'author'
role 'developer'
}
}
developer {
name 'Danno Ferrin'
email '[email protected]'
roles {
role 'maintainer'
}
}
}
}
}
}
}