forked from acetousk/moqui-image
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle
More file actions
69 lines (59 loc) · 2.84 KB
/
Copy pathbuild.gradle
File metadata and controls
69 lines (59 loc) · 2.84 KB
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
/*
* This software is in the public domain under CC0 1.0 Universal plus a
* Grant of Patent License.
*
* To the extent possible under law, the author(s) have dedicated all
* copyright and related and neighboring rights to this software to the
* public domain worldwide. This software is distributed without any
* warranty.
*
* You should have received a copy of the CC0 Public Domain Dedication
* along with this software (see the LICENSE.md file). If not, see
* <http://creativecommons.org/publicdomain/zero/1.0/>.
*/
apply plugin: 'groovy'
def componentNode = parseComponent(project)
version = componentNode.'@version'
def jarBaseName = componentNode.'@name'
def moquiDir = projectDir.parentFile.parentFile.parentFile
def frameworkDir = file(moquiDir.absolutePath + '/framework')
repositories {
flatDir name: 'localLib', dirs: frameworkDir.absolutePath + '/lib'
flatDir name: 'fop_librepo', dirs: projectDir.parentFile.absolutePath + '/moqui-fop/librepo'
mavenCentral()
}
// Log4J has annotation processors, disable to avoid warning
tasks.withType(JavaCompile) { options.compilerArgs << "-proc:none" }
tasks.withType(GroovyCompile) { options.compilerArgs << "-proc:none" }
dependencies {
implementation project(':framework')
implementation project(':runtime:component:moqui-fop')
// https://mvnrepository.com/artifact/com.twelvemonkeys.imageio
implementation 'com.twelvemonkeys.imageio:imageio-jpeg:3.14.0'
implementation 'com.twelvemonkeys.imageio:imageio-batik:3.14.0' // svg support
implementation 'com.twelvemonkeys.imageio:imageio-tiff:3.14.0'
implementation 'com.twelvemonkeys.imageio:imageio-webp:3.14.0'
// https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-transcoder
// included in moqui-fop: implementation 'org.apache.xmlgraphics:batik-transcoder:1.16'
}
// by default the Java plugin runs test on build, change to not do that (only run test if explicit task)
// no longer workds as of gradle 4.8 or possibly earlier, use clear() instead: check.dependsOn.remove(test)
check.dependsOn.clear()
task cleanLib(type: Delete) { delete fileTree(dir: projectDir.absolutePath+'/lib', include: '*') }
clean.dependsOn cleanLib
/* does not need a jar file for now (all in services):
jar {
destinationDirectory = file(projectDir.absolutePath + '/lib')
archiveBaseName = jarBaseName
}
*/
tasks.register('copyDependencies', Copy) {
dependsOn cleanLib
from (configurations.runtimeClasspath -
project(':framework').configurations.runtimeClasspath -
project(':framework').tasks.named('jar').get().archiveFile.get().asFile -
project(':runtime:component:moqui-fop').configurations.runtimeClasspath -
project(':runtime:component:moqui-fop').tasks.named('jar').get().archiveFile.get().asFile)
into file(projectDir.absolutePath + '/lib')
}
jar.dependsOn copyDependencies