-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
78 lines (61 loc) · 1.63 KB
/
Copy pathbuild.gradle
File metadata and controls
78 lines (61 loc) · 1.63 KB
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
plugins {
id 'java'
id 'maven-publish'
id 'idea'
id 'com.github.ben-manes.versions' version '0.39.0'
}
group 'sounie'
version '1.0-SNAPSHOT'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
consistentResolution {
useCompileClasspathVersions()
}
}
repositories {
mavenLocal()
mavenCentral()
}
test {
jvmArgs = ['-Xmx1500M']
useJUnitPlatform()
}
dependencies {
implementation(
'io.github.classgraph:classgraph:4.8.116',
'org.slf4j:slf4j-api:1.7.32'
)
testImplementation(
'com.sun.jersey:jersey-client:1.19.4',
'org.apache.hadoop:hadoop-client:3.3.1'
)
testImplementation('org.junit.jupiter:junit-jupiter:5.7.2')
testRuntimeOnly('org.junit.jupiter:junit-jupiter-engine:5.7.2')
}
publishing {
publications {
sounieDependencyCheck(MavenPublication) {
from components.java
pom {
description = 'This is a generated file to enable github to report dependencies. Please use ./gradlew for building.'
}
}
}
}
def isNonStable = { String version ->
def stableKeyword = ['RELEASE', 'FINAL', 'GA']
.any { it -> version.toUpperCase().contains(it) }
def regex = /^[0-9,.v-]+(-r)?$/
return !stableKeyword && !(version ==~ regex)
}
dependencyUpdates {
checkForGradleUpdate = true
outputFormatter = 'json,plain'
outputDir = "${project.buildDir}/reports/dependencies"
reportfileName = 'versions'
rejectVersionIf {
isNonStable(it.candidate.version) && !isNonStable(it.currentVersion)
}
}