-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add reflection metadata for Flyway 10.20.0 (#531)
- Loading branch information
1 parent
d72c891
commit fe9ad03
Showing
18 changed files
with
432 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[ | ||
"reflect-config.json", | ||
"resource-config.json" | ||
] |
197 changes: 197 additions & 0 deletions
197
metadata/org.flywaydb/flyway-core/10.20.0/reflect-config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,197 @@ | ||
[ | ||
{ | ||
"name": "org.flywaydb.core.api.migration.baseline.BaselineMigrationConfigurationExtension", | ||
"condition": { | ||
"typeReachable": "org.flywaydb.core.api.configuration.ClassicConfiguration" | ||
}, | ||
"allDeclaredFields": true | ||
}, | ||
{ | ||
"name": "org.flywaydb.core.api.migration.baseline.BaselineMigrationConfigurationExtension", | ||
"queryAllDeclaredMethods": true, | ||
"condition": { | ||
"typeReachable": "org.flywaydb.core.extensibility.ConfigurationExtension" | ||
}, | ||
"allDeclaredFields": true, | ||
"queryAllDeclaredConstructors": true, | ||
"methods": [ | ||
{ | ||
"name": "<init>", | ||
"parameterTypes": [ | ||
] | ||
}, | ||
{ | ||
"name": "getBaselineMigrationPrefix", | ||
"parameterTypes": [ | ||
] | ||
}, | ||
{ | ||
"name": "setBaselineMigrationPrefix", | ||
"parameterTypes": [ | ||
"java.lang.String" | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "org.flywaydb.core.extensibility.ConfigurationExtension", | ||
"queryAllDeclaredMethods": true, | ||
"condition": { | ||
"typeReachable": "org.flywaydb.core.extensibility.ConfigurationExtension" | ||
} | ||
}, | ||
{ | ||
"name": "org.flywaydb.core.extensibility.Plugin", | ||
"queryAllDeclaredMethods": true, | ||
"condition": { | ||
"typeReachable": "org.flywaydb.core.extensibility.ConfigurationExtension" | ||
} | ||
}, | ||
{ | ||
"name": "org.flywaydb.core.internal.command.clean.CleanModeConfigurationExtension", | ||
"queryAllDeclaredMethods": true, | ||
"condition": { | ||
"typeReachable": "org.flywaydb.core.extensibility.ConfigurationExtension" | ||
}, | ||
"allDeclaredFields": true, | ||
"queryAllDeclaredConstructors": true, | ||
"methods": [ | ||
{ | ||
"name": "<init>", | ||
"parameterTypes": [ | ||
] | ||
}, | ||
{ | ||
"name": "getClean", | ||
"parameterTypes": [ | ||
] | ||
}, | ||
{ | ||
"name": "setClean", | ||
"parameterTypes": [ | ||
"org.flywaydb.core.internal.command.clean.CleanModel" | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "org.flywaydb.core.internal.command.clean.CleanModel", | ||
"queryAllDeclaredMethods": true, | ||
"condition": { | ||
"typeReachable": "org.flywaydb.core.extensibility.ConfigurationExtension" | ||
}, | ||
"allDeclaredFields": true, | ||
"queryAllDeclaredConstructors": true | ||
}, | ||
{ | ||
"name": "org.flywaydb.core.internal.command.clean.SchemaModel", | ||
"queryAllDeclaredMethods": true, | ||
"condition": { | ||
"typeReachable": "org.flywaydb.core.extensibility.ConfigurationExtension" | ||
}, | ||
"allDeclaredFields": true, | ||
"queryAllDeclaredConstructors": true | ||
}, | ||
{ | ||
"name": "org.flywaydb.core.internal.configuration.extensions.DeployScriptFilenameConfigurationExtension", | ||
"queryAllDeclaredMethods": true, | ||
"condition": { | ||
"typeReachable": "org.flywaydb.core.extensibility.ConfigurationExtension" | ||
}, | ||
"allDeclaredFields": true, | ||
"queryAllDeclaredConstructors": true, | ||
"methods": [ | ||
{ | ||
"name": "<init>", | ||
"parameterTypes": [ | ||
] | ||
}, | ||
{ | ||
"name": "getScriptFilename", | ||
"parameterTypes": [ | ||
] | ||
}, | ||
{ | ||
"name": "setScriptFilename", | ||
"parameterTypes": [ | ||
"java.lang.String" | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "org.flywaydb.core.internal.configuration.extensions.PrepareScriptFilenameConfigurationExtension", | ||
"queryAllDeclaredMethods": true, | ||
"condition": { | ||
"typeReachable": "org.flywaydb.core.extensibility.ConfigurationExtension" | ||
}, | ||
"allDeclaredFields": true, | ||
"queryAllDeclaredConstructors": true, | ||
"methods": [ | ||
{ | ||
"name": "<init>", | ||
"parameterTypes": [ | ||
] | ||
}, | ||
{ | ||
"name": "getScriptFilename", | ||
"parameterTypes": [ | ||
] | ||
}, | ||
{ | ||
"name": "setScriptFilename", | ||
"parameterTypes": [ | ||
"java.lang.String" | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "org.flywaydb.core.internal.proprietaryStubs.LicensingConfigurationExtensionStub", | ||
"condition": { | ||
"typeReachable": "org.flywaydb.core.api.configuration.ClassicConfiguration" | ||
}, | ||
"allDeclaredFields": true | ||
}, | ||
{ | ||
"name": "org.flywaydb.core.internal.proprietaryStubs.PATTokenConfigurationExtensionStub", | ||
"condition": { | ||
"typeReachable": "org.flywaydb.core.api.configuration.ClassicConfiguration" | ||
}, | ||
"allDeclaredFields": true | ||
}, | ||
{ | ||
"name": "org.flywaydb.core.internal.publishing.PublishingConfigurationExtension", | ||
"condition": { | ||
"typeReachable": "org.flywaydb.core.api.configuration.ClassicConfiguration" | ||
}, | ||
"allDeclaredFields": true | ||
}, | ||
{ | ||
"name": "org.flywaydb.core.internal.publishing.PublishingConfigurationExtension", | ||
"queryAllDeclaredMethods": true, | ||
"condition": { | ||
"typeReachable": "org.flywaydb.core.extensibility.ConfigurationExtension" | ||
}, | ||
"allDeclaredFields": true, | ||
"queryAllDeclaredConstructors": true, | ||
"methods": [ | ||
{ | ||
"name": "<init>", | ||
"parameterTypes": [ | ||
] | ||
}, | ||
{ | ||
"name": "isPublishResult", | ||
"parameterTypes": [ | ||
] | ||
}, | ||
{ | ||
"name": "setPublishResult", | ||
"parameterTypes": [ | ||
"boolean" | ||
] | ||
} | ||
] | ||
} | ||
] |
14 changes: 14 additions & 0 deletions
14
metadata/org.flywaydb/flyway-core/10.20.0/resource-config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"resources": { | ||
"includes": [ | ||
{ | ||
"pattern": "\\Qorg/flywaydb/core/internal/version.txt\\E", | ||
"condition": { | ||
"typeReachable": "org.flywaydb.core.internal.license.VersionPrinter" | ||
} | ||
} | ||
] | ||
}, | ||
"bundles": [ | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
gradlew.bat | ||
gradlew | ||
gradle/ | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
The metadata has been generated by executing the following script: | ||
|
||
```bash | ||
./generate-metadata.sh | ||
``` | ||
|
||
The generated metadata can be found in the `build/native/agent-output/test` directory. | ||
|
||
Afterwards, the generated metadata has been cleaned: | ||
- Remove path to test resources | ||
- Remove `META-INF/services` entries | ||
- Remove H2 references |
10 changes: 10 additions & 0 deletions
10
tests/src/org.flywaydb/flyway-core/10.20.0/access-filter.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"rules": [ | ||
{ | ||
"excludeClasses": ".**" | ||
}, | ||
{ | ||
"includeClasses": "org.flywaydb.core.**" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright and related rights waived via CC0 | ||
* | ||
* You should have received a copy of the CC0 legalcode along with this | ||
* work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. | ||
*/ | ||
plugins { | ||
id "org.graalvm.internal.tck" | ||
} | ||
|
||
String libraryVersion = tck.testedLibraryVersion.get() | ||
|
||
dependencies { | ||
testImplementation "org.flywaydb:flyway-core:$libraryVersion" | ||
testImplementation 'com.h2database:h2:2.1.210' | ||
testImplementation 'org.assertj:assertj-core:3.22.0' | ||
testImplementation 'org.awaitility:awaitility:4.2.0' | ||
} | ||
|
||
graalvmNative { | ||
binaries { | ||
test { | ||
buildArgs.add('--no-fallback') | ||
} | ||
} | ||
agent { | ||
defaultMode = "conditional" | ||
modes { | ||
conditional { | ||
userCodeFilterPath = "user-code-filter.json" | ||
} | ||
} | ||
accessFilterFiles.from("access-filter.json") | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
tests/src/org.flywaydb/flyway-core/10.20.0/generate-metadata.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
./gradlew clean | ||
./gradlew test --tests "flyway.FlywayTests" -Pagent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
library.version=10.20.0 | ||
metadata.dir=org.flywaydb/flyway-core/10.20.0/ |
13 changes: 13 additions & 0 deletions
13
tests/src/org.flywaydb/flyway-core/10.20.0/settings.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
pluginManagement { | ||
def tckPath = Objects.requireNonNullElse( | ||
System.getenv("GVM_TCK_TCKDIR"), | ||
"../../../../tck-build-logic" | ||
) | ||
includeBuild(tckPath) | ||
} | ||
|
||
plugins { | ||
id "org.graalvm.internal.tck-settings" version "1.0.0-SNAPSHOT" | ||
} | ||
|
||
rootProject.name = 'flyway-core-tests' |
47 changes: 47 additions & 0 deletions
47
tests/src/org.flywaydb/flyway-core/10.20.0/src/test/java/flyway/FixedResourceProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Copyright and related rights waived via CC0 | ||
* | ||
* You should have received a copy of the CC0 legalcode along with this | ||
* work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. | ||
*/ | ||
package flyway; | ||
|
||
import java.nio.charset.StandardCharsets; | ||
import java.util.Collection; | ||
import java.util.Collections; | ||
import java.util.HashSet; | ||
import java.util.Set; | ||
import java.util.stream.Collectors; | ||
|
||
import org.flywaydb.core.api.ResourceProvider; | ||
import org.flywaydb.core.api.resource.LoadableResource; | ||
import org.flywaydb.core.internal.resource.classpath.ClassPathResource; | ||
|
||
/** | ||
* This is needed as GraalVM doesn't support enumerating resources. It uses a hardcoded list of migrations. | ||
*/ | ||
class FixedResourceProvider implements ResourceProvider { | ||
private static final Set<String> MIGRATIONS; | ||
|
||
static { | ||
Set<String> migrations = new HashSet<>(); | ||
migrations.add("db/migration/V1__create_table.sql"); | ||
migrations.add("db/migration/V2__alter_table.sql"); | ||
MIGRATIONS = Collections.unmodifiableSet(migrations); | ||
} | ||
|
||
@Override | ||
public LoadableResource getResource(String name) { | ||
if (!MIGRATIONS.contains(name)) { | ||
return null; | ||
} | ||
return new ClassPathResource(null, name, getClass().getClassLoader(), StandardCharsets.UTF_8); | ||
} | ||
|
||
@Override | ||
public Collection<LoadableResource> getResources(String prefix, String[] suffixes) { | ||
return MIGRATIONS.stream() | ||
.map(file -> new ClassPathResource(null, file, getClass().getClassLoader(), StandardCharsets.UTF_8)) | ||
.collect(Collectors.toList()); | ||
} | ||
} |
Oops, something went wrong.