File tree 1 file changed +31
-0
lines changed
1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,18 @@ def isReleaseBuild() {
20
20
return VERSION_NAME . contains(" SNAPSHOT" ) == false
21
21
}
22
22
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
+
23
35
def configureReactNativePom (def pom ) {
24
36
pom. project {
25
37
name(POM_NAME )
@@ -72,9 +84,28 @@ afterEvaluate { project ->
72
84
73
85
signing {
74
86
required { isReleaseBuild() && gradle. taskGraph. hasTask(" uploadArchives" ) }
87
+ useGpgCmd()
75
88
sign(configurations. archives)
76
89
}
77
90
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
+
78
109
task installArchives(type : Upload ) {
79
110
configuration = configurations. archives
80
111
repositories. mavenDeployer {
You can’t perform that action at this time.
0 commit comments