-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
455ab20
commit f11f789
Showing
9 changed files
with
99 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
version: 2.1 | ||
|
||
orbs: | ||
android: circleci/[email protected] | ||
|
||
commands: | ||
install-android-sdk-on-macos: | ||
description: Install the Android SDK on macOS | ||
steps: | ||
- run: | ||
name: Install Android SDK commandline tools | ||
command: brew install --cask android-commandlinetools | ||
- run: | ||
name: Set Android SDK environment variables | ||
command: | | ||
echo 'export ANDROID_HOME="$HOMEBREW_PREFIX/share/android-commandlinetools"' >> "$BASH_ENV" | ||
echo 'export PATH="$ANDROID_HOME/emulator:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools:$PATH"' >> "$BASH_ENV" | ||
- android/accept-licenses | ||
- run: | ||
name: Install Android SDK platform tools | ||
command: sdkmanager "platform-tools" | ||
require-snapshot-version: | ||
description: Check that the current version is a SNAPSHOT version | ||
steps: | ||
- run: | ||
name: Check that the current version is a SNAPSHOT version | ||
command: | | ||
set -euo pipefail | ||
file_path="gradle/libs.versions.toml" | ||
version=$(grep 'revenuecat-kmp = ' "$file_path" | awk -F ' = ' '{print $2}' | tr -d '"') | ||
if [[ ! "$version" =~ -SNAPSHOT$ ]]; then | ||
echo "$version is not a SNAPSHOT version. Exiting..." | ||
exit 1 | ||
else | ||
echo "$version is a SNAPSHOT version. Proceeding..." | ||
fi | ||
executors: | ||
xcode15: | ||
macos: | ||
xcode: 15.4.0 | ||
resource_class: macos.m1.medium.gen1 | ||
environment: | ||
# Avoid waiting for Homebrew to auto update existing packages, as everything we care about is | ||
# freshly installed. | ||
HOMEBREW_NO_AUTO_UPDATE: 1 | ||
|
||
jobs: | ||
deploy-snapshot: | ||
executor: xcode15 | ||
steps: | ||
- checkout | ||
- require-snapshot-version | ||
- install-android-sdk-on-macos | ||
- android/restore-gradle-cache | ||
- android/restore-build-cache | ||
- run: | ||
name: Set environment variables for publishing | ||
command: | | ||
echo 'export ORG_GRADLE_PROJECT_mavenCentralUsername="$SONATYPE_NEXUS_TOKEN_USERNAME"' >> "$BASH_ENV" | ||
echo 'export ORG_GRADLE_PROJECT_mavenCentralPassword="$SONATYPE_NEXUS_TOKEN_PASSWORD"' >> "$BASH_ENV" | ||
echo 'export ORG_GRADLE_PROJECT_signingInMemoryKey="$SIGNING_GPG_IN_MEMORY"' >> "$BASH_ENV" | ||
echo 'export ORG_GRADLE_PROJECT_signingInMemoryKeyPassword="$GPG_SIGNING_KEY_PW_NEW"' >> "$BASH_ENV" | ||
- run: | ||
name: Publish snapshot to Maven Central | ||
command: ./gradlew publishAllPublicationsToMavenCentralRepository | ||
- android/save-gradle-cache | ||
- android/save-build-cache | ||
|
||
workflows: | ||
on-main: | ||
# On all pushes to main, except when it's a scheduled pipeline. | ||
when: | ||
and: | ||
- equal: [ main, << pipeline.git.branch >> ] | ||
- not: | ||
equal: [ scheduled_pipeline, << pipeline.trigger_source >> ] | ||
jobs: | ||
- deploy-snapshot: | ||
context: maven-central-publishing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,8 @@ | |
|
||
import com.vanniktech.maven.publish.MavenPublishBaseExtension | ||
import com.vanniktech.maven.publish.MavenPublishPlugin | ||
import com.vanniktech.maven.publish.SonatypeHost | ||
import io.gitlab.arturbosch.detekt.Detekt | ||
import nmcp.NmcpExtension | ||
import nmcp.NmcpPlugin | ||
import org.gradle.configurationcache.extensions.capitalized | ||
|
||
plugins { | ||
|
@@ -19,45 +18,27 @@ plugins { | |
alias(libs.plugins.adamko.dokkatoo.html) | ||
alias(libs.plugins.arturbosch.detekt).apply(false) | ||
alias(libs.plugins.vanniktech.mavenPublish).apply(false) | ||
alias(libs.plugins.gradleup.nmcp).apply(false) | ||
} | ||
|
||
allprojects { | ||
group = "" // FIXME Check publishing | ||
group = "com.revenuecat.purchases" | ||
version = rootProject.libs.versions.revenuecat.kmp.get() | ||
|
||
// NmcpPlugin publishes to a local repo when running assemble, meaning we need signing | ||
// credentials for every assemble. This avoids that. | ||
if (gradle.startParameter.taskNames.contains("publishAllPublicationsToCentralPortal")) { | ||
// Remove when https://github.com/vanniktech/gradle-maven-publish-plugin/issues/722 is fixed. | ||
plugins.withType<NmcpPlugin> { | ||
configure<NmcpExtension>() { | ||
publishAllPublications { | ||
username = System.getenv("ORG_GRADLE_PROJECT_mavenCentralUsername") | ||
password = System.getenv("ORG_GRADLE_PROJECT_mavenCentralPassword") | ||
publicationType = "AUTOMATIC" | ||
} | ||
} | ||
} | ||
} | ||
|
||
plugins.withType<MavenPublishPlugin> { | ||
configure<MavenPublishBaseExtension> { | ||
// Re-enable when https://github.com/vanniktech/gradle-maven-publish-plugin/issues/722 | ||
// is fixed. | ||
// publishToMavenCentral(SonatypeHost.DEFAULT, automaticRelease = true) | ||
publishToMavenCentral(SonatypeHost.DEFAULT, automaticRelease = true) | ||
signAllPublications() | ||
|
||
coordinates( | ||
groupId = group.toString(), | ||
artifactId = "kobankat-${project.name}", | ||
artifactId = "purchases-kmp-${project.name}", | ||
version = version.toString() | ||
) | ||
pom { | ||
name.set("KobanKat (${project.name})") | ||
description.set("RevenueCat SDK for Kotlin Multiplatform") | ||
name.set("purchases-kmp-(${project.name})") | ||
description.set("Mobile subscriptions in hours, not months.") | ||
inceptionYear.set("2024") | ||
url.set("https://github.com/JayShortway/kobankat") | ||
url.set("https://github.com/RevenueCat/purchases-kmp") | ||
licenses { | ||
license { | ||
name.set("The MIT License (MIT)") | ||
|
@@ -67,15 +48,15 @@ allprojects { | |
} | ||
developers { | ||
developer { | ||
id.set("JayShortway") | ||
name.set("Jay Shortway") | ||
url.set("https://github.com/JayShortway") | ||
id.set("revenuecat") | ||
name.set("RevenueCat, Inc.") | ||
url.set("https://www.revenuecat.com/") | ||
} | ||
} | ||
scm { | ||
url.set("https://github.com/JayShortway/kobankat") | ||
connection.set("scm:git:https://github.com/JayShortway/kobankat.git") | ||
developerConnection.set("scm:git:ssh://[email protected]/JayShortway/kobankat.git") | ||
url.set("https://github.com/RevenueCat/purchases-kmp") | ||
connection.set("scm:git:git://github.com/RevenueCat/purchases-kmp.git") | ||
developerConnection.set("scm:git:ssh://[email protected]/RevenueCat/purchases-kmp.git") | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
// - Show manifest properties: true | ||
// - Show declarations: true | ||
|
||
// Library unique name: <result> | ||
// Library unique name: <com.revenuecat.purchases:result> | ||
final suspend fun (cocoapods.PurchasesHybridCommon/RCPurchases).com.revenuecat.purchases.kmp.result/awaitCustomerInfoResult(com.revenuecat.purchases.kmp/CacheFetchPolicy = ...): kotlin/Result<cocoapods.PurchasesHybridCommon/RCCustomerInfo> // com.revenuecat.purchases.kmp.result/awaitCustomerInfoResult|awaitCustomerInfoResult@cocoapods.PurchasesHybridCommon.RCPurchases(com.revenuecat.purchases.kmp.CacheFetchPolicy){}[0] | ||
final suspend fun (cocoapods.PurchasesHybridCommon/RCPurchases).com.revenuecat.purchases.kmp.result/awaitGetProductsResult(kotlin.collections/List<kotlin/String>): kotlin/Result<kotlin.collections/List<cocoapods.PurchasesHybridCommon/RCStoreProduct>> // com.revenuecat.purchases.kmp.result/awaitGetProductsResult|awaitGetProductsResult@cocoapods.PurchasesHybridCommon.RCPurchases(kotlin.collections.List<kotlin.String>){}[0] | ||
final suspend fun (cocoapods.PurchasesHybridCommon/RCPurchases).com.revenuecat.purchases.kmp.result/awaitLogInResult(kotlin/String): kotlin/Result<com.revenuecat.purchases.kmp.ktx/SuccessfulLogin> // com.revenuecat.purchases.kmp.result/awaitLogInResult|[email protected](kotlin.String){}[0] | ||
|