加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.gradle 2.88 KB
一键复制 编辑 原始数据 按行查看 历史
小流氓 提交于 2024-05-30 22:56 . 调整测试用例
subprojects {
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'signing'
sourceCompatibility = 21
targetCompatibility = 21
group = 'xyz.noark'
version = '4.0.0-SNAPSHOT'
repositories {
maven { url 'https://maven.aliyun.com/nexus/content/groups/public' }
mavenCentral()
}
dependencies {
implementation group: 'javax.annotation', name: 'javax.annotation-api', version: '1.3.2'
implementation group: 'com.alibaba.fastjson2', name: 'fastjson2', version: '2.0.42'
testImplementation 'junit:junit:4.12'
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.0'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.9.0'
// jmh
testAnnotationProcessor "org.openjdk.jmh:jmh-generator-annprocess:1.36"
testImplementation 'org.openjdk.jmh:jmh-core:1.36'
}
jar {
manifest.attributes provider: '小流氓'
manifest.attributes["Created-By"] = "${System.getProperty("java.version")} (${System.getProperty("java.specification.vendor")})"
manifest.attributes["Implementation-Title"] = project.name
manifest.attributes["Implementation-Version"] = project.version
}
java {
// withJavadocJar()
withSourcesJar()
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
tasks.withType(Javadoc).configureEach {
options.encoding = 'UTF-8'
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId project.group
artifactId project.name
version project.version
from components.java
pom {
name = project.name
description = 'This is a game server framework.'
url = 'https://noark.xyz'
licenses {
license {
name = '木兰宽松许可证, 第1版'
url = 'http://license.coscl.org.cn/MulanPSL'
distribution = 'repo'
}
}
developers {
developer {
id = 'xiaoe'
name = '小流氓'
email = '176543888@qq.com'
}
}
scm {
connection = 'scm:git:git@gitee.com:xiaoe/noark3.git'
developerConnection = 'scm:git:git@gitee.com:xiaoe/noark3.git'
url = 'https://gitee.com/xiaoe/noark3/'
}
}
}
}
repositories {
maven {
//指定要上传的maven私服仓库
url = "http://192.168.0.235:8089/repository/maven-snapshots/"
allowInsecureProtocol = true
//认证用户和密码
credentials {
username 'admin'
password 'admin123'
}
}
}
}
ext."signing.keyId" = '15567893'
ext."signing.password" = System.getenv('SIGNING_PASSWORD')
ext."signing.secretKeyRingFile" = System.getenv('SIGNING_SECRETKEYRINGFILE')
signing {
sign publishing.publications.mavenJava
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化