-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
63 lines (53 loc) · 1.42 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
import org.gradle.api.internal.HasConvention
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet
group = "org.dicthub"
version = "1.0-SNAPSHOT"
val kotlinVersion = "1.3.20"
val kotlinHtmlVersion = "0.6.12"
val SourceSet.kotlin: SourceDirectorySet
get() =
(this as HasConvention)
.convention
.getPlugin(KotlinSourceSet::class.java)
.kotlin
plugins {
id("kotlin2js") version "1.3.20"
`maven-publish`
}
repositories {
jcenter()
}
dependencies {
compile(kotlin("stdlib-js"))
compile("org.jetbrains.kotlinx:kotlinx-html-js:$kotlinHtmlVersion")
testCompile("org.jetbrains.kotlin:kotlin-test-js:$kotlinVersion")
}
sourceSets {
main {
kotlin.srcDir(rootProject.file("plugin-shared-utility/src/main/kotlin"))
}
}
tasks {
compileKotlin2Js {
kotlinOptions {
sourceMap = true
}
}
}
publishing {
publications {
create<MavenPublication>("js") {
artifact(file("${project.buildDir}/classes/kotlin/main/${project.name}.js"))
}
}
repositories {
maven {
url = uri("s3://org.dicthub.plugins.autopublish/maven2")
credentials(AwsCredentials::class) {
accessKey = System.getenv("AWS_ACCESS_KEY_ID")
secretKey = System.getenv("AWS_SECRET_ACCESS_KEY")
}
}
}
}
tasks["publish"].dependsOn("build")