File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,6 +20,18 @@ def isReleaseBuild() {
2020 return VERSION_NAME . contains(" SNAPSHOT" ) == false
2121}
2222
23+ def getRepositoryUrl () {
24+ return project. findProperty(" repositoryUrl" ) ?: " https://oss.sonatype.org/service/local/staging/deploy/maven2/"
25+ }
26+
27+ def getRepositoryUsername () {
28+ return project. findProperty(" repositoryUsername" ) ?: " "
29+ }
30+
31+ def getRepositoryPassword () {
32+ return project. findProperty(" repositoryPassword" ) ?: " "
33+ }
34+
2335def configureReactNativePom (def pom ) {
2436 pom. project {
2537 name(POM_NAME )
@@ -72,9 +84,28 @@ afterEvaluate { project ->
7284
7385 signing {
7486 required { isReleaseBuild() && gradle. taskGraph. hasTask(" uploadArchives" ) }
87+ useGpgCmd()
7588 sign(configurations. archives)
7689 }
7790
91+ uploadArchives {
92+ configuration = configurations. archives
93+ repositories. mavenDeployer {
94+ beforeDeployment {
95+ MavenDeployment deployment -> signing. signPom(deployment)
96+ }
97+
98+ repository(url : getRepositoryUrl()) {
99+ authentication(
100+ userName : getRepositoryUsername(),
101+ password : getRepositoryPassword())
102+
103+ }
104+
105+ configureReactNativePom(pom)
106+ }
107+ }
108+
78109 task installArchives(type : Upload ) {
79110 configuration = configurations. archives
80111 repositories. mavenDeployer {
You can’t perform that action at this time.
0 commit comments