Skip to content

Commit

Permalink
Add support for Hibernate Spatial
Browse files Browse the repository at this point in the history
Closes #233
  • Loading branch information
sdeleuze committed Jun 6, 2024
1 parent 8bd6b11 commit a0de763
Show file tree
Hide file tree
Showing 10 changed files with 94 additions and 0 deletions.
4 changes: 4 additions & 0 deletions metadata/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,10 @@
"allowed-packages" : [ "org.hibernate", "jakarta", "org.h2.Driver", "org.postgresql.Driver", "com.mysql.cj.jdbc.Driver", "org.hsqldb.jdbc.JDBCDriver", "com.microsoft.sqlserver.jdbc.SQLServerDriver", "oracle.jdbc.driver.OracleDriver", "org.mariadb.jdbc.Driver" ],
"directory" : "org.hibernate/hibernate-core",
"module" : "org.hibernate:hibernate-core"
}, {
"allowed-packages" : [ "org.hibernate" ],
"directory" : "org.hibernate/hibernate-spatial",
"module" : "org.hibernate:hibernate-spatial"
}, {
"allowed-packages" : [ "org.jboss" ],
"directory" : "org.jboss.logging/jboss-logging",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[
"reflect-config.json"
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[
{
"name": "org.hibernate.spatial.HSMessageLogger_$logger",
"condition": {
"typeReachable": "org.hibernate.spatial.integration.SpatialInitializer"
},
"methods": [
{
"name": "<init>",
"parameterTypes": [
"org.jboss.logging.Logger"
]
}
]
}
]
10 changes: 10 additions & 0 deletions metadata/org.hibernate/hibernate-spatial/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"latest": true,
"metadata-version": "6.5.0.Final",
"module": "org.hibernate:hibernate-spatial",
"tested-versions": [
"6.5.0.Final"
]
}
]
6 changes: 6 additions & 0 deletions tests/src/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,12 @@
"name" : "org.hibernate:hibernate-core",
"versions" : [ "5.6.14.Final" ]
} ]
}, {
"test-project-path" : "org.hibernate/hibernate-spatial/6.5.0.Final",
"libraries" : [ {
"name" : "org.hibernate:hibernate-spatial",
"versions" : [ "6.5.0.Final" ]
} ]
}, {
"test-project-path" : "org.jboss.logging/jboss-logging/3.5.0.Final",
"libraries" : [ {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
gradlew.bat
gradlew
gradle/
build/
17 changes: 17 additions & 0 deletions tests/src/org.hibernate/hibernate-spatial/6.5.0.Final/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* 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.hibernate:hibernate-spatial:$libraryVersion"
testImplementation 'org.assertj:assertj-core:3.22.0'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
library.version = 6.5.0.Final
metadata.dir = org.hibernate/hibernate-spatial/6.5.0.Final/
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 = 'org.hibernate.hibernate-spatial_tests'
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* 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 org_hibernate.hibernate_spatial;

import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
import org.hibernate.spatial.integration.SpatialInitializer;
import org.junit.jupiter.api.Test;

class HibernateSpatialTest {

@Test
void test() throws Exception {
new SpatialInitializer().contribute(new StandardServiceRegistryBuilder());
}
}

0 comments on commit a0de763

Please sign in to comment.