代码拉取完成,页面将自动刷新
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 = version.endsWith('SNAPSHOT')
? "https://oss.sonatype.org/content/repositories/snapshots"
: "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
// 认证用户和密码
credentials {
username = System.getenv('OSSRH_TOKEN_U') ?: ""
password = System.getenv('OSSRH_TOKEN_P') ?: ""
}
authentication {
basic(BasicAuthentication) // 必须明确声明认证类型
}
}
}
}
signing {
def signingKey = System.getenv('SIGNING_SECRETKEYRINGFILE')
def signingPassword = System.getenv('SIGNING_PASSWORD')
useInMemoryPgpKeys('31B3BE14', signingKey, signingPassword)
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。