[repo] Enable warnings as errors for Gradle Kotlin scripts

This commit is contained in:
Yahor Berdnikau
2023-07-03 10:26:29 +02:00
committed by Space Team
parent ed8fc64257
commit 73f6316f27
6 changed files with 11 additions and 10 deletions
+1
View File
@@ -1,4 +1,5 @@
org.gradle.jvmargs=-Duser.country=US -Dfile.encoding=UTF-8
org.gradle.kotlin.dsl.allWarningsAsErrors=true
cacheRedirectorEnabled=true
+1
View File
@@ -7,6 +7,7 @@ kotlin.incremental.useClasspathSnapshot=true
org.gradle.parallel=true
org.gradle.caching=true
org.gradle.kotlin.dsl.allWarningsAsErrors=true
# Please keep it in sync with buildSrc gradle.properties.
# It's currently needed for proper configuration cache work, the reason will be investigated later
+2 -5
View File
@@ -1,4 +1,5 @@
import com.github.gradle.node.npm.task.NpmTask
import com.github.gradle.node.variant.computeNodeExec
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinUsages
import org.jetbrains.kotlin.ideaExt.idea
@@ -214,11 +215,7 @@ val generateTypeScriptJsExportOnFileTests by parallel(
fun Test.setupNodeJs() {
systemProperty("javascript.engine.path.NodeJs", com.github.gradle.node.variant.VariantComputer()
.let { variantComputer ->
variantComputer
.computeNodeDir(node)
.let { variantComputer.computeNodeBinDir(it) }
.let { variantComputer.computeNodeExec(node, it) }
.get()
computeNodeExec(node, variantComputer.computeNodeBinDir(node.computedNodeDir)).get()
}
)
}
@@ -31,9 +31,9 @@ val ignoreTestFailures by extra(project.kotlinBuildProperties.ignoreTestFailures
kotlin {
js(IR) {
nodejs {
testTask {
testTask(Action {
enabled = false
}
})
}
}
+2 -2
View File
@@ -7,11 +7,11 @@ plugins {
kotlin {
js(IR) {
nodejs {
testTask {
testTask(Action {
useMocha {
timeout = "10s"
}
}
})
}
}
}
@@ -3,3 +3,5 @@ kotlin.options.suppressFreeCompilerArgsModificationWarning=true
cacheRedirectorEnabled=true
# Should be in sync with ":kotlin-daemon-config" project convention script configuration
kotlin.daemon.jvmargs=-Xmx3g
org.gradle.kotlin.dsl.allWarningsAsErrors=true