Skip to content

Commit d72c891

Browse files
authored
Add metadata for flyway-core 10.15 (#519)
1 parent 736dbe6 commit d72c891

File tree

14 files changed

+252
-0
lines changed

14 files changed

+252
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[
2+
"reflect-config.json",
3+
"resource-config.json"
4+
]
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
[
2+
{
3+
"name": "org.flywaydb.core.api.migration.baseline.BaselineMigrationConfigurationExtension",
4+
"condition": {
5+
"typeReachable": "org.flywaydb.core.internal.plugin.PluginRegister"
6+
},
7+
"allPublicConstructors": true,
8+
"allPublicMethods": true
9+
},
10+
{
11+
"name": "org.flywaydb.core.extensibility.ConfigurationExtension",
12+
"condition": {
13+
"typeReachable": "org.flywaydb.core.internal.plugin.PluginRegister"
14+
},
15+
"allPublicMethods": true
16+
},
17+
{
18+
"name": "org.flywaydb.core.extensibility.Plugin",
19+
"condition": {
20+
"typeReachable": "org.flywaydb.core.internal.plugin.PluginRegister"
21+
},
22+
"allPublicMethods": true
23+
},
24+
{
25+
"name": "org.flywaydb.core.internal.command.clean.CleanModeConfigurationExtension",
26+
"condition": {
27+
"typeReachable": "org.flywaydb.core.internal.plugin.PluginRegister"
28+
},
29+
"allPublicConstructors": true,
30+
"allPublicMethods": true
31+
},
32+
{
33+
"name": "org.flywaydb.core.internal.logging.slf4j.Slf4jLogCreator",
34+
"condition": {
35+
"typeReachable": "org.slf4j.Logger"
36+
},
37+
"allPublicConstructors": true
38+
},
39+
{
40+
"name": "org.flywaydb.core.internal.logging.log4j2.Log4j2LogCreator",
41+
"condition": {
42+
"typeReachable": "org.apache.logging.log4j.Logger"
43+
},
44+
"allPublicConstructors": true
45+
},
46+
{
47+
"name": "org.flywaydb.core.internal.logging.apachecommons.ApacheCommonsLogCreator",
48+
"condition": {
49+
"typeReachable": "org.apache.commons.logging.Log"
50+
},
51+
"allPublicConstructors": true
52+
},
53+
{
54+
"name": "org.flywaydb.core.internal.publishing.PublishingConfigurationExtension",
55+
"condition": {
56+
"typeReachable": "org.flywaydb.core.internal.plugin.PluginRegister"
57+
},
58+
"allPublicMethods": true
59+
},
60+
{
61+
"name": "sun.security.provider.SHA2$SHA256",
62+
"condition": {
63+
"typeReachable": "org.flywaydb.core.internal.jdbc.JdbcUtils"
64+
},
65+
"methods": [
66+
{
67+
"name": "<init>",
68+
"parameterTypes": []
69+
}
70+
]
71+
}
72+
]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"bundles": [],
3+
"resources": {
4+
"includes": [
5+
{
6+
"condition": {
7+
"typeReachable": "org.flywaydb.core.internal.license.VersionPrinter"
8+
},
9+
"pattern": "\\Qorg/flywaydb/core/internal/version.txt\\E"
10+
}
11+
]
12+
}
13+
}

metadata/org.flywaydb/flyway-core/index.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
[
22
{
33
"latest": true,
4+
"metadata-version": "10.15.0",
5+
"module": "org.flywaydb:flyway-core",
6+
"tested-versions": [
7+
"10.15.0"
8+
]
9+
},
10+
{
411
"metadata-version": "10.10.0",
512
"module": "org.flywaydb:flyway-core",
613
"tested-versions": [

tests/src/index.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,12 @@
406406
"name" : "org.flywaydb:flyway-core",
407407
"versions" : [ "10.10.0" ]
408408
} ]
409+
}, {
410+
"test-project-path" : "org.flywaydb/flyway-core/10.15.0",
411+
"libraries" : [ {
412+
"name" : "org.flywaydb:flyway-core",
413+
"versions" : [ "10.15.0" ]
414+
} ]
409415
}, {
410416
"test-project-path" : "org.flywaydb/flyway-core/9.0.1",
411417
"libraries" : [ {
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
gradlew.bat
2+
gradlew
3+
gradle/
4+
build/
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Copyright and related rights waived via CC0
3+
*
4+
* You should have received a copy of the CC0 legalcode along with this
5+
* work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
6+
*/
7+
plugins {
8+
id "org.graalvm.internal.tck"
9+
}
10+
11+
String libraryVersion = tck.testedLibraryVersion.get()
12+
13+
dependencies {
14+
testImplementation "org.flywaydb:flyway-core:$libraryVersion"
15+
testImplementation 'com.h2database:h2:2.1.210'
16+
testImplementation 'org.assertj:assertj-core:3.22.0'
17+
testImplementation 'org.awaitility:awaitility:4.2.0'
18+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
library.version = 10.15.0
2+
metadata.dir = org.flywaydb/flyway-core/10.15.0/
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
pluginManagement {
2+
def tckPath = Objects.requireNonNullElse(
3+
System.getenv("GVM_TCK_TCKDIR"),
4+
"../../../../tck-build-logic"
5+
)
6+
includeBuild(tckPath)
7+
}
8+
9+
plugins {
10+
id "org.graalvm.internal.tck-settings" version "1.0.0-SNAPSHOT"
11+
}
12+
13+
rootProject.name = 'org.flywaydb.flyway-core_tests'
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*
2+
* Copyright and related rights waived via CC0
3+
*
4+
* You should have received a copy of the CC0 legalcode along with this
5+
* work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
6+
*/
7+
package org_flywaydb.flyway_core;
8+
9+
import org.flywaydb.core.api.ResourceProvider;
10+
import org.flywaydb.core.api.resource.LoadableResource;
11+
import org.flywaydb.core.internal.resource.classpath.ClassPathResource;
12+
13+
import java.nio.charset.StandardCharsets;
14+
import java.util.Collection;
15+
import java.util.Collections;
16+
import java.util.HashSet;
17+
import java.util.Set;
18+
import java.util.stream.Collectors;
19+
20+
/**
21+
* This is needed as GraalVM doesn't support enumerating resources. It uses a hardcoded list of migrations.
22+
*/
23+
class FixedResourceProvider implements ResourceProvider {
24+
private static final Set<String> MIGRATIONS;
25+
26+
static {
27+
Set<String> migrations = new HashSet<>();
28+
migrations.add("db/migration/V1__create_table.sql");
29+
migrations.add("db/migration/V2__alter_table.sql");
30+
MIGRATIONS = Collections.unmodifiableSet(migrations);
31+
}
32+
33+
@Override
34+
public LoadableResource getResource(String name) {
35+
if (!MIGRATIONS.contains(name)) {
36+
return null;
37+
}
38+
return new ClassPathResource(null, name, getClass().getClassLoader(), StandardCharsets.UTF_8);
39+
}
40+
41+
@Override
42+
public Collection<LoadableResource> getResources(String prefix, String[] suffixes) {
43+
return MIGRATIONS.stream()
44+
.map(file -> new ClassPathResource(null, file, getClass().getClassLoader(), StandardCharsets.UTF_8))
45+
.collect(Collectors.toList());
46+
}
47+
}

0 commit comments

Comments
 (0)