-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
75 lines (64 loc) · 1.54 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
plugins {
id 'java'
id 'distribution'
id 'groovy'
id "org.openjfx.javafxplugin" version "0.0.9"
}
group 'com.yoursdearboy.omegat.plugins.browser'
version '1.4.0-rc.1'
sourceCompatibility = 1.8
ext {
mainClass = "com.yoursdearboy.omegat.plugins.browser.BrowserPlugin"
}
repositories {
mavenCentral()
maven {
url 'http://dl.bintray.com/omegat-org/maven'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
implementation 'org.omegat:vldocking:3.0.5'
implementation 'org.omegat:omegat:5.2.0'
implementation 'org.codehaus.groovy:groovy-all:3.0.1'
testImplementation group: 'junit', name: 'junit', version: '4.11'
}
javafx {
version = '11'
modules = [ 'javafx.swing', 'javafx.web']
configuration = 'compile'
}
jar {
manifest {
attributes("OmegaT-Plugins": rootProject.ext.mainClass)
}
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
}
task copyToOmegaT {
doLast {
def VAR_NAME = "OMEGAT_HOME"
def omegatDir = System.getenv(VAR_NAME)
if (!omegatDir) omegatDir = System.getProperty(VAR_NAME)
if (!omegatDir) throw new GradleException("Set $VAR_NAME variable or property")
copy {
from file("$buildDir/libs")
into file("$omegatDir/plugins")
}
}
}
distTar {
compression = Compression.GZIP
}
artifacts {
archives jar
}
distributions {
main {
contents {
from(jar)
from('README.md')
}
}
}