Skip to content

Commit 24d4ad5

Browse files
committed
Update release workflow to include JDK and Maven setup, and refine Gradle publishing configuration
1 parent 64b1630 commit 24d4ad5

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.github/workflows/publish-release.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ jobs:
1414
- name: Checkout project sources
1515
uses: actions/checkout@v3
1616

17+
- name: Set up JDK and Maven Central
18+
uses: actions/setup-java@v3
19+
with:
20+
java-version: '11'
21+
distribution: 'adopt'
22+
cache: 'gradle'
23+
server-id: ossrh
24+
server-username: MAVEN_USERNAME
25+
server-password: MAVEN_PASSWORD
26+
1727
- name: Setup Gradle
1828
uses: gradle/gradle-build-action@v2
1929

contentstack/build.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ plugins {
22
id "com.vanniktech.maven.publish" version "0.27.0"
33
id "com.android.library"
44
}
5-
5+
import com.vanniktech.maven.publish.SonatypeHost
66
android.buildFeatures.buildConfig true
77

88
mavenPublishing {
9-
// Use OSSRH staging API for Maven Central publishing
10-
publishToMavenCentral("OSSRH", "https://s01.oss.sonatype.org/service/local/")
9+
// Use S01 host for Maven Central publishing
10+
publishToMavenCentral(SonatypeHost.S01)
1111
signAllPublications()
1212
coordinates("com.contentstack.sdk", "android", "4.1.0-beta")
1313

@@ -97,7 +97,6 @@ android {
9797
keyPassword 'android'
9898
}
9999
}
100-
compileSdk 30
101100
defaultConfig {
102101
// Required when setting minSdkVersion to 20 or lower
103102
multiDexEnabled true

0 commit comments

Comments
 (0)