forked from claeis/umleditor
-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
145 lines (129 loc) · 4.03 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
group 'ch.interlis'
version '3.6.8'
apply plugin: "java"
apply plugin: "maven"
sourceCompatibility = "1.6"
targetCompatibility = "1.6"
compileJava.options.encoding = 'UTF-8'
configurations {
deployerJars
}
repositories {
mavenLocal()
mavenCentral()
maven { url "https://jars.interlis.ch" }
flatDir { dirs 'lib' }
}
Properties properties = new Properties()
File propFile=project.rootProject.file('user.properties')
if(propFile.exists()){
properties.load(propFile.newDataInputStream())
}
def git = System.getProperty('git',properties.get('git','git'))
def repos_pwd = System.getProperty('repos_pwd',properties.get('repos_pwd','repos_pwd'))
def repos_usr = System.getProperty('repos_usr',properties.get('repos_usr','repos_usr'))
compileJava {
options.fork = true
options.forkOptions.executable = "javac"
options.compilerArgs << "-XDignore.symbol.file"
}
sourceSets {
main {
java {
srcDirs = ["src"]
}
resources {
srcDirs = ["src", "resources/de", "resources/fr", "resources/it", "resources/es"]
include "**/*.properties"
include "**/*.gif"
include "**/*.jpg"
}
}
test {
java {
srcDirs = []
exclude '**/UmlEditorTestSuite.java'
}
}
}
dependencies {
implementation name: 'jh'
implementation name: 'jhotdraw53'
implementation name: 'sebase'
implementation name: 'usrdocjh'
implementation name: 'XMIFramework'
compile group: 'com.jtattoo', name: 'JTattoo', version: '1.6.11'
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.2'
implementation group: 'ch.interlis', name: 'ili2c-tool', version: '5.1.1'
implementation group: 'ch.interlis', name: 'ili2c-core', version: '5.1.1'
implementation group: 'ch.ehi', name: 'ehibasics', version: '1.3.0'
implementation(group:'org.freehep', name:'freehep-graphicsio', version:'2.3'){
exclude group:'junit', module:'junit'
}
implementation(group:'org.freehep', name:'freehep-graphics2d', version:'2.3'){
exclude group:'junit', module:'junit'
}
implementation(group:'org.freehep', name:'freehep-io', version:'2.2.2'){
exclude group:'junit', module:'junit'
}
implementation(group:'org.freehep', name:'freehep-graphicsbase', version:'2.3') {
exclude group:'junit', module:'junit'
}
implementation(group:'org.freehep', name:'freehep-graphicsio-emf', version:'2.3'){
exclude group:'org.freehep', module:'freehep-graphicsio-tests'
exclude group:'junit', module:'junit'
}
implementation(group:'org.freehep', name:'freehep-graphicsio-svg', version:'2.3'){
exclude group:'org.freehep', module:'freehep-graphicsio-tests'
exclude group:'junit', module:'junit'
}
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
deployerJars "org.apache.maven.wagon:wagon-ftp:3.0.0"
}
//create a single Jar with all dependencies
jar {
manifest {
attributes (
'Main-Class': 'ch.ehi.umleditor.application.LauncherView',
"Class-Path": configurations.runtimeClasspath.collect { 'libs/'+it.getName() }.join(' ')
)
}
}
task run(type:JavaExec) {
classpath = sourceSets.main.runtimeClasspath
main = "ch.ehi.umleditor.application.LauncherView"
}
task bindist(type: Zip){
baseName = project.name
destinationDir = file('dist')
from jar
into('docs'){
from files(fileTree("docs/bindist").include("*")
, fileTree("other").include("LICENSE.*")
, "docs/Manual UML-Editor.pdf")
}
into('libs'){
from configurations.runtimeClasspath
}
}
artifacts {
archives(bindist.archivePath) {
type 'zip'
classifier 'bindist'
builtBy bindist
}
archives(jar.archivePath){
builtBy jar
}
}
uploadArchives {
repositories {
mavenDeployer {
configuration = configurations.deployerJars
repository(url: 'ftp://ftp.interlis.ch'){
authentication(userName: repos_usr, password: repos_pwd)
}
}
}
}