加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.gradle 1.84 KB
一键复制 编辑 原始数据 按行查看 历史
AndreaFrederica 提交于 2023-09-30 16:25 . 构建版本修正
plugins {
id 'java'
}
group = 'cc.sirrus.andrea'
def plug_version = "Alpha_0.4"
version = plug_version
repositories {
mavenCentral()
maven {
name = 'spigotmc-repo'
url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
}
}
dependencies {
compileOnly 'org.bukkit:bukkit:1.15.2-R0.1-SNAPSHOT'
implementation 'cn.hutool:hutool-all:5.8.20'
// https://mvnrepository.com/artifact/org.smartboot.http/smart-http-server
implementation group: 'org.smartboot.http', name: 'smart-http-server', version: '1.2.4'
// https://mvnrepository.com/artifact/org.java-websocket/Java-WebSocket
implementation group: 'org.java-websocket', name: 'Java-WebSocket', version: '1.5.3'
}
def targetJavaVersion = 8
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
}
tasks.withType(JavaCompile).configureEach {
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
options.release = targetJavaVersion
}
}
processResources {
def props = [version: version]
inputs.properties props
filteringCharset 'UTF-8'
filesMatching('plugin.yml') {
expand props
}
}
jar {
archivesBaseName = 'AndreaWSIO_bukkit'//基本的文件名
archiveVersion = plug_version //版本
manifest { //配置jar文件的manifest
attributes(
"Manifest-Version": 1.0,
'Main-Class': 'cc.sirrus.andrea.andreawsio.AndreaWSIO' //指定main方法所在的文件
)
}
//打包依赖包
from {
(configurations.runtimeClasspath).collect {
it.isDirectory() ? it : zipTree(it)
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化