-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move Call converter to own module (#433)
- Loading branch information
Showing
17 changed files
with
229 additions
and
43 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
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
public final class de/jensklingenberg/ktorfit/converter/builtin/CallConverterFactory : de/jensklingenberg/ktorfit/converter/Converter$Factory { | ||
public fun <init> ()V | ||
public fun requestParameterConverter (Lkotlin/reflect/KClass;Lkotlin/reflect/KClass;)Lde/jensklingenberg/ktorfit/converter/Converter$RequestParameterConverter; | ||
public fun responseConverter (Lde/jensklingenberg/ktorfit/internal/TypeData;Lde/jensklingenberg/ktorfit/Ktorfit;)Lde/jensklingenberg/ktorfit/converter/Converter$ResponseConverter; | ||
public fun suspendResponseConverter (Lde/jensklingenberg/ktorfit/internal/TypeData;Lde/jensklingenberg/ktorfit/Ktorfit;)Lde/jensklingenberg/ktorfit/converter/Converter$SuspendResponseConverter; | ||
} | ||
|
||
public final class de/jensklingenberg/ktorfit/converter/builtin/CallResponseConverter : de/jensklingenberg/ktorfit/converter/SuspendResponseConverter, de/jensklingenberg/ktorfit/converter/request/ResponseConverter { | ||
public fun <init> ()V | ||
public fun supportedType (Lde/jensklingenberg/ktorfit/internal/TypeData;Z)Z | ||
public fun wrapResponse (Lde/jensklingenberg/ktorfit/internal/TypeData;Lkotlin/jvm/functions/Function1;Lde/jensklingenberg/ktorfit/Ktorfit;)Ljava/lang/Object; | ||
public fun wrapSuspendResponse (Lde/jensklingenberg/ktorfit/internal/TypeData;Lkotlin/jvm/functions/Function1;Lde/jensklingenberg/ktorfit/Ktorfit;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; | ||
} | ||
|
||
public final class de/jensklingenberg/ktorfit/converters/call/BuildConfig { | ||
public static final field BUILD_TYPE Ljava/lang/String; | ||
public static final field DEBUG Z | ||
public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; | ||
public fun <init> ()V | ||
} | ||
|
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,14 @@ | ||
public final class de/jensklingenberg/ktorfit/converter/builtin/CallConverterFactory : de/jensklingenberg/ktorfit/converter/Converter$Factory { | ||
public fun <init> ()V | ||
public fun requestParameterConverter (Lkotlin/reflect/KClass;Lkotlin/reflect/KClass;)Lde/jensklingenberg/ktorfit/converter/Converter$RequestParameterConverter; | ||
public fun responseConverter (Lde/jensklingenberg/ktorfit/internal/TypeData;Lde/jensklingenberg/ktorfit/Ktorfit;)Lde/jensklingenberg/ktorfit/converter/Converter$ResponseConverter; | ||
public fun suspendResponseConverter (Lde/jensklingenberg/ktorfit/internal/TypeData;Lde/jensklingenberg/ktorfit/Ktorfit;)Lde/jensklingenberg/ktorfit/converter/Converter$SuspendResponseConverter; | ||
} | ||
|
||
public final class de/jensklingenberg/ktorfit/converter/builtin/CallResponseConverter : de/jensklingenberg/ktorfit/converter/SuspendResponseConverter, de/jensklingenberg/ktorfit/converter/request/ResponseConverter { | ||
public fun <init> ()V | ||
public fun supportedType (Lde/jensklingenberg/ktorfit/internal/TypeData;Z)Z | ||
public fun wrapResponse (Lde/jensklingenberg/ktorfit/internal/TypeData;Lkotlin/jvm/functions/Function1;Lde/jensklingenberg/ktorfit/Ktorfit;)Ljava/lang/Object; | ||
public fun wrapSuspendResponse (Lde/jensklingenberg/ktorfit/internal/TypeData;Lkotlin/jvm/functions/Function1;Lde/jensklingenberg/ktorfit/Ktorfit;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; | ||
} | ||
|
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,174 @@ | ||
plugins { | ||
kotlin("multiplatform") | ||
id("maven-publish") | ||
id("signing") | ||
id("com.vanniktech.maven.publish") | ||
id("com.android.library") | ||
alias(libs.plugins.binaryCompatibilityValidator) | ||
id("app.cash.licensee") | ||
} | ||
|
||
licensee { | ||
allow("Apache-2.0") | ||
allow("MIT") | ||
} | ||
|
||
|
||
val enableSigning = true | ||
|
||
mavenPublishing { | ||
|
||
coordinates( | ||
"de.jensklingenberg.ktorfit", | ||
"ktorfit-converters-call", | ||
libs.versions.ktorfit.asProvider().get() | ||
) | ||
publishToMavenCentral() | ||
// publishToMavenCentral(SonatypeHost.S01) for publishing through s01.oss.sonatype.org | ||
if (enableSigning) { | ||
signAllPublications() | ||
} | ||
} | ||
|
||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> { | ||
kotlinOptions.jvmTarget = "1.8" | ||
} | ||
|
||
|
||
kotlin { | ||
explicitApi() | ||
jvm { | ||
|
||
} | ||
js(IR) { | ||
this.nodejs() | ||
binaries.executable() // not applicable to BOTH, see details below | ||
} | ||
androidTarget { | ||
publishLibraryVariants("release", "debug") | ||
} | ||
iosArm64() | ||
iosX64() | ||
iosSimulatorArm64() | ||
|
||
watchosArm32() | ||
watchosArm64() | ||
watchosX64() | ||
watchosSimulatorArm64() | ||
tvosArm64() | ||
tvosX64() | ||
tvosSimulatorArm64() | ||
macosX64() | ||
macosArm64() | ||
linuxX64 { | ||
binaries { | ||
executable() | ||
} | ||
} | ||
|
||
ios("ios") { | ||
binaries { | ||
framework { | ||
baseName = "library" | ||
} | ||
} | ||
} | ||
mingwX64() | ||
sourceSets { | ||
val commonMain by getting { | ||
dependencies { | ||
implementation(projects.ktorfitLibCommon) | ||
} | ||
} | ||
val linuxX64Main by getting | ||
val mingwX64Main by getting | ||
val androidMain by getting | ||
val jvmMain by getting | ||
val iosX64Main by getting | ||
val iosArm64Main by getting | ||
val iosSimulatorArm64Main by getting | ||
val jsMain by getting | ||
val iosMain by getting { | ||
dependsOn(commonMain) | ||
iosX64Main.dependsOn(this) | ||
iosArm64Main.dependsOn(this) | ||
iosSimulatorArm64Main.dependsOn(this) | ||
dependencies { | ||
|
||
} | ||
} | ||
} | ||
} | ||
val javadocJar by tasks.registering(Jar::class) { | ||
archiveClassifier.set("javadoc") | ||
} | ||
|
||
android { | ||
compileSdk = 33 | ||
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml") | ||
defaultConfig { | ||
minSdk = 21 | ||
targetSdk = 33 | ||
} | ||
namespace = "de.jensklingenberg.ktorfit.converters.call" | ||
} | ||
|
||
|
||
|
||
publishing { | ||
publications { | ||
create<MavenPublication>("default") { | ||
artifact(tasks["sourcesJar"]) | ||
// artifact(tasks["javadocJar"]) | ||
|
||
pom { | ||
name.set(project.name) | ||
description.set("Flow Converter for Ktorfit") | ||
url.set("https://github.com/Foso/Ktorfit") | ||
|
||
licenses { | ||
license { | ||
name.set("Apache License 2.0") | ||
url.set("https://github.com/Foso/Ktorfit/blob/master/LICENSE.txt") | ||
} | ||
} | ||
scm { | ||
url.set("https://github.com/Foso/Ktorfit") | ||
connection.set("scm:git:git://github.com/Foso/Ktorfit.git") | ||
} | ||
developers { | ||
developer { | ||
name.set("Jens Klingenberg") | ||
url.set("https://github.com/Foso") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
if ( | ||
hasProperty("sonatypeUsername") && | ||
hasProperty("sonatypePassword") && | ||
hasProperty("sonatypeSnapshotUrl") && | ||
hasProperty("sonatypeReleaseUrl") | ||
) { | ||
maven { | ||
val url = when { | ||
"SNAPSHOT" in version.toString() -> property("sonatypeSnapshotUrl") | ||
else -> property("sonatypeReleaseUrl") | ||
} as String | ||
setUrl(url) | ||
credentials { | ||
username = property("sonatypeUsername") as String | ||
password = property("sonatypePassword") as String | ||
} | ||
} | ||
} | ||
|
||
} | ||
} | ||
|
||
rootProject.plugins.withType(org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin::class) { | ||
rootProject.the(org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension::class).nodeVersion = "18.0.0" | ||
} |
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,2 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest /> |
File renamed without changes.
File renamed without changes.
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
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
Oops, something went wrong.