-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
49 lines (39 loc) · 1.25 KB
/
build.gradle.kts
File metadata and controls
49 lines (39 loc) · 1.25 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
import com.gradleup.librarian.gradle.Librarian
import nmcp.NmcpAggregationExtension
buildscript {
dependencies {
classpath(libs.nmcp.tasks) // only needed to upgrade the version for testing
}
}
plugins {
alias(libs.plugins.kgp).apply(false)
alias(libs.plugins.ksp).apply(false)
alias(libs.plugins.gratatouille).apply(false)
alias(libs.plugins.librarian).apply(false)
alias(libs.plugins.nmcp).apply(false) // only needed to upgrade the version for testing
alias(libs.plugins.compat).apply(false)
alias(libs.plugins.serialization).apply(false)
}
Librarian.root(project)
tasks.register("docsNpmInstall", Exec::class.java) {
enabled = file("docs").exists()
commandLine("npm", "ci")
workingDir("docs")
}
tasks.register("docsNpmBuild", Exec::class.java) {
dependsOn("docsNpmInstall")
enabled = file("docs").exists()
commandLine("npm", "run", "build")
workingDir("docs")
}
tasks.named("librarianStaticContent").configure {
dependsOn("docsNpmBuild")
val from = file("docs/dist")
doLast {
from.copyRecursively(outputs.files.single(), overwrite = true)
}
}
extensions.getByType(NmcpAggregationExtension::class.java).localRepository {
this.name = "test"
this.path = "build/m2"
}