Skip to content

Commit 0e6e917

Browse files
dnestorogradinac
authored andcommitted
Add the feature for checking whether entry belongs to config or not
1 parent 0dd032e commit 0e6e917

File tree

9 files changed

+1221
-808
lines changed

9 files changed

+1221
-808
lines changed

CONTRIBUTING.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,18 @@ Every metadata has an entry in the `metadata/index.json`. For example:
5959
"module": "org.example:dependant-library",
6060
"requires": [
6161
"org.example:library"
62-
]
62+
],
63+
"allowed-packages": [
64+
"org.package.name"
65+
]
6366
}
6467
]
6568
```
6669

67-
Note that `dependant-library` can feature its own metadata as well if `directory` key is specified.
70+
**Note:** `dependant-library` can feature its own metadata as well if `directory` key is specified.
71+
72+
**Note:** `allowed-packages` describes which packages are expected to contain metadata entries. This way you can prevent metadata from other libraries to be
73+
pulled into your config files
6874

6975
Every library metadata has another `index.json` file.
7076
In aforementioned case that would be `metadata/org.example/library/index.json`.

metadata/com.sun.mail/jakarta.mail/2.0.1/reflect-config.json

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,6 @@
2727
"allDeclaredConstructors": true,
2828
"name": "com.sun.mail.handlers.message_rfc822"
2929
},
30-
{
31-
"condition": {
32-
"typeReachable": "jakarta.activation.MailcapCommandMap"
33-
},
34-
"allDeclaredConstructors": true,
35-
"name": "com.sun.mail.handlers.message_rfc822"
36-
},
3730
{
3831
"condition": {
3932
"typeReachable": "jakarta.activation.MailcapCommandMap"

metadata/com.sun.mail/jakarta.mail/2.0.1/resource-config.json

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,41 @@
1-
21
{
32
"resources": {
43
"includes": [
54
{
6-
"pattern": "\\QMETA-INF/hk2-locator/default\\E"
5+
"pattern": "\\QMETA-INF/hk2-locator/default\\E",
6+
"condition": {
7+
"typeReachable": "jakarta.mail.Session"
8+
}
79
},
810
{
9-
"pattern": "\\QMETA-INF/gfprobe-provider.xml\\E"
11+
"pattern": "\\QMETA-INF/gfprobe-provider.xml\\E",
12+
"condition": {
13+
"typeReachable": "jakarta.mail.Session"
14+
}
1015
},
1116
{
12-
"pattern": "\\QMETA-INF/javamail.charset.map\\E"
17+
"pattern": "\\QMETA-INF/javamail.charset.map\\E",
18+
"condition": {
19+
"typeReachable": "jakarta.mail.Session"
20+
}
1321
},
1422
{
15-
"pattern": "\\QMETA-INF/javamail.default.address.map\\E"
23+
"pattern": "\\QMETA-INF/javamail.default.address.map\\E",
24+
"condition": {
25+
"typeReachable": "jakarta.mail.Session"
26+
}
1627
},
1728
{
18-
"pattern": "\\QMETA-INF/javamail.default.providers\\E"
29+
"pattern": "\\QMETA-INF/javamail.default.providers\\E",
30+
"condition": {
31+
"typeReachable": "jakarta.mail.Session"
32+
}
1933
},
2034
{
21-
"pattern": "\\QMETA-INF/mailcap\\E"
35+
"pattern": "\\QMETA-INF/mailcap\\E",
36+
"condition": {
37+
"typeReachable": "jakarta.mail.Session"
38+
}
2239
}
2340
]
2441
}

metadata/com.zaxxer/HikariCP/5.0.1/jni-config.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
[
22
{
3+
"condition": {
4+
"typeReachable": "java.lang.ClassLoader"
5+
},
36
"name": "java.lang.ClassLoader",
47
"methods": [
58
{
@@ -15,6 +18,9 @@
1518
]
1619
},
1720
{
21+
"condition": {
22+
"typeReachable": "jdk.internal.loader.ClassLoaders"
23+
},
1824
"name": "jdk.internal.loader.ClassLoaders$PlatformClassLoader"
1925
}
2026
]

0 commit comments

Comments
 (0)