Skip to content

Commit

Permalink
v1.0.0-beta06
Browse files Browse the repository at this point in the history
  • Loading branch information
Foso committed May 10, 2022
1 parent 33de121 commit 883f15e
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.0.0-beta05
========================================
- fix issue with KSP 1.0.5 #19

1.0.0-beta05
========================================
- fixed: Custom Http Method with @Body is now possible #6
Expand Down
4 changes: 2 additions & 2 deletions example/AndroidOnlyExample/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ android {
}

dependencies {
ksp('de.jensklingenberg.ktorfit:ktorfit-ksp:1.0.0-beta05')
implementation("de.jensklingenberg.ktorfit:ktorfit-lib:1.0.0-beta05")
ksp('de.jensklingenberg.ktorfit:ktorfit-ksp:1.0.0-beta06')
implementation("de.jensklingenberg.ktorfit:ktorfit-lib:1.0.0-beta06")
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.4.1'
implementation 'androidx.activity:activity-compose:1.4.0'
Expand Down
4 changes: 2 additions & 2 deletions example/MultiplatformExample/shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ plugins {
kotlin("multiplatform")
kotlin("native.cocoapods")
id("com.android.library")
id("com.google.devtools.ksp") version "1.6.20-1.0.4"
id("com.google.devtools.ksp") version "1.6.21-1.0.5"
id("kotlinx-serialization")

}

version = "1.0"
val ktorVersion = "2.0.1"
val ktorfitVersion = "1.0.0-beta05"
val ktorfitVersion = "1.0.0-beta06"

kotlin {
android()
Expand Down
2 changes: 1 addition & 1 deletion ktorfit-ksp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ tasks.withType<KotlinCompile> {


group = "de.jensklingenberg.ktorfit"
version = "1.0.0-beta05"
version = "1.0.0-beta06"

dependencies {
implementation("com.google.devtools.ksp:symbol-processing-api:$kspVersion")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import de.jensklingenberg.ktorfit.ktorfitError
import de.jensklingenberg.ktorfit.model.ClassData
import de.jensklingenberg.ktorfit.model.FunctionData
import de.jensklingenberg.ktorfit.model.KtorfitError.Companion.INTERFACE_NEEDS_TO_HAVE_A_PACKAGE
import de.jensklingenberg.ktorfit.resolveTypeName
import java.io.File


Expand Down Expand Up @@ -40,14 +41,18 @@ private fun MutableList<String>.addIfAbsent(text: String) {

fun toClassData(ksClassDeclaration: KSClassDeclaration, logger: KSPLogger): ClassData {

val functionDataList: List<FunctionData> = getFunctionDataList(ksClassDeclaration.getDeclaredFunctions().toList(), logger)
val functionDataList: List<FunctionData> =
getFunctionDataList(ksClassDeclaration.getDeclaredFunctions().toList(), logger)

val imports = getImports(ksClassDeclaration)
val packageName = ksClassDeclaration.packageName.asString()
val className = ksClassDeclaration.simpleName.asString()

val supertypes =
ksClassDeclaration.superTypes.toList().mapNotNull { it.resolve().declaration.qualifiedName?.asString() }
ksClassDeclaration.superTypes.toList().filterNot {
/** In KSP Any is a supertype of an interface */
it.resolve().resolveTypeName() == "Any"
}.mapNotNull { it.resolve().declaration.qualifiedName?.asString() }
val properties = ksClassDeclaration.getAllProperties().toList()

if (packageName.isEmpty()) {
Expand Down
2 changes: 1 addition & 1 deletion ktorfit-lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}

version = "1.0.0-beta05"
version = "1.0.0-beta06"
val ktorVersion = "2.0.1"
kotlin {

Expand Down

0 comments on commit 883f15e

Please sign in to comment.