-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4f4b460
commit 55ddc9e
Showing
6 changed files
with
67 additions
and
38 deletions.
There are no files selected for viewing
35 changes: 0 additions & 35 deletions
35
repo/gradle-build-conventions/buildsrc-compat/src/main/kotlin/setupV8.kt
This file was deleted.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
repo/gradle-build-conventions/nodejs-configuration/build.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
plugins { | ||
`kotlin-dsl` | ||
id("org.jetbrains.kotlin.jvm") | ||
} | ||
|
||
repositories { | ||
maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-dependencies") | ||
mavenCentral() | ||
gradlePluginPortal() | ||
|
||
extra["bootstrapKotlinRepo"]?.let { | ||
maven(url = it) | ||
} | ||
} | ||
|
||
kotlin { | ||
jvmToolchain(8) | ||
|
||
compilerOptions { | ||
allWarningsAsErrors.set(true) | ||
} | ||
} | ||
|
||
dependencies { | ||
compileOnly(kotlin("stdlib", embeddedKotlinVersion)) | ||
compileOnly("org.jetbrains.kotlin:kotlin-gradle-plugin:${project.bootstrapKotlinVersion}") | ||
} |
9 changes: 9 additions & 0 deletions
9
...le-build-conventions/nodejs-configuration/src/main/kotlin/nodejs-configuration.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import org.jetbrains.kotlin.build.nodejs.NodeJsExtension | ||
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin | ||
|
||
val nodeJsRoot = NodeJsRootPlugin.apply(project.rootProject) | ||
|
||
extensions.create<NodeJsExtension>( | ||
"nodeJsKotlinBuild", | ||
nodeJsRoot, | ||
) |
24 changes: 24 additions & 0 deletions
24
...nodejs-configuration/src/main/kotlin/org/jetbrains/kotlin/build/nodejs/NodeJsExtension.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors. | ||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. | ||
*/ | ||
|
||
package org.jetbrains.kotlin.build.nodejs | ||
|
||
import org.gradle.api.tasks.testing.Test | ||
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension | ||
|
||
abstract class NodeJsExtension( | ||
private val nodeJsRoot: NodeJsRootExtension | ||
) { | ||
@Suppress("DEPRECATION") | ||
fun Test.setupNodeJs() { | ||
dependsOn(nodeJsRoot.nodeJsSetupTaskProvider) | ||
val nodeJsExecutablePath = project.provider { | ||
nodeJsRoot.requireConfigured().nodeExecutable | ||
} | ||
doFirst { | ||
systemProperty("javascript.engine.path.NodeJs", nodeJsExecutablePath.get()) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters