forked from firm1/zest-writer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
166 lines (145 loc) · 5.32 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
154
155
156
157
158
159
160
161
162
163
164
165
166
plugins {
id "java"
id "jacoco"
id "com.github.kt3k.coveralls" version "2.6.3"
id "com.eriwen.gradle.css" version "2.12.0"
}
apply from: "http://dl.bintray.com/content/shemnon/javafx-gradle/8.1.1/javafx.plugin"
processResources {
filesMatching('config.properties') {
expand(project.properties)
}
}
compileJava.options.encoding = 'UTF-8'
// Configures plugin
javafx {
// Application name and ID presented by target OS
appID 'ZestWriter'
appName 'ZestWriter'
mainClass 'com.zestedesavoir.zestwriter.MainApp'
// JVM arguments, system properties, application command line arguments
jvmArgs = ['-XX:+AggressiveOpts', '-XX:CompileThreshold=1']
systemProperties = ['prism.disableRegionCaching': 'true']
arguments = []
// informations
category = "Office"
copyright = "Copyright (c) 2016 Zest Writer"
description = "This is a Markdown Editor for Zeste de Savoir contents"
licenseType = "GPLv3"
vendor = "firm1"
installSystemWide = true
menu = false
// app icons
icons {
shortcut = ["src/main/resources/logo/logo-16.png", "src/main/resources/logo/logo-32.png", "src/main/resources/logo/logo-128.png", "src/main/resources/logo/logo-256.png", "src/main/resources/logo/[email protected]", "src/main/resources/logo/[email protected]", "src/main/resources/logo/[email protected]"]
volume = 'src/main/resources/logo/logo-128.png'
setup = 'src/main/resources/logo/logo-128.png'
}
// Keystore credentials for signing JAR
// Generate key: keytool -genkey -alias release -keyalg RSA -keystore keystore.jks -keysize 2048
releaseKey {
alias = "release"
keyStore = file('keys/keystore.jks')
}
signingMode 'release'
}
String getProjectProperty(String propertyName) {
project.hasProperty(propertyName) ? project.property(propertyName) : null
}
repositories {
mavenLocal()
mavenCentral()
maven {
url "https://dl.bintray.com/firm1/maven"
}
}
sourceSets {
main {
java {
srcDir 'src/main/java'
}
resources {
srcDir 'src/main/resources'
exclude '*.pyc'
}
}
test {
java {
srcDir 'src/test/java'
}
resources {
srcDir 'src/test/resources'
exclude 'src/test/resources/log4j.properties'
}
}
}
task fatJar(type: Jar) {
manifest {
attributes 'Implementation-Title': 'Gradle Jar File',
'Implementation-Version': version,
'Main-Class': 'com.zestedesavoir.zestwriter.MainApp'
}
baseName = project.name + '-all'
zip64 = true
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
minifyCss {
source = "${sourceSets.main.resources.srcDirs.first()}/com/zestedesavoir/zestwriter/assets/static/css/content.css"
dest = "${sourceSets.main.output.resourcesDir}/com/zestedesavoir/zestwriter/assets/static/css/content.css"
yuicompressor { // Optional
lineBreakPos = -1
}
}
tasks.cssToBin.dependsOn tasks.minifyCss
tasks.minifyCss.dependsOn tasks.processResources
dependencies {
testCompile 'junit:junit:4.12'
compile group: 'org.languagetool', name: 'language-fr', version: '3.4'
compile group: 'org.apache.httpcomponents', name: 'fluent-hc', version: '4.5.2'
compile group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.5.2'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.8.2'
compile group: 'de.julielab', name: 'aliasi-lingpipe', version: '4.1.0'
compile group: 'org.python', name: 'jython-standalone', version: '2.7.1b3'
compile group: 'org.jsoup', name: 'jsoup', version: '1.9.2'
compile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.21'
compile group: 'de.jensd', name: 'fontawesomefx', version: '8.9'
compile group: 'org.zeroturnaround', name: 'zt-zip', version: '1.9'
compile group: 'org.controlsfx', name: 'controlsfx', version: '8.40.11'
compile group: 'org.fxmisc.richtext', name: 'richtextfx', version: '0.6.10'
compile group: 'com.zestedesavoir.zmarkdown', name: 'java-zmarkdown', version: '2.6.1'
compile group: 'com.fasterxml', name: 'jackson-module-json-org', version: '0.9.1'
compile group: 'commons-io', name: 'commons-io', version: '2.5'
}
test {
filter {
includeTestsMatching "*Test*"
}
systemProperty "zw.username", System.getProperty("zw.username")
systemProperty "zw.password", System.getProperty("zw.password")
systemProperty "zw.github_user", System.getProperty("zw.github_user")
systemProperty "zw.github_token", System.getProperty("zw.github_token")
systemProperty "file.encoding", "UTF-8"
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
}
afterEvaluate {
classDirectories = files(classDirectories.files.collect {
fileTree(dir: it,
exclude: ['**/view/**',
'**/contents/**',
'**/utils/api/**',
'**/MainApp**',
'**/officialContents/**',
'**/task/**'])
})
}
}
tasks.check.dependsOn jacocoTestReport
task wrapper(type: Wrapper) {
gradleVersion = '2.9'
}
apply plugin: 'java'