Skip to content

Commit

Permalink
Release 1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Foso authored Oct 9, 2023
1 parent c849c06 commit a17da7d
Show file tree
Hide file tree
Showing 17 changed files with 181 additions and 44 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ on:
branches:
- 'master'
- 'release/**'
concurrency:
group: ${{ github.head_ref }}
cancel-in-progress: true
jobs:
api_check:
name: API check
Expand Down Expand Up @@ -53,4 +56,4 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build and test with Gradle
run: ./gradlew licensee :ktorfit-annotations:publishToMavenLocal :ktorfit-ksp:test :ktorfit-lib-common:jvmTest :ktorfit-converters:call:publishToMavenLocal
run: ./gradlew licensee :ktorfit-annotations:publishToMavenLocal :ktorfit-ksp:test :ktorfit-lib-common:jvmTest :ktorfit-converters:call:publishToMavenLocal :ktorfit-converters:flow:publishToMavenLocal
130 changes: 128 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:

jobs:
publish:
publish-annotations:
runs-on: macos-latest
steps:
- name: Checkout
Expand All @@ -19,7 +19,133 @@ jobs:
- uses: gradle/gradle-build-action@v2

- name: Publish release
run: ./gradlew clean :ktorfit-annotations:publishAllPublicationsToMavenCentralRepository :ktorfit-ksp:publishAllPublicationsToMavenCentralRepository :ktorfit-lib:publishAllPublicationsToMavenCentralRepository :ktorfit-lib-common:publishAllPublicationsToMavenCentralRepository :compiler-plugin:publishAllPublicationsToMavenCentralRepository :ktorfit-converters:call:publishAllPublicationsToMavenCentralRepository :ktorfit-converters:flow:publishAllPublicationsToMavenCentralRepository
run: ./gradlew :ktorfit-annotations:publishAllPublicationsToMavenCentralRepository
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_IN_MEMORY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
publish-ksp:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install JDK 11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11

- uses: gradle/gradle-build-action@v2

- name: Publish release
run: ./gradlew :ktorfit-ksp:publishAllPublicationsToMavenCentralRepository
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_IN_MEMORY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
publish-converters-call:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install JDK 11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11

- uses: gradle/gradle-build-action@v2

- name: Publish release
run: ./gradlew :ktorfit-converters:call:publishAllPublicationsToMavenCentralRepository
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_IN_MEMORY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
publish-compiler-plugin:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install JDK 11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11

- uses: gradle/gradle-build-action@v2

- name: Publish release
run: ./gradlew :ktorfit-converters:call:publishAllPublicationsToMavenCentralRepository
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_IN_MEMORY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
publish-converters-flow:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install JDK 11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11

- uses: gradle/gradle-build-action@v2

- name: Publish release
run: ./gradlew :compiler-plugin:publishAllPublicationsToMavenCentralRepository
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_IN_MEMORY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
publish-ktorfit-lib-common:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install JDK 11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11

- uses: gradle/gradle-build-action@v2

- name: Publish release
run: ./gradlew :ktorfit-lib-common:publishAllPublicationsToMavenCentralRepository
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_IN_MEMORY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
publish-ktorfit-lib:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install JDK 11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11

- uses: gradle/gradle-build-action@v2

- name: Publish release
run: ./gradlew :ktorfit-lib:publishAllPublicationsToMavenCentralRepository
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,30 +32,30 @@ build.gradle.kts:

```kotlin
plugins {
id("de.jensklingenberg.ktorfit") version "1.7.0"
id("de.jensklingenberg.ktorfit") version "1.8.0"
}
```

build.gradle

```kotlin
plugins {
id("de.jensklingenberg.ktorfit") version "1.7.0"
id("de.jensklingenberg.ktorfit") version "1.8.0"
}
```

KSP:

```kotlin
de.jensklingenberg.ktorfit:ktorfit - ksp:1.7.0
de.jensklingenberg.ktorfit:ktorfit - ksp:1.8.0
```

Ktorfit-lib/-light:

```kotlin
implementation("de.jensklingenberg.ktorfit:ktorfit-lib:1.7.0")
implementation("de.jensklingenberg.ktorfit:ktorfit-lib:1.8.0")
or
implementation("de.jensklingenberg.ktorfit:ktorfit-lib-light:1.7.0")
implementation("de.jensklingenberg.ktorfit:ktorfit-lib-light:1.8.0")
```

## 👷 Project Structure
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ buildscript {
classpath(libs.gradle.maven.publish.plugin)
classpath(libs.kotlin.serialization)
classpath(libs.android.build.gradle)
classpath (libs.licensee.gradle.plugin)
classpath(libs.licensee.gradle.plugin)
classpath(libs.ktorfit.gradle.plugin)
}
}
Expand Down
13 changes: 8 additions & 5 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,19 @@ Unreleased
### Added

### Changed
- Allow nullable body type #424
- Use @Path parameter name as default value #426
- Use @Query parameter name as default value #428
- Use @Field parameter name as default value #430
- You can now also get exceptions like NetworkException with SuspendResponseConverter. #389
- Allow nullable body type [#424](https://github.com/Foso/Ktorfit/issues/424)
- Use @Path parameter name as default value [#426](https://github.com/Foso/Ktorfit/issues/426)
- Use @Query parameter name as default value [#428](https://github.com/Foso/Ktorfit/issues/428)
- Use @Field parameter name as default value [#430](https://github.com/Foso/Ktorfit/issues/428)
- You can now also get exceptions like NetworkException with SuspendResponseConverter.[#389](https://github.com/Foso/Ktorfit/issues/389)

### Deprecated
- Deprecated the `convert` function in the `SuspendResponseConverter` interface
See: https://foso.github.io/migration/#from-170-to-180

! When you still use the deprecated converters because there are use cases which you can't do with the converter factories, please write a GitHub Issue.
The deprecated converters will be removed in one of the upcoming versions

### Removed
### Fixed
### Security
Expand Down
30 changes: 20 additions & 10 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,49 @@
</p>

# Introduction
Ktorfit is a HTTP client/Kotlin Symbol Processor for Kotlin Multiplatform (Js, Jvm, Android, iOS, Linux) using [KSP](https://github.com/google/ksp) and [Ktor clients](https://ktor.io/docs/getting-started-ktor-client.html) inspired by [Retrofit](https://square.github.io/retrofit/)

## Compatibility
Ktorfit is a HTTP client/Kotlin Symbol Processor for Kotlin Multiplatform (Js, Jvm, Android, iOS, Linux)
using [KSP](https://github.com/google/ksp) and [Ktor clients](https://ktor.io/docs/getting-started-ktor-client.html)
inspired by [Retrofit](https://square.github.io/retrofit/)

| Ktorfit-version | Kotlin | KSP | Ktor |
|--------------------------|:----------------:|:-----------------------:|:---------:|
| **_1.7.0-1.9.20-Beta2_** | **1.9.20-Beta2** | **1.9.20-Beta2-1.0.13** | **2.3.4** |
| **_1.7.0_** | **1.9.10** | **1.0.13** | **2.3.4** |
| **_1.6.0_** | **1.9.10** | **1.0.13** | **2.3.3** |
| **_1.5.0_** | **1.9.0** | **1.0.13** | **2.3.2** |
| **_1.4.3_** | **1.8.20** | **1.0.11** | **2.3.1** |
## Compatibility

| Ktorfit-version | Kotlin | KSP | Ktor |
|--------------------------|:-------------------------:|:-----------------------:|:---------:|
| **_1.8.0_** | **1.9.10 / 1.9.20-Beta2** | **1.0.13** | **2.3.4** |
| **_1.7.0-1.9.20-Beta2_** | **1.9.20-Beta2** | **1.9.20-Beta2-1.0.13** | **2.3.4** |
| **_1.7.0_** | **1.9.10** | **1.0.13** | **2.3.4** |
| **_1.6.0_** | **1.9.10** | **1.0.13** | **2.3.3** |
| **_1.5.0_** | **1.9.0** | **1.0.13** | **2.3.2** |
| **_1.4.3_** | **1.8.20** | **1.0.11** | **2.3.1** |

# Installation

Please see [Installation](./installation.md)

# Quick start

Please see [Quick start](./quick-start.md)

## Requests

See [Requests](./requests.md)

## Converters

See documentation [Here](./converters/converters.md)

## Changelog

See [changelog](./CHANGELOG.md)

## Acknowledgments
Some parts of this project are reusing ideas that are originally coming from [Retrofit](https://square.github.io/retrofit/) from [Square](https://github.com/square). Thank you for Retrofit!

Some parts of this project are reusing ideas that are originally coming
from [Retrofit](https://square.github.io/retrofit/) from [Square](https://github.com/square). Thank you for Retrofit!

Thanks to JetBrains for Ktor and Kotlin!

## Contributions

When you find unexpected behaviour please write an [issue](https://github.com/Foso/Ktorfit/issues/new/choose)
4 changes: 2 additions & 2 deletions example/AndroidOnlyExample/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
id("org.jetbrains.kotlin.android")
id("com.google.devtools.ksp") version "1.9.10-1.0.13"
id("org.jetbrains.kotlin.plugin.serialization") version "1.9.10"
id("de.jensklingenberg.ktorfit") version "1.7.0"
id("de.jensklingenberg.ktorfit") version "1.8.0"
}


Expand Down Expand Up @@ -51,7 +51,7 @@ tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach
}
}

val ktorfit = "1.7.0"
val ktorfit = "1.8.0"
val ktor = "2.3.4"
val compose_ui_version = "1.5.1"
dependencies {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 2 additions & 2 deletions example/MultiplatformExample/shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ plugins {
id("com.android.library")
id("com.google.devtools.ksp") version "1.9.10-1.0.13"
id("kotlinx-serialization")
id("de.jensklingenberg.ktorfit") version "1.7.0"
id("de.jensklingenberg.ktorfit") version "1.8.0"
}

version = "1.0"
val ktorVersion = "2.3.4"
val ktorfitVersion = "1.7.0"
val ktorfitVersion = "1.8.0"

kotlin {
jvmToolchain(8)
Expand Down
2 changes: 1 addition & 1 deletion gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
}

group = "de.jensklingenberg.ktorfit"
version = "1.8.0-SNAPSHOT"
version = "1.8.0"


allprojects {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ open class KtorfitGradleConfiguration {
/**
* version number of the compiler plugin
*/
@Deprecated("Update the this Gradle plugin instead of updating this version")
var version: String = "1.8.0-SNAPSHOT" // remember to bump this version before any release!
@Deprecated("Update the Gradle plugin instead of updating this version")
var version: String = "1.8.0" // remember to bump this version before any release!

/**
* used to get debug information from the compiler plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class KtorfitGradlePlugin : Plugin<Project> {
with(project) {
extensions.create(GRADLE_TASKNAME, KtorfitGradleConfiguration::class.java)

val flowConverterDependencyNotation = "de.jensklingenberg.ktorfit:ktorfit-converters-flow:1.7.0"
val callConverterDependencyNotation = "de.jensklingenberg.ktorfit:ktorfit-converters-call:1.7.0"
val flowConverterDependencyNotation = "de.jensklingenberg.ktorfit:ktorfit-converters-flow:1.8.0"
val callConverterDependencyNotation = "de.jensklingenberg.ktorfit:ktorfit-converters-call:1.8.0"

when (kotlinExtension) {
is KotlinSingleTargetExtension<*> -> {
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ kctfork = "0.3.2"
kotlin = "1.9.10"
kotlinPoet = "1.14.2"
kspVersion = "1.9.10-1.0.13"
ktorfit = "1.8.0-SNAPSHOT"
ktorfitGradlePlugin = "1.7.0"
ktorfit = "1.8.0"
ktorfitGradlePlugin = "1.8.0"
ktorVersion = "2.3.4"
mockk = "1.13.8"
mockito-kotlin = "4.1.0"
Expand Down
5 changes: 0 additions & 5 deletions kotlin-js-store/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -510,11 +510,6 @@ tr46@~0.0.3:
resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a"
integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==

[email protected]:
version "4.7.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235"
integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==

[email protected]:
version "5.0.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b"
Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ extra:
site:
images: '../../images'
ktorfit:
release: "1.7.0"
release: "1.8.0"
ktor:
release: "2.3.4"
social:
Expand Down
Loading

0 comments on commit a17da7d

Please sign in to comment.