forked from tgsmith61591/clust4j
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
87 lines (77 loc) · 2.66 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
plugins {
id 'java'
id 'idea'
// id 'eclipse'
// id 'jacoco'
id 'org.gradlex.extra-java-module-info' version '1.8'
}
version = new Date().format('yyyy.MM.dd', TimeZone.getTimeZone('UTC'))
java {
sourceCompatibility = JavaVersion.VERSION_20 // Use this instead of toolchain.* if you want to manually setup your own JDK
targetCompatibility = JavaVersion.VERSION_20 // Use this instead of toolchain.* if you want to manually setup your own JDK
//toolchain.languageVersion = JavaLanguageVersion.of(21)
//toolchain.vendor = JvmVendorSpec.ADOPTIUM
modularity.inferModulePath.set(true)
}
compileJava {
doFirst {
println "Compiler Args: $options.compilerArgs"
println "Runtime Classpath: ${sourceSets.main.runtimeClasspath.asPath.split(System.getProperty('path.separator'))}"
}
}
tasks.named('test', Test) {
useJUnitPlatform()
}
tasks.register('debug', JavaExec) {
dependsOn 'classes'
mainClass = mainClassPath
classpath = sourceSets.main.runtimeClasspath
debug true
}
repositories {
mavenCentral()
//jcenter()
}
// https://youtrack.jetbrains.com/issue/IDEA-222172
idea {
module {
inheritOutputDirs = true
downloadJavadoc = true
downloadSources = true
}
}
tasks.named('wrapper', Wrapper) {
gradleVersion = '8.7'
distributionType = Wrapper.DistributionType.BIN
}
dependencies {
implementation group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.9'
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.23.1'
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.23.1'
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.10.2'
}
// Make sure every single dependency is modularized.
// Alternative is to use org.javamodularity.moduleplugin but
// it doesn't yield the same quality of results.
extraJavaModuleInfo {
// Avoid automatic modules
failOnAutomaticModules.set(true)
module('org.apache.commons:commons-math3', 'org.apache.commons.math3') {
exportAllPackages()
patchRealModule()
}
module('org.apache.commons:commons-lang3', 'org.apache.commons.lang3') {
exportAllPackages()
patchRealModule()
}
module('org.apache.logging.log4j:log4j-api', 'org.apache.logging.log4j.api') {
exportAllPackages()
patchRealModule()
}
module('org.apache.logging.log4j:log4j-core', 'org.apache.logging.log4j.core') {
exportAllPackages()
patchRealModule()
}
}