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
4+ publishing {
5+ publications {
6+ release(MavenPublication ) {
147
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" )
8+ afterEvaluate {
9+ from components. release
10+ }
2311
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- }
12+ pom {
13+ name. set(" OpusLib" )
14+ description. set(" Re-publishing of OpusLib with no additional functionality." )
15+ url. set(" https://github.com/simla-tech/opus_android" )
3116
32- developers {
33- developer {
34- id. set(" SimlaTech" )
35- name. set(" Simla Mobile Dev Team" )
36- email. set(System . getenv(" SIMLA_TECH_EMAIL" ))
37- }
17+ licenses {
18+ license {
19+ name. set(" The Apache License, Version 2.0" )
20+ url. set(" http://www.apache.org/licenses/LICENSE-2.0.txt" )
21+ distribution. set(" repo" )
3822 }
23+ }
3924
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" )
25+ developers {
26+ developer {
27+ id. set(" SimlaTech" )
28+ name. set(" Simla Mobile Dev Team" )
29+ email. set(System . getenv(" SIMLA_TECH_EMAIL" ))
4430 }
4531 }
46- }
47- }
4832
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" )
33+ scm {
34+ url. set(" https://github.com/simla-tech/opus_android" )
35+ connection. set(" scm:git:git://github.com/simla-tech/opus_android.git" )
36+ developerConnection. set(" scm:git:ssh://github.com/simla-tech/opus_android.git" )
5537 }
5638 }
5739 }
5840 }
5941
60- signing {
61- sign publishing. publications. release
42+ repositories {
43+ maven {
44+ url = uri(" https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" )
45+ credentials {
46+ username = System . getenv(" OSSRH_USERNAME" )
47+ password = System . getenv(" OSSRH_PASSWORD" )
48+ }
49+ }
6250 }
6351}
52+
53+ signing {
54+ sign publishing. publications. release
55+ }
0 commit comments