Skip to content

Commit

Permalink
Add LinuxArm64 target (#476)
Browse files Browse the repository at this point in the history
  • Loading branch information
Foso authored Nov 5, 2023
1 parent eaecc0d commit 615e151
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 13 deletions.
2 changes: 2 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ But there is no intent to bump the Ktorfit major version for every KSP update.

Unreleased
========================================
### Added
- LinuxArm64 support [#475](https://github.com/Foso/Ktorfit/issues/475)

### Changed
- KSP 1.0.14 required
Expand Down
8 changes: 6 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,15 @@ kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotl

#Ktor
ktor-client-cio-jvm = { module = "io.ktor:ktor-client-cio-jvm", version.ref = "ktorVersion" }
ktor-client-cio-linux = { module = "io.ktor:ktor-client-cio-linuxx64", version.ref = "ktorVersion" }
ktor-client-cio-linuxX64 = { module = "io.ktor:ktor-client-cio-linuxx64", version.ref = "ktorVersion" }
ktor-client-cio-linuxArm64 = { module = "io.ktor:ktor-client-cio-linuxarm64", version.ref = "ktorVersion" }

ktor-client-content-negotiation = { module = "io.ktor:ktor-client-content-negotiation", version.ref = "ktorVersion" }
ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktorVersion" }
ktor-client-core-jvm = { module = "io.ktor:ktor-client-core-jvm", version.ref = "ktorVersion" }
ktor-client-core-linux = { module = "io.ktor:ktor-client-core-linuxx64", version.ref = "ktorVersion" }
ktor-client-core-linuxX64 = { module = "io.ktor:ktor-client-core-linuxx64", version.ref = "ktorVersion" }
ktor-client-core-linuxArm64 = { module = "io.ktor:ktor-client-core-linuxarm64", version.ref = "ktorVersion" }

ktor-client-core-mingwx64 = { module = "io.ktor:ktor-client-core-mingwx64", version.ref = "ktorVersion" }
ktor-client-curl = { module = "io.ktor:ktor-client-curl", version.ref = "ktorVersion" }
ktor-client-ios = { module = "io.ktor:ktor-client-ios", version.ref = "ktorVersion" }
Expand Down
6 changes: 5 additions & 1 deletion ktorfit-annotations/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ kotlin {
executable()
}
}

linuxArm64{
binaries {
executable()
}
}
listOf(
iosX64(),
iosArm64(),
Expand Down
6 changes: 5 additions & 1 deletion ktorfit-converters/call/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ kotlin {
executable()
}
}

linuxArm64{
binaries {
executable()
}
}
listOf(
iosX64(),
iosArm64(),
Expand Down
6 changes: 5 additions & 1 deletion ktorfit-converters/flow/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ kotlin {
executable()
}
}

linuxArm64{
binaries {
executable()
}
}
listOf(
iosX64(),
iosArm64(),
Expand Down
11 changes: 7 additions & 4 deletions ktorfit-lib-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ kotlin {
executable()
}
}

linuxArm64{
binaries {
executable()
}
}
listOf(
iosX64(),
iosArm64(),
Expand Down Expand Up @@ -118,12 +122,11 @@ kotlin {
}
}

val jvmMain by getting
val jvmTest by getting {
dependencies {
kotlin.srcDir("build/generated/ksp/jvm/jvmTest/")

dependsOn(jvmMain)
dependsOn(jvmMain.get())

implementation(libs.ktor.client.mock)
implementation(libs.junit)
Expand All @@ -134,7 +137,7 @@ kotlin {
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)
Expand Down
16 changes: 14 additions & 2 deletions ktorfit-lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ kotlin {
executable()
}
}
linuxArm64{
binaries {
executable()
}
}

listOf(
iosX64(),
Expand All @@ -91,10 +96,17 @@ kotlin {
}
val linuxX64Main by getting {
dependencies {
implementation(libs.ktor.client.core.linux)
implementation(libs.ktor.client.cio.linux)
implementation(libs.ktor.client.core.linuxX64)
implementation(libs.ktor.client.cio.linuxX64)
}
}
val linuxArm64Main by getting {
dependencies {
implementation(libs.ktor.client.core.linuxArm64)
implementation(libs.ktor.client.cio.linuxArm64)
}
}

val mingwX64Main by getting {
dependencies {
implementation(libs.ktor.client.core.mingwx64)
Expand Down
9 changes: 7 additions & 2 deletions sandbox/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ kotlin {
executable()
}
}
linuxArm64() {
binaries {
executable()
}
}

// macosX64()
mingwX64()
Expand All @@ -71,8 +76,8 @@ kotlin {
dependencies {
implementation(libs.kotlinx.coroutines.core)
implementation(libs.ktor.client.curl)
implementation(libs.ktor.client.core.linux)
implementation(libs.ktor.client.cio.linux)
implementation(libs.ktor.client.core.linuxX64)
implementation(libs.ktor.client.cio.linuxX64)

}
}
Expand Down

0 comments on commit 615e151

Please sign in to comment.