-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.gradle
58 lines (50 loc) · 1.63 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
plugins { id "com.github.johnrengelman.shadow" version "7.1.2" }
apply plugin: 'java'
group = 'example'
version = '0.8.0'
description = """ELKI Example Project"""
// You may choose to use a newer Java version here:
sourceCompatibility = 1.11
targetCompatibility = 1.11
compileJava.options.encoding = 'UTF-8'
repositories { mavenCentral() }
dependencies {
// All the core parts
implementation group: 'io.github.elki-project', name: 'elki', version: '0.8.0'
// If you want to use visualization:
implementation group: 'io.github.elki-project', name: 'elki-batik-visualization', version: '0.8.0'
}
// Check for missing service file entries:
task serviceFiles(type: JavaExec, dependsOn: classes) {
description "Generate ELKI service files automatically"
group "Build"
classpath sourceSets.test.runtimeClasspath
mainClass = "elki.application.internal.CheckELKIServices"
args "-update"
args "${projectDir}/src/main/resources"
}
jar.dependsOn serviceFiles
// Jar file
jar {
manifest {
attributes(
"Main-Class" : "elki.application.ELKILauncher",
"Class-Path": configurations.runtimeClasspath.collect { "lib/"+it.getName() }.join(' ')
)
}
}
// Build a standalone jar file:
shadowJar {
dependsOn jar
from jar.outputs.files // To include the bundle jar with above notices!
configurations = [ project.configurations.runtimeClasspath ]
destinationDirectory = project.rootDir
classifier = null
manifest {
attributes("Class-Path" : "")
}
mergeServiceFiles { path = "META-INF/services" } // Batik
mergeServiceFiles { path = "META-INF/elki" }
}
assemble.dependsOn shadowJar
artifacts.archives shadowJar