forked from Insubstantial/insubstantial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
executable file
·153 lines (129 loc) · 4.61 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
configurations {
testCompile { extendsFrom compile }
toolsCompile { extendsFrom compile }
}
sourceSets {
main
test
tools {
compileClasspath = sourceSets.main.output + sourceSets.test.output + configurations.toolsCompile + configurations.testCompile
}
}
dependencies {
compile project(":substance")
compile project(":flamingo")
testCompile project(":substance").sourceSets.test.output
testCompile project(":flamingo").sourceSets.test.output
testCompile group: 'com.jgoodies', name: 'forms', version: '1.2.0'
toolsCompile project(":substance")
toolsCompile group: 'org.easytesting', name: 'fest-swing', version: '1.2.1'
toolsCompile group: 'asm', name: 'asm-all', version: '2.2.3'
}
task augmentation(dependsOn: classes) {
description = "Performs code augmentaiton for the laf-plugin and laf-widget libraries on the substance jar classes"
doLast {
def 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)
def verboseAugmentation = false
// Delegate augmentation
ant.'delegate-update-augment'(verbose: verboseAugmentation, pattern: ".*UI\u002Eclass") {
classpathset(dir: sourceSets.main.output.classesDir)
}
ant.'delegate-augment'(verbose: verboseAugmentation, pattern: ".*UI\u002Eclass") {
classpathset(dir: sourceSets.main.output.classesDir)
}
// Container ghosting augmentation
ant.'container-ghosting-augment'(verbose: verboseAugmentation) {
classpathset(dir: sourceSets.main.output.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,
)
}
}
task liteJar(type: Jar) {
dependsOn augmentation
classifier = 'lite'
manifest {
attributes(
"Substance-Version": version,
"Flamingo-Version": version,
"Substance-VersionName": versionKey,
"Flamingo-VersionName": versionKey,
)
}
}
task testJar(type: Jar) {
classifier = 'tst'
from sourceSets.test.output
manifest {
attributes(
"Substance-Version": version,
"Flamingo-Version": version,
"Substance-VersionName": versionKey,
"Flamingo-VersionName": versionKey,
)
}
}
artifacts {
archives liteJar
distro liteJar
}
uploadPublished {
repositories {
mavenDeployer {
configurePOM(pom)
}
}
}
install {
configurePOM(repositories.mavenInstaller.pom)
}
private def configurePOM(def pom) {
configureBasePom(pom)
pom.project {
name "substance-flamingo"
description "A fork of @kirilcool's substance project"
url "http://insubstantial.github.com/insubstantial/substance-flamingo/"
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"
}
}
}
}
task testSubstanceRibbon(type: JavaExec) {
main = 'test.substance.ribbon.NewCheckRibbon'
debug = Boolean.valueOf(System.getProperty('debug', 'false'))
classpath = sourceSets.test.runtimeClasspath
}
task testSubstanceRibbonRTL(type: JavaExec) {
main = 'test.substance.ribbon.NewCheckRibbon'
debug = Boolean.valueOf(System.getProperty('debug', 'false'))
classpath = sourceSets.test.runtimeClasspath
systemProperty "user.language", "iw"
}