Skip to content

Commit

Permalink
reexport kmp libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
aduryagin committed Sep 30, 2024
1 parent 2bf6e28 commit 2cbdd03
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 29 deletions.
14 changes: 10 additions & 4 deletions skip-revenuecat-library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ kotlin {
baseName = "SkipRevenuecatLibrary"
isStatic = true
xcFramework.add(this)

// Re-export RevenueCat libraries
export(libs.purchases.core)
export(libs.purchases.datetime) // Optional
export(libs.purchases.either) // Optional
export(libs.purchases.result) // Optional
}
}
}
Expand All @@ -35,10 +41,10 @@ kotlin {
dependencies {
//put your multiplatform dependencies here

implementation(libs.purchases.core)
implementation(libs.purchases.datetime) // Optional
implementation(libs.purchases.either) // Optional
implementation(libs.purchases.result) // Optional
api(libs.purchases.core)
api(libs.purchases.datetime) // Optional
api(libs.purchases.either) // Optional
api(libs.purchases.result) // Optional
}
}
val iosArm64Main by getting {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,2 @@
package skip.revenuecat.library

object Singleton {
fun stringFunction(): String {
return "Hello"
}
}

/**
* A basic Kotlin class that will be exposed to Objective-C via KMP.
*/
class SampleClass(var stringField: String, var intField: Int, val doubleField: Double) {
/**
* Adds the intField and doubleField together.
*/
fun addNumbers() : Double {
return intField + doubleField
}

/**
* Throws an Exception, always.
*/
@Throws(Exception::class)
fun throwingFunction() {
throw Exception("This function always throws")
}
}

0 comments on commit 2cbdd03

Please sign in to comment.