Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/workflows/release-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ jobs:
- name: Build and upload archives to the Maven Central Repository
run: ./gradlew afterpay:publishAllPublicationsToMavenCentralRepository --no-daemon --no-parallel
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME_FOR_TOKEN }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_TOKEN }}
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.PGP_SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.PGP_SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PGP_SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_SECRET_PASSPHRASE }}
19 changes: 6 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,10 @@ jobs:
- name: Clean repository before building SDK
run: ./gradlew clean

- name: Build and upload archives to the Maven Central Repository
run: ./gradlew afterpay:publishAllPublicationsToMavenCentralRepository --no-daemon --no-parallel
- name: Build and publish release to Maven Central
run: ./gradlew afterpay:publishAndReleaseToMavenCentral --no-configuration-cache --no-daemon --no-parallel
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME_FOR_TOKEN }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_TOKEN }}
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.PGP_SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.PGP_SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PGP_SIGNING_PASSWORD }}

- name: Publish release to the Maven Central Repository
run: ./gradlew closeAndReleaseRepository
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME_FOR_TOKEN }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_TOKEN }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_SECRET_PASSPHRASE }}
15 changes: 7 additions & 8 deletions afterpay/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import org.gradle.plugins.signing.Sign

plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
Expand Down Expand Up @@ -78,15 +80,12 @@ dependencies {
testImplementation(libs.mockK)
}

mavenPublishing {
publishToMavenCentral()
signAllPublications()
}

tasks.withType<Sign> {
val version = project.version.toString()
onlyIf { !version.endsWith("SNAPSHOT") }
}

signing {
useInMemoryPgpKeys(
findProperty("signingKeyId").toString(),
findProperty("signingKey").toString(),
findProperty("signingPassword").toString(),
)
}
4 changes: 2 additions & 2 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Follow the steps below to add the latest snapshot build to your project.
repositories {
...
maven {
url = 'https://oss.sonatype.org/content/repositories/snapshots/'
url = 'https://central.sonatype.com/repository/maven-snapshots/'
}
...
}
Expand All @@ -48,7 +48,7 @@ repositories {

``` gradle
dependencies {
implementation 'com.afterpay:afterpay-android:4.8.3-SNAPSHOT' # or specific "vX.X.X-SNAPSHOT" version of this library.
implementation 'com.afterpay:afterpay-android:4.9.0-SNAPSHOT' # or specific "vX.X.X-SNAPSHOT" version of this library.
}
```

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
GROUP=com.afterpay
VERSION_NAME=4.8.3-SNAPSHOT
VERSION_NAME=4.9.0-SNAPSHOT

POM_URL=https://github.com/afterpay/sdk-android/
POM_SCM_URL=https://github.com/afterpay/sdk-android/
Expand Down
9 changes: 4 additions & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ minSdk = "24"
java = "17" # remember to update java version in .github/workflows as well

androidGradlePlugin = "8.2.2"
kotlin = "1.7.20"
kotlin = "1.9.20"
kotlinx_coroutines = "1.7.1"
kotlinx_serialization = "1.5.1"

Expand All @@ -15,10 +15,10 @@ core_ktx = "1.10.1"
junit = "4.13.2"
ktlint = "0.48.2"
material = "1.12.0"
maven_publish_plugin = "0.17.0"
maven_publish_plugin = "0.35.0"
mockk = "1.13.5"
moshi = "1.14.0" # latest version that is compatible with kotlin 1.7.x
retrofit = "2.9.0" # latest version that is compatible with kotlin 1.7.x
moshi = "1.14.0"
retrofit = "2.9.0"
secretsGradlePlugin = "2.0.1"
tools_desugar_sdk = "2.1.2"

Expand Down Expand Up @@ -54,4 +54,3 @@ spotless = "com.diffplug.spotless:7.0.0.BETA1"
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
vanniktech-maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "maven_publish_plugin" }
secrets-gradle-plugin = { id = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin", version.ref = "secretsGradlePlugin" }

5 changes: 3 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Wed Dec 02 12:29:11 AEDT 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
Loading