-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
148 lines (125 loc) · 4.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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
plugins {
kotlin("multiplatform") version "2.0.21"
kotlin("plugin.serialization") version "2.0.21"
id("maven-publish")
id("signing")
}
buildscript {
repositories {
mavenCentral()
gradlePluginPortal()
}
}
allprojects {
repositories {
mavenCentral()
}
}
group = "dev.voir"
version = "1.0.5"
kotlin {
jvm()
iosArm64()
iosX64()
iosSimulatorArm64()
sourceSets {
commonMain.dependencies {
// https://mvnrepository.com/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0")
// https://mvnrepository.com/artifact/org.jetbrains.kotlinx/kotlinx-serialization-json
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3")
// https://mvnrepository.com/artifact/io.ktor/ktor-client-core
implementation("io.ktor:ktor-client-core:3.0.0")
implementation("io.ktor:ktor-client-content-negotiation:3.0.0")
implementation("io.ktor:ktor-client-serialization:3.0.0")
implementation("io.ktor:ktor-serialization-kotlinx-json:3.0.0")
}
commonTest.dependencies {
// https://mvnrepository.com/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-test
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.9.0")
implementation(kotlin("test"))
}
jvmMain.dependencies {
implementation(kotlin("stdlib-jdk8"))
// https://mvnrepository.com/artifact/io.ktor/ktor-client-core
implementation("io.ktor:ktor-client-okhttp:3.0.0")
}
iosMain.dependencies {
// https://mvnrepository.com/artifact/io.ktor/ktor-client-core
implementation("io.ktor:ktor-client-darwin:3.0.0")
}
}
}
afterEvaluate {
configure<PublishingExtension> {
publications.all {
val mavenPublication = this as? MavenPublication
mavenPublication?.artifactId =
"${project.name}${"-$name".takeUnless { "kotlinMultiplatform" in name }.orEmpty()}"
}
}
}
publishing {
if (project.hasProperty("sonatypeUsername") && project.hasProperty("sonatypePassword")) {
repositories {
maven {
name = "Sonatype"
setUrl("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = project.property("sonatypeUsername").toString()
password = project.property("sonatypePassword").toString()
}
}
}
}
publications.withType<MavenPublication> {
artifactId = "exchangeit-sdk"
groupId = "dev.voir"
version = "1.0.5"
artifact(tasks.register("${name}JavadocJar", Jar::class) {
archiveClassifier.set("javadoc")
archiveAppendix.set(this.name)
})
pom {
name.set("Exchange It: Kotlin Multiplatform SDK")
url.set("/~https://github.com/VoirDev/exchangeit-kmm-sdk/")
description.set("SDK for Exchange It API written in Kotlin. For now supports iOS, JVM and Android.")
licenses {
license {
name.set("GNU Lesser General Public License, Version 3")
url.set("https://www.gnu.org/licenses/lgpl-3.0.txt")
}
}
scm {
connection.set("scm:/~https://github.com/VoirDev/exchangeit-kmm-sdk.git")
developerConnection.set("scm:git@github.com:VoirDev/exchangeit-kmm-sdk.git")
url.set("/~https://github.com/VoirDev/exchangeit-kmm-sdk/")
}
developers {
developer {
id.set("checksanity")
name.set("Gary Bezruchko")
email.set("hello@exchangeit.app")
organization.set("VOIR")
organizationUrl.set("https://voir.dev")
}
}
}
}
/* repositories {
maven {
name = "Github"
setUrl("https://maven.pkg.github.com/VoirDev/exchangeit-kmm-sdk")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}*/
}
signing {
if (project.hasProperty("signing.gnupg.keyName") && project.hasProperty("signing.gnupg.passphrase")) {
useGpgCmd()
sign(publishing.publications)
}
}