-
Notifications
You must be signed in to change notification settings - Fork 100
/
Copy pathbuild.gradle
101 lines (87 loc) · 2.21 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
buildscript {
dependencies {
classpath group: 'de.dynamicfiles.projects.gradle.plugins', name: 'javafx-gradle-plugin', version: '8.8.2'
}
repositories {
mavenLocal()
maven { url "https://maven.aliyun.com/repository/central" }
maven { url "https://maven.aliyun.com/repository/jcenter" }
mavenCentral()
}
allprojects {
repositories {
mavenLocal()
maven { url "https://maven.aliyun.com/repository/central" }
maven { url "https://maven.aliyun.com/repository/jcenter" }
mavenCentral()
}
}
}
plugins {
id 'java'
id 'org.jetbrains.kotlin.jvm' version '1.4.0'
}
apply plugin: 'javafx-gradle-plugin'
group 'com.drakeet.purewriter'
version '0.3.1'
sourceCompatibility = 1.8
repositories {
mavenLocal()
mavenCentral()
}
def VERSION = version
jar {
manifest {
attributes 'Main-Class': 'com.drakeet.purewriter.Main'
attributes 'Version': VERSION
}
from {
configurations.compile.collect {
it.isDirectory() ? it : zipTree(it)
}
}
}
jfx {
appName = "Pure Writer"
nativeReleaseVersion = VERSION
mainClass = 'com.drakeet.purewriter.Main'
vendor = 'drakeet.com'
libFolderName = "libs"
addPackagerJar = true
copyAdditionalAppResourcesToJar = true
skipCopyingDependencies = false
bundler = "ALL"
bundleArguments = [
"applicationCategory": "Utility;"
]
usePatchedJFXAntLib = false
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
// compile "com.squareup.okio:okio:2.3.0"
compile 'io.netty:netty-all:4.1.51.Final'
compile 'com.google.protobuf:protobuf-java:3.11.4'
compile 'io.reactivex.rxjava2:rxjava:2.2.19'
compile 'com.jakewharton.rxrelay2:rxrelay:2.1.1'
compile 'com.google.code.gson:gson:2.8.5'
compile 'io.reactivex:rxjavafx:2.0.2'
compile 'com.github.houbb:opencc4j:1.6.0'
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
task generateJar(type: Copy, dependsOn: build) {
from('build/libs') {
include "PureWriter-${VERSION}.jar"
}
into('jar')
}
build.finalizedBy generateJar
task deleteJar(type: Delete, dependsOn: clean) {
delete 'jar'
}
clean.finalizedBy deleteJar