Adjust js distribution name and move task to configuraition time.
This commit is contained in:
parent
99fdcfe60d
commit
e00642bb34
@ -7,7 +7,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = "scientifik"
|
||||
version = "0.3.1"
|
||||
version = "0.3.2"
|
||||
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
|
@ -45,11 +45,12 @@ open class ScientifikJSPlugin : Plugin<Project> {
|
||||
outputFileName = "main.bundle.js"
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
val installJsDist by creating(Copy::class) {
|
||||
group = "distribution"
|
||||
dependsOn(browserWebpack)
|
||||
from(fileTree("src/main/web"))
|
||||
|
||||
val installJsDist by creating(Copy::class) {
|
||||
group = "distribution"
|
||||
dependsOn(browserWebpack)
|
||||
from(fileTree("src/main/web"))
|
||||
afterEvaluate {
|
||||
into(browserWebpack.destinationDirectory!!)
|
||||
doLast {
|
||||
val indexFile = File(browserWebpack.destinationDirectory!!, "index.html")
|
||||
@ -58,10 +59,10 @@ open class ScientifikJSPlugin : Plugin<Project> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
findByName("assemble")?.dependsOn(installJsDist)
|
||||
|
||||
}
|
||||
|
||||
findByName("assemble")?.dependsOn(installJsDist)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -115,17 +115,18 @@ open class ScientifikMPPlugin : Plugin<Project> {
|
||||
tasks.apply {
|
||||
val jsBrowserWebpack by getting(KotlinWebpack::class) {
|
||||
afterEvaluate {
|
||||
val destination = listOf(name, version.toString()).joinToString("-")
|
||||
val destination = listOf(name, "js", version.toString()).joinToString("-")
|
||||
destinationDirectory = destinationDirectory?.resolve(destination)
|
||||
}
|
||||
outputFileName = "main.bundle.js"
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
val installJsDist by creating(Copy::class) {
|
||||
group = "distribution"
|
||||
dependsOn(jsBrowserWebpack)
|
||||
from(project.fileTree("src/jsMain/web"))
|
||||
|
||||
val installJsDist by creating(Copy::class) {
|
||||
group = "distribution"
|
||||
dependsOn(jsBrowserWebpack)
|
||||
from(project.fileTree("src/jsMain/web"))
|
||||
afterEvaluate {
|
||||
into(jsBrowserWebpack.destinationDirectory!!)
|
||||
doLast {
|
||||
val indexFile = File(jsBrowserWebpack.destinationDirectory!!, "index.html")
|
||||
@ -134,10 +135,10 @@ open class ScientifikMPPlugin : Plugin<Project> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
findByName("assemble")?.dependsOn(installJsDist)
|
||||
}
|
||||
|
||||
findByName("assemble")?.dependsOn(installJsDist)
|
||||
|
||||
// withType<Test>(){
|
||||
// useJUnitPlatform()
|
||||
// }
|
||||
|
Loading…
Reference in New Issue
Block a user