forked from henrikor2/bridlensis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
91 lines (75 loc) · 2.08 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
apply plugin: 'java'
version = new File('src/main/resources/bridlensis/VERSION').text
sourceCompatibility = 1.7
project.ext.nsisHome = ''
sourceSets {
doc {
java {
srcDir 'src/doc/java'
}
resources {
srcDir 'src/doc/resources'
}
compileClasspath += sourceSets.main.output
runtimeClasspath += compileClasspath
}
}
configurations {
bridle
}
repositories {
flatDir {
dirs 'lib'
}
}
dependencies {
compile fileTree(dir: gradle.gradleHomeDir.toString() + '/lib',
include: 'ant-*.jar')
testCompile name: 'junit-4.11'
testCompile name: 'hamcrest-core-1.3'
docCompile name: 'markdown4j-2.2'
bridle sourceSets.main.runtimeClasspath
}
jar {
archiveName = 'BridleNSIS-' + version + '.jar'
dependsOn = [test]
manifest {
attributes 'Implementation-Title': 'BridleNSIS',
'Implementation-Version': version,
'Main-Class': 'bridlensis.MakeBridleNSIS'
}
}
docClasses.dependsOn jar
task(doc, dependsOn: 'docClasses', type: JavaExec) {
main 'bridlensis.doc.HTMLConvert'
classpath = sourceSets.doc.runtimeClasspath
args 'build/doc'
}
task(installer, dependsOn: 'doc') << {
copy {
from '.'
include 'LICENSE'
into 'build/inst'
}
copy {
from 'build/doc'
from 'build/libs'
into 'build/inst'
}
copy {
from 'src/inst'
into 'build/inst/Example'
}
ant.taskdef(name: 'bridle',
classname: 'bridlensis.ApacheAntTask',
classpath: configurations.bridle.asPath) {
}
ant.bridle(file: 'build/inst/Example/Installer.nsi',
nsisHome: project.ext.nsisHome,
encoding: 'Cp1252') {
nsisOption(value: '/DBRIDLE_HOME=${basedir}\\build\\inst')
nsisOption(value: '/DBRIDLE_VERSION=' + version)
}
}
logging.captureStandardOutput LogLevel.INFO
defaultTasks 'installer'