~ubuntu-branches/debian/stretch/insubstantial/stretch

« back to all changes in this revision

Viewing changes to substance/build.gradle

  • Committer: Package Import Robot
  • Author(s): Felix Natter
  • Date: 2016-01-18 20:58:45 UTC
  • Revision ID: package-import@ubuntu.com-20160118205845-crbmrkda61qsi5qa
Tags: upstream-7.3+dfsg2
ImportĀ upstreamĀ versionĀ 7.3+dfsg2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
configurations {
 
2
  testCompile { extendsFrom compile }
 
3
  toolsCompile { extendsFrom compile }
 
4
}
 
5
 
 
6
sourceSets {
 
7
  main
 
8
  test
 
9
  tools {
 
10
    compileClasspath = sourceSets.main.output + sourceSets.test.output + configurations.toolsCompile + configurations.testCompile
 
11
  }
 
12
}
 
13
 
 
14
 
 
15
dependencies {
 
16
  compile module('net.jcip:jcip-annotations:1.0') {
 
17
    transitive = false
 
18
  }
 
19
 
 
20
  compile project(path: ":trident")
 
21
  compile project(path: ":laf-widget", transitive: false)
 
22
  compile project(path: ":laf-plugin", transitive: false)
 
23
  testCompile group: 'com.jgoodies', name: 'forms', version: '1.2.0'
 
24
  testCompile group: 'org.swinglabs.swingx', name: 'swingx-core', version: '1.6.3'
 
25
  toolsCompile group: 'org.easytesting', name: 'fest-swing', version: '1.2.1'
 
26
  toolsCompile group: 'asm', name: 'asm-all', version: '2.2.3'
 
27
}
 
28
 
 
29
task augmentation(dependsOn: classes) {
 
30
  description = "Performs code augmentaiton for the laf-plugin and laf-widget libraries on the substance jar classes"
 
31
 
 
32
  doLast {
 
33
    def augmentClassPath = configurations.toolsCompile.asPath
 
34
 
 
35
    ant.taskdef(name: 'delegate-augment', classname: "org.pushingpixels.lafwidget.ant.AugmentTask", classpath: augmentClassPath)
 
36
    ant.taskdef(name: 'delegate-update-augment', classname: "org.pushingpixels.lafwidget.ant.AugmentUpdateTask", classpath: augmentClassPath)
 
37
    ant.taskdef(name: 'laf-augment', classname: "org.pushingpixels.lafwidget.ant.AugmentMainTask", classpath: augmentClassPath)
 
38
    ant.taskdef(name: 'icon-ghosting-augment', classname: "org.pushingpixels.lafwidget.ant.AugmentIconGhostingTask", classpath: augmentClassPath)
 
39
    ant.taskdef(name: 'container-ghosting-augment', classname: "org.pushingpixels.lafwidget.ant.AugmentContainerGhostingTask", classpath: augmentClassPath)
 
40
 
 
41
    def verboseAugmentation = false
 
42
 
 
43
    // Delegate augmentation
 
44
    ant.'delegate-update-augment'(verbose: verboseAugmentation, pattern: ".*UI\u002Eclass") {
 
45
      classpathset(dir: sourceSets.main.output.classesDir)
 
46
    }
 
47
 
 
48
    ant.'delegate-augment'(verbose: verboseAugmentation, pattern: ".*UI\u002Eclass") {
 
49
      classpathset(dir: sourceSets.main.output.classesDir)
 
50
    }
 
51
 
 
52
    // Icon ghosting augmentation
 
53
    ant.'icon-ghosting-augment'(verbose: verboseAugmentation) {
 
54
      classpathset(dir: sourceSets.main.output.classesDir)
 
55
      iconghosting(className: "org.pushingpixels.substance.internal.ui.SubstanceButtonUI", methodName: "paintIcon")
 
56
      iconghosting(className: "org.pushingpixels.substance.internal.ui.SubstanceToggleButtonUI", methodName: "paintIcon")
 
57
    }
 
58
 
 
59
    // Container ghosting augmentation
 
60
    ant.'container-ghosting-augment'(verbose: verboseAugmentation) {
 
61
      classpathset(dir: sourceSets.main.output.classesDir)
 
62
      containerghosting(className: "org.pushingpixels.substance.internal.ui.SubstanceDesktopPaneUI", toInjectAfterOriginal: "true")
 
63
      containerghosting(className: "org.pushingpixels.substance.internal.ui.SubstanceMenuBarUI", toInjectAfterOriginal: "true")
 
64
      containerghosting(className: "org.pushingpixels.substance.internal.ui.SubstanceMenuUI", toInjectAfterOriginal: "true")
 
65
      containerghosting(className: "org.pushingpixels.substance.internal.ui.SubstancePanelUI", toInjectAfterOriginal: "true")
 
66
      containerghosting(className: "org.pushingpixels.substance.internal.ui.SubstanceScrollBarUI", toInjectAfterOriginal: "true")
 
67
      containerghosting(className: "org.pushingpixels.substance.internal.ui.SubstanceToolBarUI", toInjectAfterOriginal: "true")
 
68
    }
 
69
  }
 
70
}
 
71
 
 
72
jar {
 
73
  dependsOn augmentation
 
74
  dependsOn toolsClasses
 
75
 
 
76
  manifest {
 
77
    attributes(
 
78
        "Substance-Distribution": "Full",
 
79
        "Substance-Version": version,
 
80
        "Substance-VersionName": versionKey,
 
81
    )
 
82
  }
 
83
 
 
84
}
 
85
 
 
86
task liteJar(type: Jar) {
 
87
  dependsOn augmentation
 
88
  dependsOn toolsClasses
 
89
 
 
90
  classifier = 'lite'
 
91
 
 
92
  from sourceSets.main.output
 
93
  exclude 'org/pushingpixels/substance/internal/contrib/randelshofer/**'
 
94
  exclude 'org/pushingpixels/substance/internal/contrib/xoetrope/**'
 
95
  exclude 'org/pushingpixels/substance/internal/ui/SubstanceColorChooserUI*'
 
96
  exclude 'org/pushingpixels/lafwidget/ant/**'
 
97
 
 
98
  manifest {
 
99
    attributes(
 
100
        "Substance-Distribution": "Lite",
 
101
        "Substance-Version": version,
 
102
        "Substance-VersionName": versionKey,
 
103
    )
 
104
  }
 
105
}
 
106
 
 
107
task testJar(type: Jar) {
 
108
  classifier = 'tst'
 
109
 
 
110
  from sourceSets.test.output
 
111
 
 
112
  manifest {
 
113
    attributes(
 
114
        "Substance-Version": version,
 
115
        "Substance-VersionName": versionKey,
 
116
    )
 
117
  }
 
118
}
 
119
 
 
120
task testLiteJar(type: Jar) {
 
121
  classifier = 'tst-lite'
 
122
 
 
123
  from sourceSets.test.output
 
124
 
 
125
  manifest {
 
126
    attributes(
 
127
        "Substance-Version": version,
 
128
        "Substance-VersionName": versionKey,
 
129
    )
 
130
  }
 
131
}
 
132
 
 
133
 
 
134
task toolsJar(type: Jar) {
 
135
  classifier = 'tools'
 
136
  from sourceSets.tools.output
 
137
  manifest {
 
138
    attributes(
 
139
        "Substance-Version": version,
 
140
        "Substance-VersionName": versionKey,
 
141
    )
 
142
  }
 
143
}
 
144
 
 
145
task distroJar(type: Jar) {
 
146
  dependsOn toolsJar, liteJar, testJar, testLiteJar, jar
 
147
  classifier = 'all'
 
148
  from(projectDir)
 
149
  include "lib/**"
 
150
  include "src/**"
 
151
  include "gradle.properties"
 
152
  include "build.gradle"
 
153
  exclude "**/*.vsd"
 
154
}
 
155
 
 
156
 
 
157
artifacts {
 
158
  archives toolsJar
 
159
  archives liteJar
 
160
  archives testJar
 
161
  distro toolsJar
 
162
  distro liteJar
 
163
}
 
164
 
 
165
uploadPublished {
 
166
  repositories {
 
167
    mavenDeployer {
 
168
      configurePOM(pom)
 
169
    }
 
170
  }
 
171
}
 
172
 
 
173
install {
 
174
  configurePOM(repositories.mavenInstaller.pom)
 
175
}
 
176
 
 
177
private def configurePOM(def pom) {
 
178
  configureBasePom(pom)
 
179
  pom.project {
 
180
    name "substance"
 
181
    description "A fork of @kirilcool's substance project"
 
182
    url "http://insubstantial.github.com/insubstantial/substance/"
 
183
    licenses {
 
184
      license {
 
185
        name 'BSD License'
 
186
        url 'http://www.opensource.org/licenses/bsd-license.php'
 
187
        distribution 'repo'
 
188
        comments "Does not cover the Xoetrope Color Wheel"
 
189
      }
 
190
      license {
 
191
        name 'Mozilla Public License 1.1'
 
192
        url 'http://www.opensource.org/licenses/mozilla1.1'
 
193
        distribution 'repo'
 
194
        comments "Covers the Xoetrope Color Wheel"
 
195
      }
 
196
    }
 
197
  }
 
198
 
 
199
  // deal with a gradle bug where transitive=false is not passed into the generated POM
 
200
  pom.whenConfigured {cpom ->
 
201
    cpom.dependencies.each {dep ->
 
202
      switch (dep.artifactId) {
 
203
        case 'jcip-annotations':
 
204
          dep.scope = 'provided'
 
205
          break;
 
206
        case 'trident':
 
207
          dep.classifier = 'swing'
 
208
          break
 
209
      }
 
210
    }
 
211
  }
 
212
 
 
213
}
 
214
 
 
215
 
 
216
task jitterbug(type: JavaExec) {
 
217
    main = 'tools.jitterbug.JitterbugEditor'
 
218
    debug = Boolean.valueOf(System.getProperty('debug', 'false'))
 
219
    classpath = sourceSets.tools.compileClasspath + sourceSets.tools.runtimeClasspath
 
220
}
 
221
 
 
222
task testCheck(type: JavaExec) {
 
223
  main = 'test.Check'
 
224
  debug = Boolean.valueOf(System.getProperty('debug', 'true'))
 
225
  classpath = sourceSets.test.runtimeClasspath
 
226
}
 
227
 
 
228
task testFoo(type: JavaExec) {
 
229
  main = 'Foo'
 
230
  debug = Boolean.valueOf(System.getProperty('debug', 'false'))
 
231
  classpath = sourceSets.test.runtimeClasspath
 
232
}
 
233
task testTridentLeakSnippet(type: JavaExec) {
 
234
  main = 'TridentLeakSnippet'
 
235
  debug = Boolean.valueOf(System.getProperty('debug', 'false'))
 
236
  classpath = sourceSets.test.runtimeClasspath
 
237
}