Skip to content

Commit 119f716

Browse files
committed
build script updates - closure compiler and kotlin updated to the latest versions, repo switched to mavenCentral, and some minor changes to adhere to new versions of the toolchain
1 parent 73a5796 commit 119f716

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

build.gradle.kts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020 Kazimierz Pogoda
2+
* Copyright 2021 Kazimierz Pogoda
33
*
44
* This file is part of shader-web-background.
55
*
@@ -17,18 +17,18 @@
1717
* along with shader-web-background. If not, see <https://www.gnu.org/licenses/>.
1818
*/
1919

20-
val closureCompilerVersion = "v20210106"
20+
val closureCompilerVersion = "v20211201"
2121

2222
plugins {
23-
kotlin("jvm") version "1.4.21"
23+
kotlin("jvm") version "1.6.10"
2424
}
2525

2626
dependencies {
2727
implementation("com.google.javascript:closure-compiler:$closureCompilerVersion")
2828
}
2929

3030
repositories {
31-
jcenter()
31+
mavenCentral()
3232
}
3333

3434
fun getMapJsBackPath(path: String) =
@@ -73,16 +73,16 @@ fun updateEmbeddedLibs(
7373
}
7474
}
7575

76-
task("closureCompilerHelp", JavaExec::class) {
76+
task<JavaExec>("closureCompilerHelp") {
7777
group = "js"
78-
main = "com.google.javascript.jscomp.CommandLineRunner"
78+
mainClass.set("com.google.javascript.jscomp.CommandLineRunner")
7979
args = listOf("--help")
8080
classpath = sourceSets["main"].runtimeClasspath
8181
}
8282

83-
task("compileJs", JavaExec::class) {
83+
task<JavaExec>("compileJs") {
8484
group = "js"
85-
main = "com.xemantic.web.shader.background.ShaderWebBackgroundClosureCompilerKt"
85+
mainClass.set("com.xemantic.web.shader.background.ShaderWebBackgroundClosureCompilerKt")
8686

8787
val sourceDir = "src/main/js"
8888
val outputDir = "dist"
@@ -114,7 +114,6 @@ task("compileJs", JavaExec::class) {
114114
"--jscomp_warning=reportUnknownTypes",
115115
"--jscomp_warning=strictCheckTypes",
116116
"--jscomp_warning=typeInvalidation",
117-
"--jscomp_warning=undefinedNames",
118117
"--jscomp_warning=unusedLocalVariables",
119118
"--jscomp_warning=unusedPrivateMembers",
120119
"--jscomp_warning=visibility",

0 commit comments

Comments
 (0)