-
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
fb34090
commit 4f4b460
Showing
6 changed files
with
66 additions
and
33 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
repo/gradle-build-conventions/binaryen-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
...uild-conventions/binaryen-configuration/src/main/kotlin/binaryen-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.binaryen.BinaryenExtension | ||
import org.jetbrains.kotlin.gradle.targets.js.binaryen.BinaryenRootPlugin | ||
|
||
val binaryenRoot = BinaryenRootPlugin.apply(project.rootProject) | ||
|
||
extensions.create<BinaryenExtension>( | ||
"binaryenKotlinBuild", | ||
binaryenRoot, | ||
) |
23 changes: 23 additions & 0 deletions
23
...en-configuration/src/main/kotlin/org/jetbrains/kotlin/build/binaryen/BinaryenExtension.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,23 @@ | ||
/* | ||
* 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.binaryen | ||
|
||
import org.gradle.api.tasks.testing.Test | ||
import org.jetbrains.kotlin.gradle.targets.js.binaryen.BinaryenRootExtension | ||
|
||
abstract class BinaryenExtension( | ||
private val binaryenRoot: BinaryenRootExtension | ||
) { | ||
fun Test.setupBinaryen() { | ||
dependsOn(binaryenRoot.setupTaskProvider) | ||
val binaryenExecutablePath = project.provider { | ||
binaryenRoot.requireConfigured().executablePath.absolutePath | ||
} | ||
doFirst { | ||
systemProperty("binaryen.path", binaryenExecutablePath.get()) | ||
} | ||
} | ||
} |
30 changes: 0 additions & 30 deletions
30
repo/gradle-build-conventions/buildsrc-compat/src/main/kotlin/setupBinaryen.kt
This file was deleted.
Oops, something went wrong.
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