|
| 1 | +/* |
| 2 | + * Copyright (c) 2024 Elide Technologies, Inc. |
| 3 | + * |
| 4 | + * Licensed under the MIT license (the "License"); you may not use this file except in compliance |
| 5 | + * with the License. You may obtain a copy of the License at |
| 6 | + * |
| 7 | + * https://opensource.org/license/mit/ |
| 8 | + * |
| 9 | + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on |
| 10 | + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 11 | + * License for the specific language governing permissions and limitations under the License. |
| 12 | + */ |
| 13 | + |
| 14 | +import elide.internal.conventions.kotlin.KotlinTarget |
| 15 | +import elide.internal.conventions.publishing.publish |
| 16 | + |
| 17 | +plugins { |
| 18 | + alias(libs.plugins.micronaut.graalvm) |
| 19 | + |
| 20 | + kotlin("jvm") |
| 21 | + kotlin("kapt") |
| 22 | + kotlin("plugin.allopen") |
| 23 | + |
| 24 | + alias(libs.plugins.elide.conventions) |
| 25 | +} |
| 26 | + |
| 27 | +elide { |
| 28 | + publishing { |
| 29 | + id = "graalvm-js" |
| 30 | + name = "Elide JS integration package for GraalVM" |
| 31 | + description = "Integration package with GraalVM, Elide, and JS." |
| 32 | + |
| 33 | + publish("jvm") { |
| 34 | + from(components["kotlin"]) |
| 35 | + } |
| 36 | + } |
| 37 | + |
| 38 | + kotlin { |
| 39 | + target = KotlinTarget.JVM |
| 40 | + explicitApi = true |
| 41 | + } |
| 42 | +} |
| 43 | + |
| 44 | +val gvmJarsRoot = rootProject.layout.projectDirectory.dir("third_party/oracle") |
| 45 | + |
| 46 | +val patchedLibs = files( |
| 47 | + gvmJarsRoot.file("graaljs.jar"), |
| 48 | +) |
| 49 | + |
| 50 | +val patchedDependencies: Configuration by configurations.creating { |
| 51 | + isCanBeResolved = true |
| 52 | +} |
| 53 | + |
| 54 | +dependencies { |
| 55 | + api(projects.packages.engine) |
| 56 | + api(patchedLibs) |
| 57 | + patchedDependencies(patchedLibs) |
| 58 | +} |
| 59 | + |
| 60 | +configurations.all { |
| 61 | + libs.graalvm.js.language.get().let { |
| 62 | + exclude(group = it.group, module = it.name) |
| 63 | + } |
| 64 | +} |
0 commit comments