Skip to content

Commit

Permalink
Merge branch 'plugins-kotlin-1.6.10' into plugins-kotlin-1.6.10-release
Browse files Browse the repository at this point in the history
v0.1.6-kotlin-1.6.10 release
  • Loading branch information
ShreckYe committed Jun 13, 2022
2 parents 3f7efb5 + 907b059 commit 0582fe2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,20 @@ class GenerateKotlinJsBrowserWebrootForVertxWebPlugin : Plugin<Project> {
/*val jsBrowserDistributionTask by lazy {
tasks.getByPath(extension.webFrontendProjectPath.get() + ":jsBrowserDistribution") as KotlinWebpack
}*/
val jsBrowserProductionWebpack by lazy {
tasks.getByPath(extension.webFrontendProjectPath.get() + ":jsBrowserProductionWebpack") as KotlinWebpack
val jsBrowserWebpack by lazy {
tasks.getByPath(
extension.webFrontendProjectPath.get() +
if (extension.production.get()) ":jsBrowserProductionWebpack" else ":jsBrowserDevelopmentWebpack"
) as KotlinWebpack
}
val copyJsBrowserDistributionToResourcesWebroot = "copyJsBrowserDistributionToResourcesWebroot"
val browserDistributionResourcesDirectory = buildDir.resolve("browserDistributionResources")

tasks.register<Copy>(copyJsBrowserDistributionToResourcesWebroot) {
dependsOn(jsBrowserProductionWebpack)
from(jsBrowserProductionWebpack.destinationDirectory)
include("*.html", "*.css", "*.js")
dependsOn(jsBrowserWebpack)
from(jsBrowserWebpack.destinationDirectory)
if (extension.production.get())
include("*.html", "*.css", "*.js")
into(browserDistributionResourcesDirectory.resolve("webroot"))
}

Expand All @@ -41,5 +45,6 @@ class GenerateKotlinJsBrowserWebrootForVertxWebPlugin : Plugin<Project> {

interface Extension {
val webFrontendProjectPath: Property<String>
val production: Property<Boolean>
}
}
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/plugin-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies {
implementation(kotlin("gradle-plugin", "1.6.10"))
}

version = "0.1.5-kotlin-1.6.10"
version = "0.1.6-kotlin-1.6.10"

pluginBundle {
website = "https://github.com/huanshankeji/gradle-plugin"
Expand Down

0 comments on commit 0582fe2

Please sign in to comment.