-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathbuild.gradle
83 lines (78 loc) · 3.46 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
/*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
apply plugin: 'groovy'
tasks.register('installWekaPackages', JavaExec) {
group 'Setup'
description "Install Weka optional packages"
classpath = sourceSets.main.runtimeClasspath
mainClass = 'InstallWekaPackages'
}
ext.sv = JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17) ? smileVersion : smilePreviousVersion
dependencies {
implementation "org.apache.groovy:groovy:$groovy4Version"
implementation project(':ChartUtil')
implementation "nz.ac.waikato.cms.weka:weka-dev:$wekaVersion"
// If Weka is installed along with some optional packages, add the respective Jars to classpath
// TODO can we get Weka library to autodownload these
implementation files(['SelfOrganizingMap', 'LVQ', 'GenClustPlusPlus', 'XMeans', 'cascadeKMeans'].collect{
"${System.getProperty('user.home')}/wekafiles/packages/${it}/${it}.jar"})
implementation "org.apache.commons:commons-csv:$commonsCsvVersion"
implementation "org.apache.commons:commons-math4-legacy:$commonsMath4Version"
implementation 'org.hipparchus:hipparchus-clustering:3.1'
implementation "org.slf4j:slf4j-jdk14:$slf4jVersion"
implementation "org.encog:encog-core:3.4"
implementation "tech.tablesaw:tablesaw-core:$tablesawVersion"
implementation "tech.tablesaw:tablesaw-aggregate:$tablesawVersion"
implementation("com.github.haifengl:smile-core:$sv") {
transitive = false
}
implementation("com.github.haifengl:smile-base:$sv") {
transitive = false
}
implementation("com.github.haifengl:smile-plot:$sv") {
transitive = false
}
implementation "de.lmu.ifi.dbs.elki:elki:0.7.5"
implementation("org.tribuo:tribuo-all:$tribuoVersion") {
exclude(group: 'org.bytedeco', module: 'javacpp')
}
implementation("de.lmu.ifi.dbs.elki:elki-batik-visualization:0.7.5") {
exclude(group: 'xml-apis', module: 'xml-apis')
}
implementation "com.datumbox:datumbox-framework-lib:0.8.2"
// used by tribuo and smile
runtimeOnly "org.bytedeco:openblas-platform:$openblasPlatformVersion"
runtimeOnly "org.bytedeco:arpack-ng-platform:$arpackNgPlatformVersion"
// used by smile-plot
runtimeOnly 'org.swinglabs:swingx:1.6.1'
}
def runAll = tasks.register('runAll') {
group 'Application'
}
FileUtil.baseNames(sourceSets.main.allSource.files, ['InstallWekaPackages']).each { name ->
def subtask = tasks.register("run$name", JavaExec) {
if (name.endsWith('JDK17') && !JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) return
if (name.contains('Datumbox') && !JavaVersion.current().isJava11Compatible()) return
dependsOn compileGroovy
group 'Application'
description "Run ${name}.groovy as a JVM application/Groovy script"
classpath = sourceSets.main.runtimeClasspath
mainClass = name
}
runAll.configure {
dependsOn subtask
}
}