-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
91 lines (77 loc) · 2.2 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
group = "pubgkt"
version = "0.0.1"
plugins {
alias(libs.plugins.kotlinMultiplatform) apply true
alias(libs.plugins.serialization) apply true
// alias(libs.plugins.androidLibrary) apply true
`maven-publish`
}
kotlin {
jvm()
js {
browser()
nodejs()
}
// androidTarget {
// publishLibraryVariants("release")
// compilations.all {
// kotlinOptions {
// jvmTarget = "11"
// }
// }
// }
sourceSets {
commonMain.dependencies {
// Coroutines
implementation(libs.coroutines.core)
// Ktor (client)
implementation(libs.ktor.client.core)
implementation(libs.ktor.client.contentnegotiation)
implementation(libs.ktor.client.logging)
implementation(libs.ktor.client.encoding)
implementation(libs.ktor.serialization.kotlinx.json)
}
commonTest.dependencies {
implementation(libs.kotlin.test)
implementation(libs.coroutines.test)
}
jvmMain.dependencies {
implementation(libs.ktor.client.cio)
}
jvmTest.dependencies {
runtimeOnly(libs.logback.classic)
}
//
// androidMain.dependencies {
// implementation(libs.ktor.client.cio)
// }
}
}
//android {
// namespace = "pubgkt"
// compileSdk = libs.versions.android.compileSdk.get().toInt()
// compileOptions {
// sourceCompatibility = JavaVersion.VERSION_11
// targetCompatibility = JavaVersion.VERSION_11
// }
// defaultConfig {
// minSdk = libs.versions.android.minSdk.get().toInt()
// }
//}
publishing {
repositories {
maven {
name = "GitHub"
url = uri("https://maven.pkg.github.com/theodorosidmar/pubgkt")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("GITHUB_USERNAME")
password = project.findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN")
}
}
}
publications {
getByName<MavenPublication>("jvm") {
artifactId = "pubgkt"
}
}
}