-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle.kts
99 lines (87 loc) · 2.58 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import com.vanniktech.maven.publish.SonatypeHost
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.androidLibrary)
id("com.vanniktech.maven.publish") version "0.30.0"
}
kotlin {
androidTarget {
tasks.withType<KotlinJvmCompile>().configureEach {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
}
}
}
listOf(
iosX64(), iosArm64(), iosSimulatorArm64()
).forEach {
it.binaries.framework {
baseName = "shared"
isStatic = true
}
}
sourceSets {
commonMain.dependencies {
implementation(libs.kotlinx.coroutines.core)
implementation(libs.ktor.client.core)
}
commonTest.dependencies {
implementation(libs.kotlin.test)
implementation(libs.ktor.client.mock)
implementation(libs.kotlinx.coroutines.core)
}
iosMain.dependencies {
implementation(libs.ktor.client.darwin)
}
androidMain.dependencies {
implementation(libs.ktor.client.android)
}
}
}
android {
namespace = "io.github.kabirnayeem99.ktor2curl"
compileSdk = 34
defaultConfig {
minSdk = 28
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
dependencies {
implementation(libs.kotlinx.coroutines.core)
}
mavenPublishing {
coordinates(
groupId = "io.github.kabirnayeem99", artifactId = "ktor2curl", version = "1.0.2"
)
pom {
name.set("ktor2curl")
description.set("Ktor2Curl is a Ktor client plugin that seamlessly converts HTTP requests into cURL commands for debugging and logging.")
inceptionYear.set("2024")
url.set("https://github.com/kabirnayeem99/Ktor2Curl")
licenses {
license {
name.set("MIT")
url.set("https://opensource.org/licenses/MIT")
}
}
developers {
developer {
id.set("kabirnayeem99")
name.set("Naimul Kabir")
email.set("[email protected]")
}
}
scm {
url.set("https://github.com/kabirnayeem99/Ktor2Curl")
}
}
// Configure publishing to Maven Central
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
// Enable GPG signing for all publications
signAllPublications()
}