/
build.gradle
87 lines (76 loc) · 2.43 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
apply plugin: 'base'
apply plugin: 'distribution'
apply plugin: 'com.bmuschko.izpack'
version = '0.1.0-SNAPSHOT'
task wrapper(type: Wrapper, description: 'Creates and deploys the Gradle wrapper to the current directory.') {
gradleVersion = '2.1'
}
subprojects.each { subproject -> evaluationDependsOn(subproject.path) }
distZip.dependsOn project(':tools').subprojects.assemble
distTar.dependsOn project(':tools').subprojects.assemble
distributions {
main {
contents {
duplicatesStrategy = 'exclude'
from project.rootDir
include 'license.txt'
from 'src/dist'
include 'readme.txt'
into('lib') {
from 'lib'
}
project(':modules').subprojects.each { p ->
p.plugins.withType(JavaPlugin) {
into('lib') {
from p.jar.archivePath
include '*'
from p.configurations.runtime
include '*'
}
}
}
project(':tools').subprojects.each { p ->
p.plugins.withType(JavaPlugin) {
into('lib') {
from p.configurations.runtime
include '*'
}
into('bin') {
from p.jar.archivePath
include '*'
rename { filename -> p.name + ".jar" }
}
}
}
into('doc') {
from 'doc'
include '**'
}
into('resources') {
from 'resources'
include '**'
}
into('bin/lib') {
from 'lib/native'
include '**'
}
}
}
}
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.bmuschko:gradle-izpack-plugin:2.1'
}
}
izpack {
baseDir = file("$buildDir/distributions")
installFile = file('src/install-definition.xml')
outputFile = file("$buildDir/distributions/frinthesia-${version}-installer.jar")
compression = 'deflate'
compressionLevel = 9
appProperties = ['app.group': 'frinthesia', 'app.name': 'frinthesia', 'app.title': 'Frinthesia',
'app.version': version, 'app.subpath': "frinthesia-$version"]
}