File tree Expand file tree Collapse file tree 3 files changed +26
-34
lines changed Expand file tree Collapse file tree 3 files changed +26
-34
lines changed Original file line number Diff line number Diff line change 24
24
env :
25
25
GITHUB_SECRET_PASSPHRASE : ${{ secrets.SECRETS_TAR_PASSPHRASE }}
26
26
- name : Publish to MavenCentral
27
- run : ./gradlew --info bundleReleaseAar publishReleasePublicationToSonatypeRepository closeAndReleaseRepository
27
+ run : ./gradlew bundleReleaseAar publishToSonatype closeAndReleaseSonatypeStagingRepository
Original file line number Diff line number Diff line change 1
1
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2
-
3
2
buildscript {
4
3
ext {
5
4
sdkCompileVersion = 28
@@ -74,16 +73,15 @@ buildscript {
74
73
classpath ' com.android.tools.build:gradle:4.1.0'
75
74
classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion "
76
75
77
- // Maven Central publishing
78
- classpath ' com.vanniktech:gradle-maven-publish-plugin:0.13.0'
79
- classpath ' org.jetbrains.dokka:dokka-gradle-plugin:1.4.10.2'
80
- classpath ' io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.22.0'
81
-
82
76
// NOTE: Do not place your application dependencies here; they belong
83
77
// in the individual module build.gradle files
84
78
}
85
79
}
86
80
81
+ plugins {
82
+ id(" io.github.gradle-nexus.publish-plugin" ) version " 1.0.0"
83
+ }
84
+
87
85
allprojects {
88
86
repositories {
89
87
jcenter()
@@ -106,4 +104,23 @@ subprojects {
106
104
tasks. withType(Javadoc ). all { enabled = false }
107
105
}
108
106
109
- apply plugin : ' io.codearte.nexus-staging'
107
+ File ossrhProp = project. rootProject. file(' ossrh.properties' )
108
+ if (ossrhProp. exists()) {
109
+ Properties p = new Properties ()
110
+ p. load(new FileInputStream (ossrhProp))
111
+ p. each { name , value ->
112
+ ext[name] = value
113
+ }
114
+
115
+ group coreGroupId
116
+ version coreVersion
117
+
118
+ nexusPublishing {
119
+ repositories {
120
+ sonatype {
121
+ username = ossrhUsername
122
+ password = ossrhPassword
123
+ }
124
+ }
125
+ }
126
+ }
Original file line number Diff line number Diff line change @@ -72,35 +72,10 @@ if (ossrhProp.exists()) {
72
72
}
73
73
}
74
74
}
75
- repositories {
76
- // The repository to publish to, Sonatype/MavenCentral
77
- maven {
78
- // This is an arbitrary name, you may also use "mavencentral" or
79
- // any other name that's descriptive for you
80
- name = " sonatype"
81
-
82
- def releasesRepoUrl = " https://oss.sonatype.org/service/local/staging/deploy/maven2/"
83
- def snapshotsRepoUrl = " https://oss.sonatype.org/content/repositories/snapshots/"
84
- // You only need this if you want to publish snapshots, otherwise just set the URL
85
- // to the release repo directly
86
- url = version. endsWith(' SNAPSHOT' ) ? snapshotsRepoUrl : releasesRepoUrl
87
-
88
- // The username and password we've fetched earlier
89
- credentials {
90
- username ossrhUsername
91
- password ossrhPassword
92
- }
93
- }
94
- }
95
75
}
96
76
signing {
97
77
sign publishing. publications
98
78
}
99
79
100
- nexusStaging {
101
- packageGroup publishGroupId
102
- stagingProfileId stagingProfileId
103
- username ossrhUsername
104
- password ossrhPassword
105
- }
80
+
106
81
}
You can’t perform that action at this time.
0 commit comments