-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move paging extensions to own module
Create testing-support shared module
- Loading branch information
Showing
36 changed files
with
577 additions
and
128 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
39 changes: 39 additions & 0 deletions
39
couchbase-lite-ee-paging/CouchbaseLite-Enterprise-KMP-Paging.podspec
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,39 @@ | ||
Pod::Spec.new do |spec| | ||
spec.name = 'CouchbaseLite-Enterprise-KMP-Paging' | ||
spec.version = '3.0.5-1-SNAPSHOT' | ||
spec.homepage = 'https://github.com/udobny/couchbase-lite-kmp' | ||
spec.source = { :http=> ''} | ||
spec.authors = 'Couchbase, Jeff Lockhart' | ||
spec.license = 'Custom, Apache License, Version 2.0' | ||
spec.summary = 'Couchbase Lite Enterprise Edition for Kotlin Multiplatform AndroidX Paging Extensions' | ||
spec.vendored_frameworks = 'build/cocoapods/framework/CouchbaseLite_Enterprise_KMP_Paging.framework' | ||
spec.libraries = 'c++' | ||
spec.ios.deployment_target = '9.0' | ||
spec.dependency 'CouchbaseLite-Enterprise', '3.0.2' | ||
|
||
spec.pod_target_xcconfig = { | ||
'KOTLIN_PROJECT_PATH' => ':couchbase-lite-ee-paging', | ||
'PRODUCT_MODULE_NAME' => 'CouchbaseLite_Enterprise_KMP_Paging', | ||
} | ||
|
||
spec.script_phases = [ | ||
{ | ||
:name => 'Build CouchbaseLite-Enterprise-KMP-Paging', | ||
:execution_position => :before_compile, | ||
:shell_path => '/bin/sh', | ||
:script => <<-SCRIPT | ||
if [ "YES" = "$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED" ]; then | ||
echo "Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \"YES\"" | ||
exit 0 | ||
fi | ||
set -ev | ||
REPO_ROOT="$PODS_TARGET_SRCROOT" | ||
"$REPO_ROOT/../gradlew" -p "$REPO_ROOT" $KOTLIN_PROJECT_PATH:syncFramework \ | ||
-Pkotlin.native.cocoapods.platform=$PLATFORM_NAME \ | ||
-Pkotlin.native.cocoapods.archs="$ARCHS" \ | ||
-Pkotlin.native.cocoapods.configuration="$CONFIGURATION" | ||
SCRIPT | ||
} | ||
] | ||
|
||
end |
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,114 @@ | ||
@file:Suppress("UNUSED_VARIABLE") | ||
|
||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi | ||
import org.jetbrains.kotlin.gradle.plugin.KotlinTargetHierarchy.SourceSetTree | ||
import org.jetbrains.kotlin.gradle.targets.native.tasks.KotlinNativeSimulatorTest | ||
|
||
plugins { | ||
kotlin("multiplatform") | ||
kotlin("native.cocoapods") | ||
id("com.android.library") | ||
id("org.jetbrains.dokka") | ||
id("maven-publish") | ||
} | ||
|
||
repositories { | ||
maven("https://mobile.maven.couchbase.com/maven2/dev/") | ||
} | ||
|
||
kotlin { | ||
explicitApiWarning() | ||
|
||
jvmToolchain(8) | ||
|
||
androidTarget { | ||
publishLibraryVariants("release") | ||
} | ||
@OptIn(ExperimentalKotlinGradlePluginApi::class) | ||
targetHierarchy.android { | ||
instrumentedTest.sourceSetTree.set(SourceSetTree.test) | ||
unitTest.sourceSetTree.set(SourceSetTree.unitTest) | ||
} | ||
|
||
jvm() | ||
ios() | ||
iosSimulatorArm64() | ||
|
||
cocoapods { | ||
name = "CouchbaseLite-Enterprise-KMP-Paging" | ||
homepage = "https://github.com/udobny/couchbase-lite-kmp" | ||
authors = "Couchbase, Jeff Lockhart" | ||
license = "Custom, Apache License, Version 2.0" | ||
summary = "Couchbase Lite Enterprise Edition for Kotlin Multiplatform AndroidX Paging Extensions" | ||
ios.deploymentTarget = "9.0" | ||
framework { | ||
baseName = this@cocoapods.name.replace('-', '_') | ||
isStatic = false | ||
} | ||
pod("CouchbaseLite-Enterprise") { | ||
version = libs.versions.couchbase.lite.objc.get() | ||
linkOnly = true | ||
} | ||
} | ||
|
||
sourceSets { | ||
val commonMain by getting { | ||
dependencies { | ||
api(projects.couchbaseLiteEeKtx) | ||
api(libs.paging) | ||
} | ||
} | ||
val commonTest by getting { | ||
dependencies { | ||
implementation(projects.testingSupportEe) | ||
implementation(libs.kotlinx.coroutines.test) | ||
implementation(libs.kotlinx.atomicfu) | ||
} | ||
} | ||
val iosMain by getting | ||
val iosTest by getting | ||
val iosSimulatorArm64Main by getting { | ||
dependsOn(iosMain) | ||
} | ||
val iosSimulatorArm64Test by getting { | ||
dependsOn(iosTest) | ||
} | ||
} | ||
} | ||
|
||
android { | ||
namespace = "com.udobny.kmp.couchbase.lite.paging" | ||
compileSdk = 33 | ||
defaultConfig { | ||
minSdk = 22 | ||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
// required until AGP 8.1.0-alpha09+ | ||
// https://kotlinlang.org/docs/gradle-configure-project.html#gradle-java-toolchains-support | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
} | ||
|
||
// Documentation Jar | ||
|
||
val dokkaOutputDir = buildDir.resolve("dokka") | ||
|
||
tasks.dokkaHtml.configure { | ||
outputDirectory.set(dokkaOutputDir) | ||
} | ||
|
||
val javadocJar = tasks.register<Jar>("javadocJar") { | ||
dependsOn(tasks.dokkaHtml) | ||
archiveClassifier.set("javadoc") | ||
from(dokkaOutputDir) | ||
} | ||
|
||
publishing.publications.withType<MavenPublication> { | ||
artifact(javadocJar) | ||
} | ||
|
||
tasks.withType<KotlinNativeSimulatorTest> { | ||
device.set("iPhone 14") | ||
} |
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 @@ | ||
../couchbase-lite-paging/src |
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
3 changes: 0 additions & 3 deletions
3
couchbase-lite-ktx/src/appleTest/kotlin/com/udobny/kmp/test/Annotations.kt
This file was deleted.
Oops, something went wrong.
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
3 changes: 0 additions & 3 deletions
3
couchbase-lite-ktx/src/commonTest/kotlin/com/udobny/kmp/couchbase/lite/ktx/PlatformUtils.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.