-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
62 lines (57 loc) · 1.85 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
import io.gitlab.arturbosch.detekt.extensions.DetektExtension
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.composeCompiler)
alias(libs.plugins.jetbrainsCompose)
alias(libs.plugins.buildconfig)
alias(libs.plugins.detekt)
}
kotlin {
compilerOptions {
progressiveMode = true
extraWarnings = true
}
js(IR) {
browser()
binaries.executable()
compilerOptions {
target = "es2015"
freeCompilerArgs.addAll(
// Lambda expressions that capture values are translated into in-line anonymous JavaScript functions.
"-Xir-generate-inline-anonymous-functions",
)
}
}
sourceSets {
val jsMain by getting {
dependencies {
implementation(compose.html.core)
implementation(compose.runtime)
implementation(libs.coroutines.core.js)
}
}
}
}
buildConfig {
packageName("io.github.g00fy2")
buildConfigField("String", "GITHUB_USER", "\"G00fY2\"")
buildConfigField("String", "GITHUB_API_URL", "\"https://api.github.com\"")
buildConfigField("String", "GITHUB_API_VERSION", "\"2022-11-28\"")
// to increase rate limit add composeGitHubAuth with 'user:token' as base64 in local properties
buildConfigField("String", "GITHUB_API_DEV_AUTH", findProperty("composeGitHubAuth") as String? ?: "\"\"")
}
// explicitly set the webpack-dev-server version
extensions.configure<NodeJsRootExtension> {
versions.webpackDevServer.version = libs.versions.webpackDevServer.get()
versions.webpackCli.version = libs.versions.webpackCli.get()
}
// configure detekt
extensions.configure<DetektExtension> {
toolVersion = libs.versions.detekt.get()
config.setFrom(files("$rootDir/detekt.yml"))
buildUponDefaultConfig = true
}
dependencies {
add("detektPlugins", rootProject.libs.detektFormatting)
}