11apply plugin : " maven-publish"
22apply plugin : " signing"
33
4- afterEvaluate {
5- def releaseComponent = components. findByName(" release" ) ?: components. findByName(" debug" )
6- if (releaseComponent == null ) {
7- throw new GradleException (" No component found to publish! Make sure this is an Android Library module with a release build type." )
8- }
9-
10- publishing {
11- publications {
12- release(MavenPublication ) {
13- from releaseComponent
14-
15- groupId = " top.oply"
16- artifactId = " opuslib"
17- version = " 1.0.0"
18-
19- pom {
20- name. set(" OpusLib" )
21- description. set(" Re-publishing of OpusLib with no additional functionality." )
22- url. set(" https://github.com/simla-tech/opus_android" )
23-
24- licenses {
25- license {
26- name. set(" The Apache License, Version 2.0" )
27- url. set(" http://www.apache.org/licenses/LICENSE-2.0.txt" )
28- distribution. set(" repo" )
29- }
30- }
31-
32- developers {
33- developer {
34- id. set(" SimlaTech" )
35- name. set(" Simla Mobile Dev Team" )
36- email. set(System . getenv(" SIMLA_TECH_EMAIL" ))
37- }
4+ publishing {
5+ publications {
6+ release(MavenPublication ) {
7+ from releaseComponent
8+
9+ pom {
10+ name. set(" OpusLib" )
11+ description. set(" Re-publishing of OpusLib with no additional functionality." )
12+ url. set(" https://github.com/simla-tech/opus_android" )
13+
14+ licenses {
15+ license {
16+ name. set(" The Apache License, Version 2.0" )
17+ url. set(" http://www.apache.org/licenses/LICENSE-2.0.txt" )
18+ distribution. set(" repo" )
3819 }
20+ }
3921
40- scm {
41- url. set(" https://github.com/simla-tech/opus_android" )
42- connection. set(" scm:git:git://github.com/simla-tech/opus_android.git" )
43- developerConnection. set(" scm:git:ssh://github.com/simla-tech/opus_android.git" )
22+ developers {
23+ developer {
24+ id. set(" SimlaTech" )
25+ name. set(" Simla Mobile Dev Team" )
26+ email. set(System . getenv(" SIMLA_TECH_EMAIL" ))
4427 }
4528 }
46- }
47- }
4829
49- repositories {
50- maven {
51- url = uri(" https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" )
52- credentials {
53- username = System . getenv(" OSSRH_USERNAME" )
54- password = System . getenv(" OSSRH_PASSWORD" )
30+ scm {
31+ url. set(" https://github.com/simla-tech/opus_android" )
32+ connection. set(" scm:git:git://github.com/simla-tech/opus_android.git" )
33+ developerConnection. set(" scm:git:ssh://github.com/simla-tech/opus_android.git" )
5534 }
5635 }
5736 }
5837 }
5938
60- signing {
61- sign publishing. publications. release
39+ repositories {
40+ maven {
41+ url = uri(" https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" )
42+ credentials {
43+ username = System . getenv(" OSSRH_USERNAME" )
44+ password = System . getenv(" OSSRH_PASSWORD" )
45+ }
46+ }
6247 }
6348}
49+
50+ signing {
51+ sign publishing. publications. release
52+ }
0 commit comments