1
+ import com.vanniktech.maven.publish.SonatypeHost
2
+
1
3
plugins {
2
4
alias(libs.plugins.android.library)
3
5
alias(libs.plugins.kotlin.android)
4
6
alias(libs.plugins.kotlin.compose)
5
7
alias(libs.plugins.kotlin.serialization)
6
8
id(" maven-publish" )
7
9
id(" signing" )
8
- }
9
-
10
- publishing {
11
- publications {
12
- create<MavenPublication >(" release" ) {
13
-
14
- groupId = " ru.marat"
15
- artifactId = " pdfviewer"
16
- version = " 1.0.0-alpha"
17
-
18
- signing {
19
- useInMemoryPgpKeys(
20
- System .getenv(" signingInMemoryKeyId" ),
21
- System .getenv(" signingInMemoryKey" ),
22
- System .getenv(" signingInMemoryKeyPassword" )
23
- )
24
- }
25
-
26
- pom {
27
- name = " PdfViewer"
28
- description = " Android PdfViewer library"
29
- url = " https://github.com/marat101/PDF-Viewer"
30
- licenses {
31
- license {
32
- name = " The Apache License, Version 2.0"
33
- url = " https://www.apache.org/licenses/LICENSE-2.0.txt"
34
- distribution = " https://www.apache.org/licenses/LICENSE-2.0.txt"
35
- }
36
- }
37
- developers {
38
- developer {
39
- id.set(" marat101" )
40
- name.set(" Marat" )
41
- email.set(" maratnv101@gmail.com" )
42
- }
43
- }
44
- scm {
45
- url.set(" https://github.com/marat101/PDF-Viewer" )
46
- connection.set(" scm:git:https://github.com/marat101/PDF-Viewer.git" )
47
- developerConnection = " scm:git:ssh://git@github.com/marat101/PDF-Viewer.git"
48
- }
49
- }
50
- }
51
- repositories {
52
- mavenCentral {
53
- name = " MavenCentral"
54
- credentials {
55
- username = System .getenv(" MAVEN_CENTRAL_USERNAME" )
56
- password = System .getenv(" MAVEN_CENTRAL_PASSWORD" )
57
- }
58
- }
59
- }
60
- }
61
- }
62
-
63
- signing {
64
- sign(publishing.publications)
10
+ id(" com.vanniktech.maven.publish" ) version " 0.31.0-rc2"
65
11
}
66
12
67
13
android {
@@ -105,4 +51,35 @@ dependencies {
105
51
implementation(libs.androidx.ui.tooling.preview)
106
52
implementation(libs.androidx.material3)
107
53
debugImplementation(libs.androidx.ui.tooling)
54
+ }
55
+
56
+ mavenPublishing {
57
+ publishToMavenCentral(SonatypeHost .CENTRAL_PORTAL )
58
+
59
+ signAllPublications()
60
+ coordinates(" io.github.marat101" , " pdf-viewer" , " 1.0.0-alpha" )
61
+ pom {
62
+ name = " PdfViewer"
63
+ description = " Android PdfViewer library"
64
+ url = " https://github.com/marat101/PDF-Viewer"
65
+ licenses {
66
+ license {
67
+ name = " The Apache License, Version 2.0"
68
+ url = " https://www.apache.org/licenses/LICENSE-2.0.txt"
69
+ distribution = " https://www.apache.org/licenses/LICENSE-2.0.txt"
70
+ }
71
+ }
72
+ developers {
73
+ developer {
74
+ id.set(" marat101" )
75
+ name.set(" Marat" )
76
+ email.set(" maratnv101@gmail.com" )
77
+ }
78
+ }
79
+ scm {
80
+ url.set(" https://github.com/marat101/PDF-Viewer" )
81
+ connection.set(" scm:git:https://github.com/marat101/PDF-Viewer.git" )
82
+ developerConnection = " scm:git:ssh://git@github.com/marat101/PDF-Viewer.git"
83
+ }
84
+ }
108
85
}
0 commit comments