Skip to content

Commit

Permalink
Add the feature for checking whether entry belongs to config or not
Browse files Browse the repository at this point in the history
  • Loading branch information
dnestoro authored and gradinac committed Apr 21, 2023
1 parent 0dd032e commit 0e6e917
Show file tree
Hide file tree
Showing 9 changed files with 1,221 additions and 808 deletions.
10 changes: 8 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,18 @@ Every metadata has an entry in the `metadata/index.json`. For example:
"module": "org.example:dependant-library",
"requires": [
"org.example:library"
]
],
"allowed-packages": [
"org.package.name"
]
}
]
```

Note that `dependant-library` can feature its own metadata as well if `directory` key is specified.
**Note:** `dependant-library` can feature its own metadata as well if `directory` key is specified.

**Note:** `allowed-packages` describes which packages are expected to contain metadata entries. This way you can prevent metadata from other libraries to be
pulled into your config files

Every library metadata has another `index.json` file.
In aforementioned case that would be `metadata/org.example/library/index.json`.
Expand Down
7 changes: 0 additions & 7 deletions metadata/com.sun.mail/jakarta.mail/2.0.1/reflect-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@
"allDeclaredConstructors": true,
"name": "com.sun.mail.handlers.message_rfc822"
},
{
"condition": {
"typeReachable": "jakarta.activation.MailcapCommandMap"
},
"allDeclaredConstructors": true,
"name": "com.sun.mail.handlers.message_rfc822"
},
{
"condition": {
"typeReachable": "jakarta.activation.MailcapCommandMap"
Expand Down
31 changes: 24 additions & 7 deletions metadata/com.sun.mail/jakarta.mail/2.0.1/resource-config.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,41 @@

{
"resources": {
"includes": [
{
"pattern": "\\QMETA-INF/hk2-locator/default\\E"
"pattern": "\\QMETA-INF/hk2-locator/default\\E",
"condition": {
"typeReachable": "jakarta.mail.Session"
}
},
{
"pattern": "\\QMETA-INF/gfprobe-provider.xml\\E"
"pattern": "\\QMETA-INF/gfprobe-provider.xml\\E",
"condition": {
"typeReachable": "jakarta.mail.Session"
}
},
{
"pattern": "\\QMETA-INF/javamail.charset.map\\E"
"pattern": "\\QMETA-INF/javamail.charset.map\\E",
"condition": {
"typeReachable": "jakarta.mail.Session"
}
},
{
"pattern": "\\QMETA-INF/javamail.default.address.map\\E"
"pattern": "\\QMETA-INF/javamail.default.address.map\\E",
"condition": {
"typeReachable": "jakarta.mail.Session"
}
},
{
"pattern": "\\QMETA-INF/javamail.default.providers\\E"
"pattern": "\\QMETA-INF/javamail.default.providers\\E",
"condition": {
"typeReachable": "jakarta.mail.Session"
}
},
{
"pattern": "\\QMETA-INF/mailcap\\E"
"pattern": "\\QMETA-INF/mailcap\\E",
"condition": {
"typeReachable": "jakarta.mail.Session"
}
}
]
}
Expand Down
6 changes: 6 additions & 0 deletions metadata/com.zaxxer/HikariCP/5.0.1/jni-config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
[
{
"condition": {
"typeReachable": "java.lang.ClassLoader"
},
"name": "java.lang.ClassLoader",
"methods": [
{
Expand All @@ -15,6 +18,9 @@
]
},
{
"condition": {
"typeReachable": "jdk.internal.loader.ClassLoaders"
},
"name": "jdk.internal.loader.ClassLoaders$PlatformClassLoader"
}
]
Loading

0 comments on commit 0e6e917

Please sign in to comment.