use jarJar to embed the JDBC driver
This does not cause conflicts with other mods that do the same and it reduces the dependency on the "jdbc mods" that are out there.
This commit is contained in:
parent
8869e26f48
commit
033c2b8348
|
|
@ -136,7 +136,6 @@ dependencies {
|
|||
// We add the full version to localRuntime, not runtimeOnly, so that we do not publish a dependency on it
|
||||
// modLocalRuntime "mezz.jei:jei-${mc_version}-neoforge:${jei_version}"
|
||||
compileOnly "curse.maven:curios-309927:5266541"
|
||||
runtimeOnly "curse.maven:MySQL-561280:4684944"
|
||||
compileOnly "curse.maven:sophisticated-backpacks-422301:6303388"
|
||||
compileOnly "curse.maven:sophisticated-core-618298:6317048"
|
||||
|
||||
|
|
@ -151,6 +150,11 @@ dependencies {
|
|||
// Example project dependency using a sister or child project:
|
||||
// modImplementation project(":myproject")
|
||||
|
||||
// embedd the JDBC driver in the mod using jarJar
|
||||
runtimeOnly "com.mysql:mysql-connector-j:${jdbc_version}"
|
||||
jarJar "com.mysql:mysql-connector-j:${jdbc_version}"
|
||||
additionalRuntimeClasspath "com.mysql:mysql-connector-j:${jdbc_version}"
|
||||
|
||||
// For more info:
|
||||
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
|
||||
// http://www.gradle.org/docs/current/userguide/dependency_management.html
|
||||
|
|
|
|||
|
|
@ -43,3 +43,7 @@ mod_group_id=vip.fubuki.playersync
|
|||
mod_authors=mlus
|
||||
# The description of the mod. This is a simple multiline text string that is used for display purposes in the mod list.
|
||||
mod_description=make multiserver players' data sync
|
||||
|
||||
# JDBC driver version
|
||||
# see https://dev.mysql.com/doc/relnotes/connector-j/en/ for latest version
|
||||
jdbc_version=9.3.0
|
||||
|
|
|
|||
|
|
@ -80,14 +80,6 @@ description='''${mod_description}'''
|
|||
ordering="NONE"
|
||||
side="BOTH"
|
||||
|
||||
# Dependency for MySQL
|
||||
[[dependencies.${mod_id}]]
|
||||
modId="mysql_jdbc"
|
||||
mandatory=true
|
||||
versionRange="[8.0.33+20230506,)"
|
||||
ordering="NONE"
|
||||
side="SERVER"
|
||||
|
||||
# Features are specific properties of the game environment, that you may want to declare you require. This example declares
|
||||
# that your mod requires GL version 3.2 or higher. Other features will be added. They are side aware so declaring this won't
|
||||
# stop your mod loading on the server for example.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user