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
22 changes: 11 additions & 11 deletions .github/workflows/apple-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,38 +35,38 @@ jobs:

- name: Framework Tolgee
continue-on-error: true
run: ./gradlew core:assembleTolgeeXCFramework || ./gradlew core:assembleXCFramework
run: ./gradlew core:assembleKMPTolgeeXCFramework

- name: Framework Tolgee Release
continue-on-error: true
run: ./gradlew core:assembleTolgeeReleaseXCFramework || ./gradlew core:assembleReleaseXCFramework
run: ./gradlew core:assembleKMPTolgeeReleaseXCFramework

- name: Framework Tolgee Debug
continue-on-error: true
run: ./gradlew core:assembleTolgeeDebugXCFramework || ./gradlew core:assembleDebugXCFramework
run: ./gradlew core:assembleKMPTolgeeDebugXCFramework

- name: Create XCFramework Archive
run: |
cd core/build/XCFrameworks/release
tar -czf Tolgee-release.xcframework.tar.gz Tolgee.xcframework
tar -czf KMPTolgee-release.xcframework.tar.gz KMPTolgee.xcframework
cd ../debug
tar -czf Tolgee-debug.xcframework.tar.gz Tolgee.xcframework
tar -czf KMPTolgee-debug.xcframework.tar.gz KMPTolgee.xcframework
cd ../../../../
mv core/build/XCFrameworks/release/Tolgee-release.xcframework.tar.gz .
mv core/build/XCFrameworks/debug/Tolgee-debug.xcframework.tar.gz .
mv core/build/XCFrameworks/release/KMPTolgee-release.xcframework.tar.gz .
mv core/build/XCFrameworks/debug/KMPTolgee-debug.xcframework.tar.gz .

- name: Upload XCFramework to Release
if: ${{ github.event_name == 'release' }}
uses: softprops/action-gh-release@v2
with:
files: |
Tolgee-release.xcframework.tar.gz
Tolgee-debug.xcframework.tar.gz
KMPTolgee-release.xcframework.tar.gz
KMPTolgee-debug.xcframework.tar.gz

- name: Upload XCFramework to action packages
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/upload-artifact@v4
with:
path: |
Tolgee-release.xcframework.tar.gz
Tolgee-debug.xcframework.tar.gz
KMPTolgee-release.xcframework.tar.gz
KMPTolgee-debug.xcframework.tar.gz
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ plugins {
alias(libs.plugins.ktorfit) apply false
alias(libs.plugins.multiplatform) apply false
alias(libs.plugins.serialization) apply false
alias(libs.plugins.skie) apply false
alias(libs.plugins.vanniktech.publish) apply false
alias(libs.plugins.versions)
}
Expand Down
12 changes: 6 additions & 6 deletions core/Tolgee.podspec → core/KMPTolgee.podspec
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
Pod::Spec.new do |spec|
spec.name = 'Tolgee'
spec.name = 'KMPTolgee'
spec.version = '1.0.0-alpha01'
spec.homepage = 'https://github.com/tolgee/tolgee-mobile-kotlin-sdk'
spec.source = { :http=> ''}
spec.authors = ''
spec.license = 'Apache License 2.0'
spec.summary = 'Kotlin Multiplatform localization wrapper for Tolgee'
spec.vendored_frameworks = 'build/cocoapods/framework/Tolgee.framework'
spec.vendored_frameworks = 'build/cocoapods/framework/KMPTolgee.framework'
spec.libraries = 'c++'



if !Dir.exist?('build/cocoapods/framework/Tolgee.framework') || Dir.empty?('build/cocoapods/framework/Tolgee.framework')
if !Dir.exist?('build/cocoapods/framework/KMPTolgee.framework') || Dir.empty?('build/cocoapods/framework/KMPTolgee.framework')
raise "

Kotlin framework 'Tolgee' doesn't exist yet, so a proper Xcode project can't be generated.
Kotlin framework 'KMPTolgee' doesn't exist yet, so a proper Xcode project can't be generated.
'pod install' should be executed after running ':generateDummyFramework' Gradle task:

./gradlew :core:generateDummyFramework
Expand All @@ -28,12 +28,12 @@ Pod::Spec.new do |spec|

spec.pod_target_xcconfig = {
'KOTLIN_PROJECT_PATH' => ':core',
'PRODUCT_MODULE_NAME' => 'Tolgee',
'PRODUCT_MODULE_NAME' => 'KMPTolgee',
}

spec.script_phases = [
{
:name => 'Build Tolgee',
:name => 'Build KMPTolgee',
:execution_position => :before_compile,
:shell_path => '/bin/sh',
:script => <<-SCRIPT
Expand Down
24 changes: 23 additions & 1 deletion core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import co.touchlab.skie.configuration.DefaultArgumentInterop
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFramework

Expand All @@ -8,14 +9,15 @@ plugins {
alias(libs.plugins.cocoapods)
alias(libs.plugins.dokka)
alias(libs.plugins.serialization)
alias(libs.plugins.skie)
alias(libs.plugins.vanniktech.publish)
`maven-publish`
signing
}

val libGroup = "io.tolgee.mobile-kotlin-sdk"
val libName = "core"
val appleFramework = "Tolgee"
val appleFramework = "KMPTolgee"

group = libGroup
version = libVersion
Expand All @@ -30,6 +32,26 @@ dokka {
}
}

skie {
build {
produceDistributableFramework()
enableSwiftLibraryEvolution.set(true)
noClangModuleBreadcrumbsInStaticFrameworks.set(true)
}
features {
enableSwiftUIObservingPreview.set(true)
enableFutureCombineExtensionPreview.set(true)
enableFlowCombineConvertorPreview.set(true)

group {
DefaultArgumentInterop.Enabled(true)
}
}
analytics {
disableUpload.set(true)
}
}

kotlin {
androidTarget {
publishAllLibraryVariants()
Expand Down
35 changes: 20 additions & 15 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,46 @@
# https://docs.gradle.org/current/userguide/platforms.html#sub:version-catalog
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format

# Keep each section in alphabetic order!
# Only exceptions are entries produced by this SDK, commented by "Keep at top".

[versions]
library = "1.0.0-alpha01"
library = "1.0.0-alpha01" # Keep at top
activity = "1.10.1"
android-core = "1.16.0"
android-tools = "8.12.0"
android-core = "1.17.0"
android-tools = "8.12.1"
atomicfu = "0.29.0"
auto-service = "1.1.1"
binary-compatibility = "0.18.1"
compose = "1.8.2"
compose-bom = "2025.08.00"
coroutines = "1.10.2"
datetime = "0.7.1"
dokka = "2.0.0"
i18n4k = "0.11.0"
immutable = "0.4.0"
kaml = "0.85.0"
kaml = "0.92.0"
kctfork = "0.8.0"
kommand = "2.3.0"
kotlin = "2.2.0"
ksp = "2.2.0-2.0.2"
kotlin = "2.2.10"
ksp = "2.2.10-2.0.2"
ktor = "3.2.3"
ktorfit = "2.6.4"
lifecycle-runtime-ktx = "2.9.2"
publish = "0.34.0"
semver = "3.0.0"
serialization = "1.9.0"
tooling = "1.7.0"
skie = "0.10.6"
tooling = "1.8.0"
versions = "0.52.0"
lifecycle-runtime-ktx = "2.9.2"
compose-bom = "2025.07.00"

[libraries]
activity = { group = "androidx.activity", name = "activity-ktx", version.ref = "activity" }
activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activity" }
android = { group = "androidx.core", name = "core-ktx", version.ref = "android-core" }
android-tools = { group = "com.android.tools.build", name = "gradle", version.ref = "android-tools" }
auto-service = { group = "com.google.auto.service", name = "auto-service", version.ref = "auto-service" }
compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "compose-bom" }
coroutines = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "coroutines" }
coroutines-android = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-android", version.ref = "coroutines" }
coroutines-swing = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-swing", version.ref = "coroutines" }
Expand All @@ -59,21 +64,21 @@ ktor-okhttp = { group = "io.ktor", name = "ktor-client-okhttp", version.ref = "k
ktor-winhttp = { group = "io.ktor", name = "ktor-client-winhttp", version.ref = "ktor" }
ktorfit = { group = "de.jensklingenberg.ktorfit", name = "ktorfit-lib", version.ref = "ktorfit" }
ktorfit-ksp = { group = "de.jensklingenberg.ktorfit", name = "ktorfit-ksp", version.ref = "ktorfit" }
lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycle-runtime-ktx" }
material3 = { group = "androidx.compose.material3", name = "material3" }
semver = { group = "io.github.z4kn4fein", name = "semver", version.ref = "semver" }
serialization = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-core", version.ref = "serialization" }
serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "serialization" }
serialization-kaml = { group = "com.charleskorn.kaml", name = "kaml", version.ref = "kaml" }
tooling = { group = "dev.datlag.tooling", name = "tooling-async", version.ref = "tooling" }
lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycle-runtime-ktx" }
compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "compose-bom" }
ui = { group = "androidx.compose.ui", name = "ui" }
ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }
ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }
material3 = { group = "androidx.compose.material3", name = "material3" }

[plugins]
tolgee = { id = "io.tolgee.mobile-kotlin-sdk", version.ref = "library" } # Keep at top
android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
android-application = { id = "com.android.application", version.ref = "android-tools" }
android-library = { id = "com.android.library", version.ref = "android-tools" }
Expand All @@ -87,6 +92,6 @@ ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
ktorfit = { id = "de.jensklingenberg.ktorfit", version.ref = "ktorfit" }
multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
skie = { id = "co.touchlab.skie", version.ref = "skie" }
vanniktech-publish = { id = "com.vanniktech.maven.publish", version.ref = "publish" }
versions = { id = "com.github.ben-manes.versions", version.ref = "versions" }
tolgee = { id = "io.tolgee.mobile-kotlin-sdk", version.ref = "library" }
versions = { id = "com.github.ben-manes.versions", version.ref = "versions" }
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sat Jan 11 14:03:40 CET 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading