Skip to content

Commit

Permalink
update: dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
cssxsh committed Mar 8, 2024
1 parent 8f425db commit 1ff35c9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

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

* `com.mysql:mysql-connector-j:8.2.0` - [mysql.hibernate.properties](example/mysql.hibernate.properties)
* `org.mariadb.jdbc:mariadb-java-client:3.3.2` - [mariadb.hibernate.properties](example/mariadb.hibernate.properties)
* `org.xerial:sqlite-jdbc:3.44.1.0` - [sqlite.hibernate.properties](example/sqlite.hibernate.properties)
* `org.postgresql:postgresql:42.7.1` - [postgresql.hibernate.properties](example/postgresql.hibernate.properties)
* `com.mysql:mysql-connector-j:8.3.0` - [mysql.hibernate.properties](example/mysql.hibernate.properties)
* `org.mariadb.jdbc:mariadb-java-client:3.3.3` - [mariadb.hibernate.properties](example/mariadb.hibernate.properties)
* `org.xerial:sqlite-jdbc:3.45.1.0` - [sqlite.hibernate.properties](example/sqlite.hibernate.properties)
* `org.postgresql:postgresql:42.7.2` - [postgresql.hibernate.properties](example/postgresql.hibernate.properties)
* `com.h2database:h2:2.2.224` - [h2.hibernate.properties](example/h2.hibernate.properties)
* `com.microsoft.sqlserver:mssql-jdbc:12.4.2.jre11` - [sqlserver.hibernate.properties](example/sqlserver.hibernate.properties)
* `com.microsoft.sqlserver:mssql-jdbc:12.6.1.jre11` - [sqlserver.hibernate.properties](example/sqlserver.hibernate.properties)
* `com.zaxxer:HikariCP:5.0.1`

需要其他数据库驱动或连接池支持,请添加 `plugin-shared-libraries` 依赖,有2种方法
Expand Down
20 changes: 11 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
kotlin("plugin.serialization") version "1.8.22"

id("net.mamoe.mirai-console") version "2.16.0"
id("me.him188.maven-central-publish") version "1.0.0-dev-3"
id("me.him188.maven-central-publish") version "1.0.0"
}

group = "xyz.cssxsh.mirai"
Expand All @@ -27,19 +27,16 @@ repositories {
}

dependencies {
api("org.hibernate.orm:hibernate-core:6.4.2.Final")
api("org.hibernate.orm:hibernate-hikaricp:6.4.2.Final")
api("org.hibernate.orm:hibernate-community-dialects:6.4.2.Final")
api("com.zaxxer:HikariCP:5.1.0")
api("com.h2database:h2:2.2.224")
api("org.xerial:sqlite-jdbc:3.45.0.0")
api("org.xerial:sqlite-jdbc:3.45.1.0")
api("com.mysql:mysql-connector-j:8.3.0")
api("org.mariadb.jdbc:mariadb-java-client:3.3.2")
api("org.postgresql:postgresql:42.7.1")
api("org.mariadb.jdbc:mariadb-java-client:3.3.3")
api("org.postgresql:postgresql:42.7.2")
api("org.reflections:reflections:0.10.2")
compileOnly("xyz.cssxsh.mirai:mirai-administrator:1.4.0")
testImplementation(kotlin("test"))
testImplementation("com.microsoft.sqlserver:mssql-jdbc:12.4.2.jre11")
testImplementation("com.microsoft.sqlserver:mssql-jdbc:12.6.1.jre11")
//
implementation(platform("net.mamoe:mirai-bom:2.16.0"))
compileOnly("net.mamoe:mirai-core")
Expand All @@ -49,7 +46,12 @@ dependencies {
testImplementation("net.mamoe:mirai-core-utils")
testImplementation("net.mamoe:mirai-console-compiler-common")
//
implementation(platform("org.slf4j:slf4j-parent:2.0.11"))
implementation(platform("org.hibernate.orm:hibernate-platform:6.4.4.Final"))
api("org.hibernate.orm:hibernate-core")
api("org.hibernate.orm:hibernate-hikaricp")
api("org.hibernate.orm:hibernate-community-dialects")
//
implementation(platform("org.slf4j:slf4j-parent:2.0.12"))
testImplementation("org.slf4j:slf4j-simple")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ internal fun mssql(): String {
val java = System.getProperty("java.version")
// val version = System.getProperty("xyz.cssxsh.mirai.hibernate.mssql.version", "11.2.3")
return when {
java.startsWith("17") -> "com.microsoft.sqlserver:mssql-jdbc:12.4.2.jre11"
java.startsWith("11") -> "com.microsoft.sqlserver:mssql-jdbc:12.4.2.jre11"
java.startsWith("17") -> "com.microsoft.sqlserver:mssql-jdbc:12.6.1.jre11"
java.startsWith("11") -> "com.microsoft.sqlserver:mssql-jdbc:12.6.1.jre11"
else -> "com.microsoft.sqlserver:mssql-jdbc:12.4.2.jre8"
}
}
Expand Down

0 comments on commit 1ff35c9

Please sign in to comment.