Skip to content

Commit

Permalink
Corrects the artifactId of the :paywalls module and renames it to :re…
Browse files Browse the repository at this point in the history
…venuecatui. (#86)
  • Loading branch information
JayShortway committed Jun 13, 2024
1 parent f11f789 commit 85b890a
Show file tree
Hide file tree
Showing 19 changed files with 21 additions and 13 deletions.
10 changes: 9 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,17 @@ allprojects {
publishToMavenCentral(SonatypeHost.DEFAULT, automaticRelease = true)
signAllPublications()

// We override the artifact ID of :revenuecatui for consistency with the other SDKs. We
// could not name our Gradle module :ui, because this somehow conflicts with compose.ui
// in the iosMain source set. We can retry this at a later time.
val artifactIdSuffix = when (project.name) {
"revenuecatui" -> "ui"
else -> project.name
}

coordinates(
groupId = group.toString(),
artifactId = "purchases-kmp-${project.name}",
artifactId = "purchases-kmp-$artifactIdSuffix",
version = version.toString()
)
pom {
Expand Down
2 changes: 1 addition & 1 deletion composeApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ kotlin {
implementation(projects.result)
implementation(projects.either)
implementation(projects.datetime)
implementation(projects.paywalls)
implementation(projects.revenuecatui)
}
androidMain.dependencies {
implementation(libs.androidx.compose.ui.tooling.preview)
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// - Show manifest properties: true
// - Show declarations: true

// Library unique name: <com.revenuecat.purchases:paywalls>
// Library unique name: <com.revenuecat.purchases:revenuecatui>
abstract interface com.revenuecat.purchases.kmp.ui.revenuecatui/PaywallListener { // com.revenuecat.purchases.kmp.ui.revenuecatui/PaywallListener|null[0]
open fun onPurchaseCancelled() // com.revenuecat.purchases.kmp.ui.revenuecatui/PaywallListener.onPurchaseCancelled|onPurchaseCancelled(){}[0]
open fun onPurchaseCompleted(cocoapods.PurchasesHybridCommon/RCCustomerInfo, cocoapods.PurchasesHybridCommon/RCStoreTransaction) // com.revenuecat.purchases.kmp.ui.revenuecatui/PaywallListener.onPurchaseCompleted|onPurchaseCompleted(cocoapods.PurchasesHybridCommon.RCCustomerInfo;cocoapods.PurchasesHybridCommon.RCStoreTransaction){}[0]
Expand Down
File renamed without changes.
18 changes: 9 additions & 9 deletions paywalls/paywalls.podspec → revenuecatui/revenuecatui.podspec
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
Pod::Spec.new do |spec|
spec.name = 'paywalls'
spec.name = 'revenuecatui'
spec.version = '1.0'
spec.homepage = ''
spec.source = { :http=> ''}
spec.authors = ''
spec.license = ''
spec.summary = ''
spec.vendored_frameworks = 'build/cocoapods/framework/paywalls.framework'
spec.vendored_frameworks = 'build/cocoapods/framework/revenuecatui.framework'
spec.libraries = 'c++'
spec.ios.deployment_target = '11.0'
spec.dependency 'PurchasesHybridCommonUI', '10.7.0'

if !Dir.exist?('build/cocoapods/framework/paywalls.framework') || Dir.empty?('build/cocoapods/framework/paywalls.framework')
if !Dir.exist?('build/cocoapods/framework/revenuecatui.framework') || Dir.empty?('build/cocoapods/framework/revenuecatui.framework')
raise "
Kotlin framework 'paywalls' doesn't exist yet, so a proper Xcode project can't be generated.
Kotlin framework 'revenuecatui' doesn't exist yet, so a proper Xcode project can't be generated.
'pod install' should be executed after running ':generateDummyFramework' Gradle task:
./gradlew :paywalls:generateDummyFramework
./gradlew :revenuecatui:generateDummyFramework
Alternatively, proper pod installation is performed during Gradle sync in the IDE (if Podfile location is set)"
end
Expand All @@ -27,13 +27,13 @@ Pod::Spec.new do |spec|
}

spec.pod_target_xcconfig = {
'KOTLIN_PROJECT_PATH' => ':paywalls',
'PRODUCT_MODULE_NAME' => 'paywalls',
'KOTLIN_PROJECT_PATH' => ':revenuecatui',
'PRODUCT_MODULE_NAME' => 'revenuecatui',
}

spec.script_phases = [
{
:name => 'Build paywalls',
:name => 'Build revenuecatui',
:execution_position => :before_compile,
:shell_path => '/bin/sh',
:script => <<-SCRIPT
Expand All @@ -51,4 +51,4 @@ Pod::Spec.new do |spec|
}
]
spec.resources = ['build/compose/cocoapods/compose-resources']
end
end
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ include(":core")
include(":result")
include(":either")
include(":datetime")
include(":paywalls")
include(":revenuecatui")
include(":composeApp")

0 comments on commit 85b890a

Please sign in to comment.