Skip to content

Commit ef6f9f0

Browse files
committed
build: publishes Nashorn as standalone plugin.
1 parent d8b9d35 commit ef6f9f0

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

scripting/nashorn/build.gradle

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
apply plugin: 'java-library'
22
apply plugin: 'kotlin'
33
apply plugin: 'maven-publish'
4+
apply plugin: 'com.github.johnrengelman.shadow'
45

56
ext {
67
version_nashorn_core = '15.4'
@@ -14,7 +15,7 @@ dependencies {
1415
implementation project(':core:imposter-engine')
1516
implementation project(':scripting:scripting-common')
1617

17-
implementation "org.openjdk.nashorn:nashorn-core:$version_nashorn_core"
18+
pluginImplementation "org.openjdk.nashorn:nashorn-core:$version_nashorn_core"
1819

1920
// test
2021
testImplementation project(':test:test-utils')
@@ -36,7 +37,7 @@ artifacts {
3637
publishing {
3738
publications {
3839
maven(MavenPublication) {
39-
from components.java
40+
artifact shadowJar
4041
artifact sourcesJar
4142

4243
repositories {
@@ -69,3 +70,15 @@ compileTestKotlin {
6970
freeCompilerArgs = ["-Xjvm-default=all"]
7071
}
7172
}
73+
74+
shadowJar {
75+
// override plugin archive name
76+
archiveBaseName.set("imposter-plugin-js-nashorn")
77+
archiveVersion.set('')
78+
archiveClassifier.set('')
79+
configurations = [project.configurations.pluginImplementation]
80+
}
81+
82+
task dist {
83+
dependsOn shadowJar
84+
}

0 commit comments

Comments
 (0)