Skip to content

Commit

Permalink
build: 2.6.0-RC
Browse files Browse the repository at this point in the history
  • Loading branch information
cssxsh committed Feb 4, 2023
1 parent 78cc0df commit 9f97cc4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,19 @@

本插件打包了以下版本的数据库驱动和连接池

* `mysql:mysql-connector-java:8.0.31` - [mysql](example/mysql.hibernate.properties)
* `com.mysql:mysql-connector-j:8.0.32` - [mysql](example/mysql.hibernate.properties)
* `org.xerial:sqlite-jdbc:3.40.0.0` - [sqlite](example/sqlite.hibernate.properties)
* `org.postgresql:postgresql:42.5.1` - [postgresql](example/postgresql.hibernate.properties)
* `com.h2database:h2:2.1.214` - [h2](example/h2.hibernate.properties)
* `com.microsoft.sqlserver:mssql-jdbc:11.2.3.jre11` - [sqlserver](example/sqlserver.hibernate.properties)
* `com.zaxxer:HikariCP:5.0.1`

需要其他数据库驱动或连接池支持,请添加 `plugin-shared-libraries` 依赖,有2种方法

1.**Jar包** 放到 `plugin-shared-libraries` 目录中一同被 `mirai-console` 加载

2.`plugin-shared-libraries/libraries.txt` 中添加 maven 引用,
例如 `com.microsoft.sqlserver:mssql-jdbc:11.2.1.jre11`
例如 `com.oracle.database.jdbc:ojdbc11:21.8.0.0`

## 在 Mirai Console Plugin 项目中引用

Expand Down
8 changes: 4 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
}

group = "xyz.cssxsh.mirai"
version = "2.5.3"
version = "2.6.0"

mavenCentralPublish {
useCentralS01()
Expand All @@ -32,13 +32,13 @@ dependencies {
api("org.hibernate.orm:hibernate-community-dialects:6.1.6.Final")
api("com.zaxxer:HikariCP:5.0.1")
api("com.h2database:h2:2.1.214")
api("org.xerial:sqlite-jdbc:3.40.0.0")
api("org.xerial:sqlite-jdbc:3.40.1.0")
api("com.mysql:mysql-connector-j:8.0.32")
api("org.postgresql:postgresql:42.5.1")
api("org.postgresql:postgresql:42.5.3")
api("org.reflections:reflections:0.10.2")
compileOnly("xyz.cssxsh.mirai:mirai-administrator:1.3.0")
testImplementation(kotlin("test"))
testImplementation("com.microsoft.sqlserver:mssql-jdbc:11.2.3.jre11")
testImplementation("com.microsoft.sqlserver:mssql-jdbc:12.2.0.jre11")
//
implementation(platform("net.mamoe:mirai-bom:2.14.0-RC"))
compileOnly("net.mamoe:mirai-core")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ internal object MiraiHibernatePlugin : KotlinPlugin(
JvmPluginDescription(
id = "xyz.cssxsh.mirai.plugin.mirai-hibernate-plugin",
name = "mirai-hibernate-plugin",
version = "2.5.3",
version = "2.6.0",
) {
author("cssxsh")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public fun dialects(): Set<Class<out Dialect>> {
@PublishedApi
internal fun mssql(): String {
val java = System.getProperty("java.version")
val version = System.getProperty("xyz.cssxsh.mirai.hibernate.mssql.version", "11.2.3")
val version = System.getProperty("xyz.cssxsh.mirai.hibernate.mssql.version", "12.2.0")
return when {
java.startsWith("17") -> "com.microsoft.sqlserver:mssql-jdbc:${version}.jre17"
java.startsWith("11") -> "com.microsoft.sqlserver:mssql-jdbc:${version}.jre11"
Expand Down

0 comments on commit 9f97cc4

Please sign in to comment.