Removed unused JS distribution execution

This commit is contained in:
Alexander Nozik 2020-11-26 13:12:02 +03:00
parent f4e13a9979
commit aa2ba8caf0
4 changed files with 2 additions and 36 deletions

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@ -42,15 +42,6 @@ open class KScienceJSPlugin : Plugin<Project> {
val processResources by getting(Copy::class)
processResources.copyJSResources(configurations["runtimeClasspath"])
findByName("jsBrowserDistribution")?.apply {
doLast {
val indexFile = project.jsDistDirectory.resolve("index.html")
if (indexFile.exists()) {
println("Run JS distribution at: ${indexFile.canonicalPath}")
}
}
}
}
}

View File

@ -95,15 +95,6 @@ open class KScienceMPPlugin : Plugin<Project> {
val jvmProcessResources by getting(Copy::class)
jvmProcessResources.copyJVMResources(configurations["jvmRuntimeClasspath"])
findByName("jsBrowserDistribution")?.apply {
doLast {
val indexFile = project.jsDistDirectory.resolve("index.html")
if (indexFile.exists()) {
println("Run JS distribution at: ${indexFile.canonicalPath}")
}
}
}
}
}

View File

@ -1,13 +1,11 @@
package ru.mipt.npm.gradle
import org.gradle.api.Project
import org.gradle.api.artifacts.Configuration
import org.gradle.api.artifacts.ProjectDependency
import org.gradle.api.artifacts.dsl.RepositoryHandler
import org.gradle.api.tasks.Copy
import org.gradle.kotlin.dsl.maven
import org.jetbrains.kotlin.gradle.plugin.LanguageSettingsBuilder
import java.io.File
internal fun LanguageSettingsBuilder.applySettings(): Unit {
progressiveMode = true
@ -86,18 +84,4 @@ internal fun Copy.copyJVMResources(configuration: Configuration): Unit = project
}
}
}
}
val Project.jsDistDirectory: File
get() {
val distributionName = listOf(
name,
"js",
version.toString()
).joinToString("-")
return buildDir.resolve(
"distributions/$distributionName"
)
}
}