1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/zhangbinhub-acp

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
publishJar.gradle 2.9 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
zhangbinhub Отправлено 20.03.2025 18:04 27f1ad0
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'tech.yanand.maven-central-publish'
publishing {
publications {
maven(MavenPublication) {
//打包类型 war: components.web jar: components.java
from components.java
//指定group/artifact/version信息
groupId = project.group
artifactId = project.name
version = project.version
pom {
packaging = "jar"
name = "acp"
description = "Application Construction Platform 应用构建平台"
url = "https://gitee.com/zhangbinhub/acp"
licenses {
license {
name = "Apache License Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0"
}
}
developers {
developer {
id = "zhangbinhub"
name = "zhangbin"
email = "zhangbin1010@qq.com"
}
}
scm {
connection = "scm:git:https://gitee.com/zhangbinhub/acp.git"
developerConnection = "scm:git:https://gitee.com/zhangbinhub/acp.git"
url = "https://gitee.com/zhangbinhub/acp"
}
}
}
}
}
signing {
required = {
def file = new File("$rootDir${File.separator}gradle.properties")
if (file.exists()) {
def gradleProperties = new Properties()
gradleProperties.load(new FileInputStream(file))
if (!gradleProperties.getProperty('signing.keyId', '').isBlank()) {
return true
}
}
return false
}
sign publishing.publications.maven
}
mavenCentral {
def file = new File("$rootDir${File.separator}gradle.properties")
def name = ''
def pwd = ''
if (file.exists()) {
def gradleProperties = new Properties()
gradleProperties.load(new FileInputStream(file))
name = gradleProperties.containsKey('mavenUserName') ? "${mavenUserName}" : name
pwd = gradleProperties.containsKey('mavenUserName') ? "${mavenPassword}" : pwd
}
// Token for Publisher API calls obtained from Sonatype official,
// it should be Base64 encoded of "username:password".
authToken = Base64.encoder.encodeToString("$name:$pwd".bytes)
// Whether the upload should be automatically published or not. Use 'USER_MANAGED' if you wish to do this manually.
// This property is optional and defaults to 'AUTOMATIC'.
publishingType = 'AUTOMATIC'
// Max wait time for status API to get 'PUBLISHING' or 'PUBLISHED' status when the publishing type is 'AUTOMATIC',
// or additionally 'VALIDATED' when the publishing type is 'USER_MANAGED'.
// This property is optional and defaults to 60 seconds.
maxWait = 3600
}

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/zhangbinhub-acp.git
git@api.gitlife.ru:oschina-mirror/zhangbinhub-acp.git
oschina-mirror
zhangbinhub-acp
zhangbinhub-acp
master