Skip to content

Commit e767010

Browse files
committed
The Gradle build now takes unboundid-ldapsdk, jna and the jakarta mail/activation module path by Maven coordinate rather than from libs/, so Dependabot can see them.
1 parent f096c18 commit e767010

4 files changed

Lines changed: 22 additions & 9 deletions

File tree

‎.github/dependabot.yml‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@
1717
# floor for the legacy Ant distributions), so a new major of the bnd builder,
1818
# Error Prone, or a mail API is a judgement call about supported Java versions
1919
# rather than something to merge on green CI. Raise those by hand.
20-
# * The jars pulled in with files()/fileTree() from test/libs and libs (mls, prov)
21-
# are invisible to Dependabot; they still have to be refreshed manually.
20+
# * Declare every external jar by coordinate, including module-path ones (see
21+
# jmail's jakartaModulePath): a jar pulled in with files()/fileTree() or named by
22+
# path is invisible to Dependabot. The Gradle build no longer reads libs/ or
23+
# test/libs (only the legacy Ant-side scripts do).
2224

2325
version: 2
2426
updates:

‎jmail/build.gradle‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,23 @@ sourceSets {
2020

2121
}
2222

23+
configurations {
24+
jakartaModulePath {
25+
transitive = false
26+
}
27+
}
28+
2329
dependencies {
2430
implementation project(':prov')
2531
implementation project(':util')
2632
implementation project(':pkix')
2733

2834
implementation group: 'jakarta.mail', name: 'jakarta.mail-api', version: '2.0.1'
2935
implementation group: 'jakarta.activation', name: 'jakarta.activation-api', version: '2.0.0'
36+
// the same two as modules ("jakarta.mail", "jakarta.activation") for the module-info.java compile,
37+
// resolved by coordinate so the path follows a version bump rather than naming a file under libs/.
38+
jakartaModulePath group: 'jakarta.mail', name: 'jakarta.mail-api', version: '2.0.1'
39+
jakartaModulePath group: 'jakarta.activation', name: 'jakarta.activation-api', version: '2.0.0'
3040

3141
java9Implementation files(sourceSets.main.output.classesDirs) {
3242
builtBy compileJava
@@ -63,7 +73,7 @@ compileJava9Java {
6373
def pkix_jar="${project(":pkix").jar.outputs.files.getFiles().getAt(0)}"
6474

6575
options.compilerArgs += [
66-
'--module-path', "$prov_jar${File.pathSeparator}$util_jar${File.pathSeparator}$pkix_jar${File.pathSeparator}${rootProject.projectDir}/libs/jakarta.mail-2.0.1.jar${File.pathSeparator}${rootProject.projectDir}/libs/jakarta.activation-api-2.0.0.jar"
76+
'--module-path', "$prov_jar${File.pathSeparator}$util_jar${File.pathSeparator}$pkix_jar${File.pathSeparator}${configurations.jakartaModulePath.asPath}"
6777
]
6878
options.sourcepath = files(['build/src/main/java', 'src/main/jdk1.9'])
6979
options.compilerArgs << '-implicit:none' // avoid recompiling every baseline class implicitly loaded via sourcepath

‎prov/build.gradle‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
dependencies {
66
implementation project(':core')
77
testImplementation project(':core')
8-
testImplementation files('../libs/unboundid-ldapsdk-6.0.8.jar')
8+
testImplementation group: 'com.unboundid', name: 'unboundid-ldapsdk', version: '6.0.8'
99
}
1010

1111
evaluationDependsOn(":core")
@@ -331,10 +331,10 @@ dependencies {
331331
test15Implementation group: 'junit', name: 'junit', version: '4.13.2'
332332
test17Implementation group: 'junit', name: 'junit', version: '4.13.2'
333333
test25Implementation group: 'junit', name: 'junit', version: '4.13.2'
334-
test11Implementation files('../libs/unboundid-ldapsdk-6.0.8.jar')
335-
test15Implementation files('../libs/unboundid-ldapsdk-6.0.8.jar')
336-
test17Implementation files('../libs/unboundid-ldapsdk-6.0.8.jar')
337-
test25Implementation files('../libs/unboundid-ldapsdk-6.0.8.jar')
334+
test11Implementation group: 'com.unboundid', name: 'unboundid-ldapsdk', version: '6.0.8'
335+
test15Implementation group: 'com.unboundid', name: 'unboundid-ldapsdk', version: '6.0.8'
336+
test17Implementation group: 'com.unboundid', name: 'unboundid-ldapsdk', version: '6.0.8'
337+
test25Implementation group: 'com.unboundid', name: 'unboundid-ldapsdk', version: '6.0.8'
338338
test11Implementation(project(":core"))
339339
test15Implementation(project(":core"))
340340
test17Implementation(project(":core"))

‎test/build.gradle‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
dependencies {
2-
implementation fileTree(dir: 'libs', include: '*.jar')
2+
implementation group: 'net.java.dev.jna', name: 'jna', version: '4.3.0'
3+
implementation group: 'net.java.dev.jna', name: 'jna-platform', version: '4.3.0'
34
implementation project(":core")
45
// implementation project(":mail")
56
implementation project(":pg")

0 commit comments

Comments
 (0)