Skip to content

Commit

Permalink
update: dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
cssxsh committed Apr 17, 2024
1 parent 1ff35c9 commit 7e78dad
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ jobs:
sc start MySQL
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup JDK 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '11'
Expand Down Expand Up @@ -120,10 +120,10 @@ jobs:
brew services restart mysql -v
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup JDK 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '11'
Expand Down Expand Up @@ -179,10 +179,10 @@ jobs:
mysqladmin -u root -proot create mirai
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup JDK 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '11'
Expand Down Expand Up @@ -216,10 +216,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup JDK 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '11'
Expand All @@ -231,7 +231,7 @@ jobs:
run: ./gradlew buildPlugin

- name: Upload
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: build-${{ github.run_id }}
path: build/mirai/*
8 changes: 4 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ repositories {
dependencies {
api("com.zaxxer:HikariCP:5.1.0")
api("com.h2database:h2:2.2.224")
api("org.xerial:sqlite-jdbc:3.45.1.0")
api("org.xerial:sqlite-jdbc:3.45.3.0")
api("com.mysql:mysql-connector-j:8.3.0")
api("org.mariadb.jdbc:mariadb-java-client:3.3.3")
api("org.postgresql:postgresql:42.7.2")
api("org.postgresql:postgresql:42.7.3")
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.6.1.jre11")
testImplementation("com.microsoft.sqlserver:mssql-jdbc:12.7.0")
//
implementation(platform("net.mamoe:mirai-bom:2.16.0"))
compileOnly("net.mamoe:mirai-core")
Expand All @@ -51,7 +51,7 @@ dependencies {
api("org.hibernate.orm:hibernate-hikaricp")
api("org.hibernate.orm:hibernate-community-dialects")
//
implementation(platform("org.slf4j:slf4j-parent:2.0.12"))
implementation(platform("org.slf4j:slf4j-parent:2.0.13"))
testImplementation("org.slf4j:slf4j-simple")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,16 @@ public fun dialects(): Set<Class<out Dialect>> {

/**
* 获取 MSSQL 驱动 artifact id
*
* version by Property xyz.cssxsh.mirai.hibernate.mssql.version
*/
@PublishedApi
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.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"
java.startsWith("17") -> "com.microsoft.sqlserver:mssql-jdbc:12.7.0.jre11-preview"
java.startsWith("11") -> "com.microsoft.sqlserver:mssql-jdbc:12.7.0.jre11-preview"
java.startsWith("8") -> "com.microsoft.sqlserver:mssql-jdbc:12.7.0.jre8-preview"
else -> "com.microsoft.sqlserver:mssql-jdbc:12.7.0"
}
}

Expand Down

0 comments on commit 7e78dad

Please sign in to comment.