This repository was archived by the owner on May 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
65 lines (56 loc) · 1.86 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
65 lines (56 loc) · 1.86 KB
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
import org.jetbrains.kotlin.konan.properties.loadProperties
plugins {
kotlin("multiplatform") version "1.4.30"
kotlin("plugin.serialization") version "1.4.30"
`maven-publish`
}
repositories {
mavenCentral()
}
group = "io.sketchware.api"
version = properties["version"]!!
val ktorVersion = "1.5.1"
kotlin {
jvm()
sourceSets {
val commonMain by getting {
dependencies {
implementation(kotlin("stdlib-common"))
implementation("io.ktor:ktor-client-core:$ktorVersion")
implementation("io.ktor:ktor-client-cio:1.5.1")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2")
implementation("io.ktor:ktor-client-json:$ktorVersion")
implementation("io.ktor:ktor-client-logging:$ktorVersion")
implementation("io.ktor:ktor-client-serialization:$ktorVersion")
}
}
}
}
val localProperties = project.rootProject.file("local.properties")
.takeIf(File::exists)
?.let(File::getAbsolutePath)
?.let(::loadProperties)
publishing {
apply(plugin = "maven-publish")
publications {
create<MavenPublication>("Deploy") {
groupId = "io.sketchware.api"
artifactId = "SketchwareAPI"
version = (properties["version"] as String?)!!
pom {
name.set("Sketchware API Library")
description.set("Coroutine-based KMM Library")
}
}
}
repositories {
maven {
name = "sketchware-api"
url = uri("sftp://${localProperties!!["serverIp"]}:22/${localProperties["deployPath"]}")
credentials {
username = (localProperties["username"] as String?)!!
password = (localProperties["password"] as String?)!!
}
}
}
}