Hello! I use hibernate for my plugins as well. Very useful tool. I use maven but this should work. Do note, you need drivers to connect to the database. The drivers help make queries based on database type.
Code:
dependencies {
implementation "org.hibernate.orm:hibernate-core:6.2.3.Final" //Hibernate
implementation "com.h2database:h2:2.1.214" //H2 driver
implementation "com.mysql:mysql-connector-j:8.0.33" //MySQL Driver
implementation "org.postgresql:postgresql:42.6.0" //PostGres Driver
}
shadowJar {
archiveFileName = "MyPlugin-${version}.jar"
}
I use Libby to externally download libraries based on Server type (Spigot/Paper) to help keep my Jar size low. Additionally, I recommend looking at Cloud Command Framework, InvUI by xenondevs, Aikar's TaskChain, and carleslc Simple-YAML libraries for examples and/or usage in your plugin development.
https://github.com/AlessioDP/libby
https://github.com/NichtStudioCode/InvUI
https://github.com/aikar/TaskChain
https://github.com/Carleslc/Simple-YAML