Skip to content

Backup PR for central publishing #916

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
26 changes: 5 additions & 21 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,10 @@ jobs:
distribution: 'temurin'
cache: gradle

- name: Import GPG Key
run: |
echo "${{ secrets.GPG_PRIVATE_KEY }}" | base64 -d > private.gpg
gpg --batch --import private.gpg
rm private.gpg

- name: Build
run: ./gradlew clean build
env:
ORG_GRADLE_PROJECT_SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_SIGNING_SECRET_KEY_RING_FILE: ~/.gnupg/secring.gpg
ORG_GRADLE_PROJECT_NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}

- name: Publish to Maven Central
run: ./gradlew uploadArchives
run: ./gradlew publishToMavenCentral --no-configuration-cache
env:
ORG_GRADLE_PROJECT_SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_SIGNING_SECRET_KEY_RING_FILE: ~/.gnupg/secring.gpg
ORG_GRADLE_PROJECT_NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_PASSWORD }}
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ buildscript {
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
}
classpath "com.github.dcendents:android-maven-gradle-plugin:2.1"
classpath "com.vanniktech:gradle-maven-publish-plugin:0.25.3"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
24 changes: 24 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ android.nonTransitiveRClass=false
android.useAndroidX=true
org.gradle.jvmargs=-Xmx2048m

# GPG Configuration for CI/CD automation
org.gradle.project.signing.gnupg.executable=gpg
org.gradle.project.signing.gnupg.useLegacyGpg=false
org.gradle.project.signing.gnupg.homeDir=/Users/akshay/.gnupg
org.gradle.project.signing.gnupg.optionsFile=/Users/akshay/.gnupg/gpg.conf


# Maven Publishing Configuration
GROUP=com.iterable

POM_DESCRIPTION= Iterable is a growth marketing platform that helps you to create better experiences for—and deeper relationships with—your customers. Use it to send customized email, SMS, push notification, in-app message and web push notifications to your customers. This SDK helps you integrate your Android apps with Iterable. It supports Android API versions 15+.
Expand All @@ -38,3 +46,19 @@ POM_DEVELOPER_NAME=Iterable
POM_PACKAGING=aar

org.gradle.daemon=true


[email protected]

mavenCentralUsername=BtJKDbV0
mavenCentralPassword=jGYUhNFF25c69cK8y6RFbVfp1XA337ojT4UHVBriFlXJ

# GPG Configuration (cleaned up)

# GPG signing configuration for CI/CD
signing.keyId=A23B00826448CB29
signing.password=Guruji123$
signing.gnupg.executable=gpg

# Fix for GPG signing in non-interactive environments
systemProp.org.gradle.internal.publish.checksums.insecure=true
35 changes: 29 additions & 6 deletions iterableapi-ui/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Using native Gradle maven-publish plugin instead
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'com.vanniktech.maven.publish'

android {
compileSdk 34
Expand Down Expand Up @@ -59,13 +61,34 @@ dependencies {
androidTestImplementation 'androidx.test:rules:1.6.1'
}

ext {
libraryName = 'iterableapi-ui'
libraryVersion = '3.5.13'
}
mavenPublishing {
coordinates("com.iterable", "iterableapi-ui", "3.5.13")
publishToMavenCentral("S01", true)
signAllPublications()

if (hasProperty("mavenPublishEnabled")) {
apply from: '../maven-push.gradle'
pom {
name = "iterableapi-ui"
description = "Iterable's official Android SDK for UI components"
url = "https://github.com/Iterable/iterable-android-sdk"
licenses {
license {
name = "MIT License"
url = "https://opensource.org/licenses/MIT"
}
}
developers {
developer {
id = "iterable"
name = "Iterable"
email = "[email protected]"
}
}
scm {
connection = "scm:git:[email protected]:Iterable/iterable-android-sdk.git"
developerConnection = "scm:git:[email protected]:Iterable/iterable-android-sdk.git"
url = "https://github.com/Iterable/iterable-android-sdk"
}
}
}

task javadoc(type: Javadoc) {
Expand Down
38 changes: 31 additions & 7 deletions iterableapi/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Using native Gradle maven-publish plugin instead
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'checkstyle'
apply plugin: 'com.vanniktech.maven.publish'


android {
compileSdk 34
Expand Down Expand Up @@ -86,13 +89,34 @@ dependencies {
androidTestImplementation 'org.mockito:mockito-android:4.8.0'
}

ext {
libraryName = 'iterableapi'
libraryVersion = '3.5.13'
}

if (hasProperty("mavenPublishEnabled")) {
apply from: '../maven-push.gradle'
mavenPublishing {
coordinates("com.iterable", "iterableapi", "3.5.13")
publishToMavenCentral("S01", true)
signAllPublications()

pom {
name = "iterableapi"
description = "Iterable's official Android SDK"
url = "https://github.com/Iterable/iterable-android-sdk"
licenses {
license {
name = "MIT License"
url = "https://opensource.org/licenses/MIT"
}
}
developers {
developer {
id = "iterable"
name = "Iterable"
email = "[email protected]"
}
}
scm {
connection = "scm:git:[email protected]:Iterable/iterable-android-sdk.git"
developerConnection = "scm:git:[email protected]:Iterable/iterable-android-sdk.git"
url = "https://github.com/Iterable/iterable-android-sdk"
}
}
}

task javadoc(type: Javadoc) {
Expand Down
123 changes: 0 additions & 123 deletions maven-push.gradle

This file was deleted.

Loading