-
Notifications
You must be signed in to change notification settings - Fork 84
/
Copy pathbuild.gradle.kts
153 lines (133 loc) · 3.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
149
150
151
152
153
import com.vanniktech.maven.publish.SonatypeHost
import org.jetbrains.kotlin.gradle.targets.js.testing.KotlinJsTest
import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin
import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension
plugins {
id(deps.plugins.android.library.get().pluginId)
id(deps.plugins.kotlin.multiplatform.get().pluginId)
id(deps.plugins.kotlin.parcelize.get().pluginId)
id(deps.plugins.kotlin.serialization.get().pluginId)
id(deps.plugins.zipline.gradle.get().pluginId)
id(deps.plugins.maven.publish.config.get().pluginId)
id(deps.plugins.version.catalog.get().pluginId)
}
group = "io.github.shabinder"
version = (deps.soundbound.extensions.lib.get().version as String).also {
println("Building with lib version: $it")
}
afterEvaluate {
catalog {
// declare the aliases, bundles and versions in this block
versionCatalog {
from(files("gradle/deps.versions.toml"))
}
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["versionCatalog"])
artifactId = "soundbound-extensions-catalog"
}
}
}
}
mavenPublishing {
publishToMavenCentral(SonatypeHost.S01, true)
signAllPublications()
pom {
name.set("soundbound-extensions-lib")
description.set("SoundBound Extensions Stub")
url.set("https://github.com/Shabinder/soundbound-extensions-lib/")
licenses {
license {
name.set("GPL-3.0 License")
url.set("https://www.gnu.org/licenses/gpl-3.0.en.html")
}
}
developers {
developer {
id.set("shabinder")
name.set("Shabinder Singh")
email.set("dev.shabinder@gmail.com")
}
}
scm {
connection.set("scm:git:git://github.com/Shabinder/soundbound-extensions-lib.git")
developerConnection.set("scm:git:ssh://github.com/Shabinder/soundbound-extensions-lib.git")
url.set("https://github.com/Shabinder/soundbound-extensions-lib/")
}
issueManagement {
system.set("GitHub Issues")
url.set("https://github.com/Shabinder/soundbound-extensions-lib/issues")
}
}
}
repositories {
google()
mavenLocal()
mavenCentral()
}
android {
namespace = "in.shabinder.soundbound.extensions"
compileSdk = 34
defaultConfig {
minSdk = 21
}
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
compileOptions {
isCoreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = "17"
}
buildTypes {
getByName("release") {
isMinifyEnabled = false
}
}
kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
}
kotlin {
//ios()
androidTarget {
publishLibraryVariants("release", "debug")
}
jvm {
testRuns["test"].executionTask.configure {
useJUnit()
}
}
js(IR) {
val jsTestAction = Action<KotlinJsTest> {
useMocha { timeout = "30000" }
}
browser { testTask(jsTestAction) }
binaries.executable()
nodejs { testTask(jsTestAction) }
}
sourceSets {
val commonMain by getting {
dependencies {
api(project(":compose"))
//api(project(":parcelize"))
with(deps) {
api(zipline)
api(kotlinx.serialization.json)
api(kotlinx.coroutines)
}
}
}
}
dependencies {
coreLibraryDesugaring(deps.androidx.desugar)
}
}
plugins.withType<YarnPlugin> {
the<YarnRootExtension>().yarnLockAutoReplace = true
}