From f3f488ca1313f12fae969563e2c1537fdb18607a Mon Sep 17 00:00:00 2001 From: Jens Klingenberg Date: Thu, 2 Mar 2023 20:28:25 +0100 Subject: [PATCH] Release 1.0.0 --- compiler-plugin/build.gradle.kts | 2 +- docs/CHANGELOG.md | 5 +++- .../AndroidOnlyExample/app/build.gradle.kts | 7 +++-- example/AndroidOnlyExample/build.gradle | 4 +-- .../androidApp/build.gradle.kts | 4 +-- .../shared/build.gradle.kts | 26 ++++++++++++++++--- .../ktorfit/gradle/KtorfitGradleSubPlugin.kt | 2 +- gradle/libs.versions.toml | 8 +++--- ktorfit-annotations/build.gradle.kts | 2 +- ktorfit-ksp/build.gradle.kts | 2 +- ktorfit-lib/build.gradle.kts | 2 +- .../ktorfit/internal/KtorfitClient.kt | 2 +- sandbox/build.gradle.kts | 2 +- 13 files changed, 46 insertions(+), 22 deletions(-) diff --git a/compiler-plugin/build.gradle.kts b/compiler-plugin/build.gradle.kts index c2af2d51e..5edd8d64e 100644 --- a/compiler-plugin/build.gradle.kts +++ b/compiler-plugin/build.gradle.kts @@ -23,7 +23,7 @@ mavenPublishing { } group = "de.jensklingenberg.ktorfit" -version = libs.versions.ktorfit.compiler.get() +version = libs.versions.ktorfit.asProvider().get() dependencies { compileOnly(libs.autoService) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 6117ddf31..3a1e9493a 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,5 +1,8 @@ -1.0.0 (not released) +1.0.0 (02-03-2023) ======================================== +This project is now following [semver](https://semver.org/) + +NEW: - internal optimizations - throw compile error when generated class can not be found diff --git a/example/AndroidOnlyExample/app/build.gradle.kts b/example/AndroidOnlyExample/app/build.gradle.kts index 44d4dbfcd..c3ff0391d 100644 --- a/example/AndroidOnlyExample/app/build.gradle.kts +++ b/example/AndroidOnlyExample/app/build.gradle.kts @@ -6,7 +6,11 @@ plugins { id ("de.jensklingenberg.ktorfit") version "1.0.0" } +val ktorfit = "1.0.0" +configure { + version = ktorfit +} android { namespace= "de.jensklingenberg.androidonlyexample" compileSdk= 33 @@ -49,8 +53,7 @@ android { } } } -val ktorfit = "1.0.0-beta18" -val ktor = "2.2.3" +val ktor = "2.2.4" val compose_ui_version = "1.3.3" dependencies { ksp("de.jensklingenberg.ktorfit:ktorfit-ksp:$ktorfit") diff --git a/example/AndroidOnlyExample/build.gradle b/example/AndroidOnlyExample/build.gradle index eb5c5d7e5..443cab9ec 100644 --- a/example/AndroidOnlyExample/build.gradle +++ b/example/AndroidOnlyExample/build.gradle @@ -1,6 +1,6 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id 'com.android.application' version '7.3.1' apply false - id 'com.android.library' version '7.3.1' apply false + id 'com.android.application' version '7.4.1' apply false + id 'com.android.library' version '7.4.1' apply false id 'org.jetbrains.kotlin.android' version '1.8.0' apply false } \ No newline at end of file diff --git a/example/MultiplatformExample/androidApp/build.gradle.kts b/example/MultiplatformExample/androidApp/build.gradle.kts index cd7075818..6ae244133 100644 --- a/example/MultiplatformExample/androidApp/build.gradle.kts +++ b/example/MultiplatformExample/androidApp/build.gradle.kts @@ -4,11 +4,11 @@ plugins { } android { - compileSdk = 32 + compileSdk = 33 defaultConfig { applicationId = "com.example.myapplication.android" minSdk = 21 - targetSdk = 32 + targetSdk = 33 versionCode = 1 versionName = "1.0" } diff --git a/example/MultiplatformExample/shared/build.gradle.kts b/example/MultiplatformExample/shared/build.gradle.kts index 60e1f2674..142c08696 100644 --- a/example/MultiplatformExample/shared/build.gradle.kts +++ b/example/MultiplatformExample/shared/build.gradle.kts @@ -2,21 +2,39 @@ plugins { kotlin("multiplatform") kotlin("native.cocoapods") id("com.android.library") - id("com.google.devtools.ksp") version "1.8.0-1.0.8" + id("com.google.devtools.ksp") version "1.8.0-1.0.9" id("kotlinx-serialization") id("de.jensklingenberg.ktorfit") version "1.0.0" } version = "1.0" -val ktorVersion = "2.2.3" -val ktorfitVersion = "1.0.0-beta18" +val ktorVersion = "2.2.4" +val ktorfitVersion = "1.0.0" +configure { + enabled = true + version = ktorfitVersion +} + +tasks.withType { + kotlinOptions.jvmTarget = "1.8" +} + +java { + toolchain { + languageVersion.set(JavaLanguageVersion.of(11)) + } +} kotlin { android() iosX64() iosArm64() iosSimulatorArm64() - jvm() + jvm(){ + compilations.all { + kotlinOptions.jvmTarget = "1.8" + } + } macosX64() js(IR) { this.nodejs() diff --git a/gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitGradleSubPlugin.kt b/gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitGradleSubPlugin.kt index 1601665af..5d50f2df8 100644 --- a/gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitGradleSubPlugin.kt +++ b/gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitGradleSubPlugin.kt @@ -16,7 +16,7 @@ open class KtorfitGradleConfiguration { /** * version number of the compiler plugin */ - var version: String = "1.0.0-beta17" // remember to bump this version before any release! + var version: String = "1.0.0" // remember to bump this version before any release! /** * used to get debug information from the compiler plugin diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 575953410..f62fac9a9 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -6,10 +6,10 @@ kctfork = "0.2.1" kotlin = "1.8.0" kotlinPoet = "1.12.0" kspVersion = "1.8.0-1.0.8" -ktorfit = "1.0.0-SNAPSHOT" -ktorfit-compiler = "1.0.0-SNAPSHOT" -ktorfit-ksp = "1.0.0-SNAPSHOT" -ktorfit-lib = "1.0.0-SNAPSHOT" +ktorfit = "1.0.0" +ktorfit-compiler = "1.0.0" +ktorfit-ksp = "1.0.0" +ktorfit-lib = "1.0.0" ktorVersion = "2.2.4" [libraries] diff --git a/ktorfit-annotations/build.gradle.kts b/ktorfit-annotations/build.gradle.kts index 147a50a15..904014f2f 100644 --- a/ktorfit-annotations/build.gradle.kts +++ b/ktorfit-annotations/build.gradle.kts @@ -18,7 +18,7 @@ tasks.withType { kotlinOptions.jvmTarget = "1.8" } -version = libs.versions.ktorfit.ksp.get() +version = libs.versions.ktorfit.asProvider().get() kotlin { diff --git a/ktorfit-ksp/build.gradle.kts b/ktorfit-ksp/build.gradle.kts index bb868db97..4efc4c471 100644 --- a/ktorfit-ksp/build.gradle.kts +++ b/ktorfit-ksp/build.gradle.kts @@ -30,7 +30,7 @@ mavenPublishing { } group = "de.jensklingenberg.ktorfit" -version = libs.versions.ktorfit.ksp.get() +version = libs.versions.ktorfit.asProvider().get() dependencies { implementation(projects.ktorfitAnnotations) diff --git a/ktorfit-lib/build.gradle.kts b/ktorfit-lib/build.gradle.kts index 66ca09bd6..c165f92aa 100644 --- a/ktorfit-lib/build.gradle.kts +++ b/ktorfit-lib/build.gradle.kts @@ -35,7 +35,7 @@ tasks.withType { kotlinOptions.jvmTarget = "1.8" } -version = libs.versions.ktorfit.lib.get() +version = libs.versions.ktorfit.asProvider().get() kotlin { explicitApi() diff --git a/ktorfit-lib/src/commonMain/kotlin/de/jensklingenberg/ktorfit/internal/KtorfitClient.kt b/ktorfit-lib/src/commonMain/kotlin/de/jensklingenberg/ktorfit/internal/KtorfitClient.kt index 8a627e04f..f77948866 100644 --- a/ktorfit-lib/src/commonMain/kotlin/de/jensklingenberg/ktorfit/internal/KtorfitClient.kt +++ b/ktorfit-lib/src/commonMain/kotlin/de/jensklingenberg/ktorfit/internal/KtorfitClient.kt @@ -116,7 +116,7 @@ internal class KtorfitClient(private val ktorfit: Ktorfit) : Client { val requestConverter = ktorfit.requestConverters.firstOrNull { it.supportedType(parameterType, requestType) } - ?: throw IllegalArgumentException("No RequestConverter found to convert ${parameterType.qualifiedName} to ${requestType.qualifiedName}") + ?: throw IllegalArgumentException("No RequestConverter found to convert ${parameterType.simpleName} to ${requestType.simpleName}") return requestType.cast(requestConverter.convert(data)) } diff --git a/sandbox/build.gradle.kts b/sandbox/build.gradle.kts index a02e97110..8c3824a71 100644 --- a/sandbox/build.gradle.kts +++ b/sandbox/build.gradle.kts @@ -8,7 +8,7 @@ version = "1.0-SNAPSHOT" configure { enabled = true - version = libs.versions.ktorfit.compiler.get() + version = libs.versions.ktorfit.asProvider().get() } ksp { arg("Ktorfit_Errors", "1")