From aa2ba8caf082e147004b4c13d5760350a8e3e782 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Thu, 26 Nov 2020 13:12:02 +0300 Subject: [PATCH] Removed unused JS distribution execution --- gradle/wrapper/gradle-wrapper.properties | 2 +- .../ru/mipt/npm/gradle/KScienceJSPlugin.kt | 9 --------- .../ru/mipt/npm/gradle/KScienceMPPlugin.kt | 9 --------- src/main/kotlin/ru/mipt/npm/gradle/common.kt | 18 +----------------- 4 files changed, 2 insertions(+), 36 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 12d38de..4d9ca16 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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 diff --git a/src/main/kotlin/ru/mipt/npm/gradle/KScienceJSPlugin.kt b/src/main/kotlin/ru/mipt/npm/gradle/KScienceJSPlugin.kt index 6f150ac..e0ed26f 100644 --- a/src/main/kotlin/ru/mipt/npm/gradle/KScienceJSPlugin.kt +++ b/src/main/kotlin/ru/mipt/npm/gradle/KScienceJSPlugin.kt @@ -42,15 +42,6 @@ open class KScienceJSPlugin : Plugin { 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}") - } - } - } } } diff --git a/src/main/kotlin/ru/mipt/npm/gradle/KScienceMPPlugin.kt b/src/main/kotlin/ru/mipt/npm/gradle/KScienceMPPlugin.kt index 7675142..55133f2 100644 --- a/src/main/kotlin/ru/mipt/npm/gradle/KScienceMPPlugin.kt +++ b/src/main/kotlin/ru/mipt/npm/gradle/KScienceMPPlugin.kt @@ -95,15 +95,6 @@ open class KScienceMPPlugin : Plugin { 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}") - } - } - } } } diff --git a/src/main/kotlin/ru/mipt/npm/gradle/common.kt b/src/main/kotlin/ru/mipt/npm/gradle/common.kt index 9b33cb5..d38ce2c 100644 --- a/src/main/kotlin/ru/mipt/npm/gradle/common.kt +++ b/src/main/kotlin/ru/mipt/npm/gradle/common.kt @@ -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" - ) - } \ No newline at end of file +} \ No newline at end of file