-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
101 lines (91 loc) · 2.35 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
plugins {
id 'application'
id 'java'
id 'java-library'
id 'eclipse'
id 'maven'
}
applicationName = "fhir.emf"
group = 'org.hl7.fhir'
mainClassName = "org.hl7.fhir.emf"
version = '4.0.1'
description = 'FHIR.EMF'
def jarFile = buildDir.name + "/libs/" + applicationName + "-" + version + ".jar"
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenLocal()
mavenCentral()
}
configure(install.repositories.mavenInstaller) {
pom.project {
groupId group
artifactId applicationName
inceptionYear "2021"
packaging "jar"
}
}
sourceSets {
main {
java {
srcDirs 'src/main/java'
srcDirs 'src/main/resources'
srcDirs 'gen/main/java'
}
}
test {
java {
srcDirs 'src/test/java'
srcDirs 'src/test/resources'
}
}
}
dependencies {
api 'org.eclipse.emf:org.eclipse.emf.common:2.20.0'
api 'org.eclipse.emf:org.eclipse.emf.ecore:2.23.0'
api 'org.eclipse.emf:org.eclipse.emf.ecore.xmi:2.16.0'
api 'org.emfjson:emfjson-jackson:1.3.0'
api 'org.apache.logging.log4j:log4j-api:2.7'
api 'org.apache.logging.log4j:log4j-core:2.7'
api 'org.apache.logging.log4j:log4j-slf4j-impl:2.7'
implementation 'com.google.guava:guava:28.2-jre'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.1'
}
task bundle {
dependsOn jar
inputs.file jarFile
outputs.dir applicationName
doLast{
copy {
from "${buildDir}/libs"
into "${applicationName}"
fileMode = 0777
}
copy {
from "conf/"
into "${applicationName}/conf"
}
copy {
from configurations.runtimeClasspath
into "$applicationName/lib"
}
}
}
jar {
// Keep jar clean:
exclude "META-INF/*.SF", "META-INF/*.DSA", "META-INF/*.RSA", "META-INF/*.MF"
manifest {
attributes ("Implementation-Title" : "EMF 2 RDF",
"Implementation-Version": version,
"Main-Class": mainClassName,
"Class-Path": " lib/" + configurations.runtimeClasspath.collect { it.getName() }.join(" lib/"))
}
}
uploadArchives {
repositories {
flatDir {
dirs "repos"
}
}
}