mamoe / mirai-console

mirai 的高效率 QQ 机器人控制台
GNU Affero General Public License v3.0
1.19k stars 412 forks source link

插件如何依赖第三方jar #364

Closed ShaoLongFei closed 2 years ago

ShaoLongFei commented 3 years ago

我有一些第三方的 jar 需要依赖,我尝试使用 buildPlugin、shadowJar 等多种方式打 jar 皆未成功,有没有好一点的方式?

Karlatemp commented 3 years ago

Paste content of your build.gradle(.kts) here

ShaoLongFei commented 3 years ago

plugins { id 'org.jetbrains.kotlin.jvm' version '1.4.30' id 'org.jetbrains.kotlin.plugin.serialization' version '1.4.30' id 'net.mamoe.mirai-console' version '2.6.5' }

group = 'com.liuyue' version = '1.0'

repositories { maven { url 'https://maven.aliyun.com/repository/public' } mavenCentral() }

dependencies { compile files('libs/sqlite-jdbc-3.7.2.jar') }

cssxsh commented 2 years ago

compile filescompile 改为 implementation, 还有就是为啥使用引用Jar文件的方式引用库?而不是 implementation 'org.xerial:sqlite-jdbc:${version}'