更新版本并且提交 OSSRH 的仓库上传配置
This commit is contained in:
parent
5f87958746
commit
3a62b7cbf0
63
build.gradle
63
build.gradle
|
@ -1,11 +1,14 @@
|
||||||
plugins {
|
plugins {
|
||||||
id 'distribution'
|
id 'distribution'
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
|
id 'maven'
|
||||||
|
id 'signing'
|
||||||
id 'com.github.node-gradle.node' version '2.2.4'
|
id 'com.github.node-gradle.node' version '2.2.4'
|
||||||
}
|
}
|
||||||
|
|
||||||
group = 'com.ossez.docresources'
|
group = 'com.ossez'
|
||||||
description = 'Ossez 文档资源库'
|
archivesBaseName = "doc-resources"
|
||||||
|
description = 'OSSEZ 文档资源库'
|
||||||
|
|
||||||
node {
|
node {
|
||||||
version = '14.15.3'
|
version = '14.15.3'
|
||||||
|
@ -15,9 +18,17 @@ node {
|
||||||
npm_run_build.dependsOn(npm_install)
|
npm_run_build.dependsOn(npm_install)
|
||||||
distZip.dependsOn npm_run_build
|
distZip.dependsOn npm_run_build
|
||||||
|
|
||||||
|
artifacts {
|
||||||
|
archives distZip
|
||||||
|
}
|
||||||
|
|
||||||
|
signing {
|
||||||
|
sign configurations.archives
|
||||||
|
}
|
||||||
|
|
||||||
distributions {
|
distributions {
|
||||||
main {
|
main {
|
||||||
baseName = 'ossez-doc-resources'
|
baseName = 'doc-resources'
|
||||||
contents {
|
contents {
|
||||||
from { "${buildDir}/dist" }
|
from { "${buildDir}/dist" }
|
||||||
into '/'
|
into '/'
|
||||||
|
@ -25,6 +36,7 @@ distributions {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
maven(MavenPublication) {
|
maven(MavenPublication) {
|
||||||
|
@ -42,3 +54,48 @@ publishing {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uploadArchives {
|
||||||
|
repositories {
|
||||||
|
mavenDeployer {
|
||||||
|
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
|
||||||
|
|
||||||
|
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
|
||||||
|
authentication(userName: ossrhUsername, password: ossrhPassword)
|
||||||
|
}
|
||||||
|
|
||||||
|
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
|
||||||
|
authentication(userName: ossrhUsername, password: ossrhPassword)
|
||||||
|
}
|
||||||
|
|
||||||
|
pom.project {
|
||||||
|
name 'Example Application'
|
||||||
|
packaging 'jar'
|
||||||
|
// optionally artifactId can be defined here
|
||||||
|
description 'A application used as an example on how to set up pushing its components to the Central Repository.'
|
||||||
|
url 'http://www.example.com/example-application'
|
||||||
|
|
||||||
|
scm {
|
||||||
|
connection 'scm:svn:http://foo.googlecode.com/svn/trunk/'
|
||||||
|
developerConnection 'scm:svn:https://foo.googlecode.com/svn/trunk/'
|
||||||
|
url 'http://foo.googlecode.com/svn/trunk/'
|
||||||
|
}
|
||||||
|
|
||||||
|
licenses {
|
||||||
|
license {
|
||||||
|
name 'The Apache License, Version 2.0'
|
||||||
|
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
developers {
|
||||||
|
developer {
|
||||||
|
id 'manfred'
|
||||||
|
name 'Manfred Moser'
|
||||||
|
email 'manfred@sonatype.com'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1 +1 @@
|
||||||
version=0.2.6-SNAPSHOT
|
version=0.0.1-SNAPSHOT
|
||||||
|
|
Loading…
Reference in New Issue