-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
72 lines (63 loc) · 1.98 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
// note kotlin js currently depends on node 14, which doesn't exist for
// arm based mac, so build on 4x4 until kotlin switches to node 16
plugins {
kotlin("js") version "1.7.20"
}
group = "oregondsp"
version = "1.3.1"
kotlin {
js(IR) {
moduleName = "oregondsp"
compilations["main"].packageJson {
customField("type", "commonjs")
customField("description", "Port of OregonDSP library from java to javascript via kotlin.")
customField("repository", mapOf("type" to "git",
"url" to "https://github.com/crotwell/OregonDSP-kotlin.git"))
customField("author", "Philip Crotwell <[email protected]>")
customField("license", "LGPL-3.0")
customField("keywords", listOf(
"seismology",
"fft",
"timeseries",
"filter",
"butterworth",
"chebyshev",
"seismogram"
))
customField("bugs", mapOf(
"url" to "https://github.com/crotwell/OregonDSP-kotlin/issues"
))
customField("homepage", "https://github.com/crotwell/OregonDSP-kotlin")
}
browser {
}
binaries.executable()
}
}
repositories {
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven")
}
tasks.register<Sync>("copyJsToLib") {
from ("README.md")
from (".npmignore")
from("${buildDir}/js/packages/oregondsp")
into("${projectDir}/lib")
dependsOn("browserDevelopmentWebpack")
}
tasks.get("assemble").dependsOn(tasks.get("copyJsToLib"))
/*
build.doLast {
configurations.compile.each { File file ->
copy {
includeEmptyDirs = false
from zipTree(file.absolutePath)
into "${buildDir}/kotlinjs-stdlib"
include { fileTreeElement ->
def path = fileTreeElement.path
path.endsWith(".js") && (path.startsWith("META-INF/resources/") || !path.startsWith("META-INF/"))
}
}
}
}
*/