diff --git a/libraries/tools/kotlin-gradle-plugin/api/all/kotlin-gradle-plugin.api b/libraries/tools/kotlin-gradle-plugin/api/all/kotlin-gradle-plugin.api index 569516ea43c9f..248023b8ea5c4 100644 --- a/libraries/tools/kotlin-gradle-plugin/api/all/kotlin-gradle-plugin.api +++ b/libraries/tools/kotlin-gradle-plugin/api/all/kotlin-gradle-plugin.api @@ -2927,6 +2927,7 @@ public abstract interface annotation class org/jetbrains/kotlin/gradle/swiftexpo } public abstract interface class org/jetbrains/kotlin/gradle/targets/js/AbstractEnv { + public abstract fun getAllowInsecureProtocol ()Z public abstract fun getCleanableStore ()Lorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore; public abstract fun getDir ()Ljava/io/File; public abstract fun getDownload ()Z @@ -2955,6 +2956,7 @@ public abstract class org/jetbrains/kotlin/gradle/targets/js/AbstractSetupTask : public fun (Lorg/jetbrains/kotlin/gradle/targets/js/EnvSpec;)V public final fun exec ()V public abstract fun extract (Ljava/io/File;)V + public final fun getAllowInsecureProtocol ()Lorg/gradle/api/provider/Provider; protected abstract fun getArtifactModule ()Ljava/lang/String; protected abstract fun getArtifactName ()Ljava/lang/String; protected abstract fun getArtifactPattern ()Ljava/lang/String; @@ -2974,6 +2976,7 @@ public final class org/jetbrains/kotlin/gradle/targets/js/AbstractSetupTask$Comp public abstract class org/jetbrains/kotlin/gradle/targets/js/EnvSpec { public fun ()V + public abstract fun getAllowInsecureProtocol ()Lorg/gradle/api/provider/Property; public abstract fun getCommand ()Lorg/gradle/api/provider/Property; public abstract fun getDownload ()Lorg/gradle/api/provider/Property; public abstract fun getDownloadBaseUrl ()Lorg/gradle/api/provider/Property; @@ -3147,17 +3150,19 @@ public final class org/jetbrains/kotlin/gradle/targets/js/UtilsKt { } public final class org/jetbrains/kotlin/gradle/targets/js/binaryen/BinaryenEnv : org/jetbrains/kotlin/gradle/targets/js/AbstractEnv { - public fun (ZLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/io/File;Lorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore;Z)V + public fun (ZLjava/lang/String;ZLjava/lang/String;Ljava/lang/String;Ljava/io/File;Lorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore;Z)V public final fun component1 ()Z public final fun component2 ()Ljava/lang/String; - public final fun component3 ()Ljava/lang/String; + public final fun component3 ()Z public final fun component4 ()Ljava/lang/String; - public final fun component5 ()Ljava/io/File; - public final fun component6 ()Lorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore; - public final fun component7 ()Z - public final fun copy (ZLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/io/File;Lorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore;Z)Lorg/jetbrains/kotlin/gradle/targets/js/binaryen/BinaryenEnv; - public static synthetic fun copy$default (Lorg/jetbrains/kotlin/gradle/targets/js/binaryen/BinaryenEnv;ZLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/io/File;Lorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore;ZILjava/lang/Object;)Lorg/jetbrains/kotlin/gradle/targets/js/binaryen/BinaryenEnv; + public final fun component5 ()Ljava/lang/String; + public final fun component6 ()Ljava/io/File; + public final fun component7 ()Lorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore; + public final fun component8 ()Z + public final fun copy (ZLjava/lang/String;ZLjava/lang/String;Ljava/lang/String;Ljava/io/File;Lorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore;Z)Lorg/jetbrains/kotlin/gradle/targets/js/binaryen/BinaryenEnv; + public static synthetic fun copy$default (Lorg/jetbrains/kotlin/gradle/targets/js/binaryen/BinaryenEnv;ZLjava/lang/String;ZLjava/lang/String;Ljava/lang/String;Ljava/io/File;Lorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore;ZILjava/lang/Object;)Lorg/jetbrains/kotlin/gradle/targets/js/binaryen/BinaryenEnv; public fun equals (Ljava/lang/Object;)Z + public fun getAllowInsecureProtocol ()Z public fun getCleanableStore ()Lorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore; public fun getDir ()Ljava/io/File; public fun getDownload ()Z @@ -3240,17 +3245,19 @@ public final class org/jetbrains/kotlin/gradle/targets/js/binaryen/BinaryenSetup } public final class org/jetbrains/kotlin/gradle/targets/js/d8/D8Env : org/jetbrains/kotlin/gradle/targets/js/AbstractEnv { - public fun (ZLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/io/File;Lorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore;Z)V + public fun (ZLjava/lang/String;ZLjava/lang/String;Ljava/lang/String;Ljava/io/File;Lorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore;Z)V public final fun component1 ()Z public final fun component2 ()Ljava/lang/String; - public final fun component3 ()Ljava/lang/String; + public final fun component3 ()Z public final fun component4 ()Ljava/lang/String; - public final fun component5 ()Ljava/io/File; - public final fun component6 ()Lorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore; - public final fun component7 ()Z - public final fun copy (ZLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/io/File;Lorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore;Z)Lorg/jetbrains/kotlin/gradle/targets/js/d8/D8Env; - public static synthetic fun copy$default (Lorg/jetbrains/kotlin/gradle/targets/js/d8/D8Env;ZLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/io/File;Lorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore;ZILjava/lang/Object;)Lorg/jetbrains/kotlin/gradle/targets/js/d8/D8Env; + public final fun component5 ()Ljava/lang/String; + public final fun component6 ()Ljava/io/File; + public final fun component7 ()Lorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore; + public final fun component8 ()Z + public final fun copy (ZLjava/lang/String;ZLjava/lang/String;Ljava/lang/String;Ljava/io/File;Lorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore;Z)Lorg/jetbrains/kotlin/gradle/targets/js/d8/D8Env; + public static synthetic fun copy$default (Lorg/jetbrains/kotlin/gradle/targets/js/d8/D8Env;ZLjava/lang/String;ZLjava/lang/String;Ljava/lang/String;Ljava/io/File;Lorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore;ZILjava/lang/Object;)Lorg/jetbrains/kotlin/gradle/targets/js/d8/D8Env; public fun equals (Ljava/lang/Object;)Z + public fun getAllowInsecureProtocol ()Z public fun getCleanableStore ()Lorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore; public fun getDir ()Ljava/io/File; public fun getDownload ()Z @@ -4031,8 +4038,9 @@ public final class org/jetbrains/kotlin/gradle/targets/js/ir/WebpackConfigurator } public final class org/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsEnv : org/jetbrains/kotlin/gradle/targets/js/AbstractEnv { - public fun (ZLorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore;Ljava/io/File;Ljava/io/File;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + public fun (ZLorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore;Ljava/io/File;Ljava/io/File;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)V public final fun component1 ()Z + public final fun component10 ()Z public final fun component2 ()Lorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore; public final fun component3 ()Ljava/io/File; public final fun component4 ()Ljava/io/File; @@ -4041,9 +4049,10 @@ public final class org/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsEnv : org public final fun component7 ()Ljava/lang/String; public final fun component8 ()Ljava/lang/String; public final fun component9 ()Ljava/lang/String; - public final fun copy (ZLorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore;Ljava/io/File;Ljava/io/File;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsEnv; - public static synthetic fun copy$default (Lorg/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsEnv;ZLorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore;Ljava/io/File;Ljava/io/File;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lorg/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsEnv; + public final fun copy (ZLorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore;Ljava/io/File;Ljava/io/File;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)Lorg/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsEnv; + public static synthetic fun copy$default (Lorg/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsEnv;ZLorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore;Ljava/io/File;Ljava/io/File;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Lorg/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsEnv; public fun equals (Ljava/lang/Object;)Z + public fun getAllowInsecureProtocol ()Z public final fun getArchitectureName ()Ljava/lang/String; public fun getCleanableStore ()Lorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore; public fun getDir ()Ljava/io/File; @@ -5700,21 +5709,23 @@ public abstract class org/jetbrains/kotlin/gradle/targets/js/yarn/YarnBasics : o } public final class org/jetbrains/kotlin/gradle/targets/js/yarn/YarnEnv : org/jetbrains/kotlin/gradle/targets/js/AbstractEnv { - public fun (ZLjava/lang/String;Lorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore;Ljava/io/File;Ljava/lang/String;Ljava/lang/String;ZLorg/jetbrains/kotlin/gradle/targets/js/yarn/YarnLockMismatchReport;ZZLjava/util/List;)V + public fun (ZLjava/lang/String;ZLorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore;Ljava/io/File;Ljava/lang/String;Ljava/lang/String;ZLorg/jetbrains/kotlin/gradle/targets/js/yarn/YarnLockMismatchReport;ZZLjava/util/List;)V public final fun component1 ()Z public final fun component10 ()Z - public final fun component11 ()Ljava/util/List; + public final fun component11 ()Z + public final fun component12 ()Ljava/util/List; public final fun component2 ()Ljava/lang/String; - public final fun component3 ()Lorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore; - public final fun component4 ()Ljava/io/File; - public final fun component5 ()Ljava/lang/String; + public final fun component3 ()Z + public final fun component4 ()Lorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore; + public final fun component5 ()Ljava/io/File; public final fun component6 ()Ljava/lang/String; - public final fun component7 ()Z - public final fun component8 ()Lorg/jetbrains/kotlin/gradle/targets/js/yarn/YarnLockMismatchReport; - public final fun component9 ()Z - public final fun copy (ZLjava/lang/String;Lorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore;Ljava/io/File;Ljava/lang/String;Ljava/lang/String;ZLorg/jetbrains/kotlin/gradle/targets/js/yarn/YarnLockMismatchReport;ZZLjava/util/List;)Lorg/jetbrains/kotlin/gradle/targets/js/yarn/YarnEnv; - public static synthetic fun copy$default (Lorg/jetbrains/kotlin/gradle/targets/js/yarn/YarnEnv;ZLjava/lang/String;Lorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore;Ljava/io/File;Ljava/lang/String;Ljava/lang/String;ZLorg/jetbrains/kotlin/gradle/targets/js/yarn/YarnLockMismatchReport;ZZLjava/util/List;ILjava/lang/Object;)Lorg/jetbrains/kotlin/gradle/targets/js/yarn/YarnEnv; + public final fun component7 ()Ljava/lang/String; + public final fun component8 ()Z + public final fun component9 ()Lorg/jetbrains/kotlin/gradle/targets/js/yarn/YarnLockMismatchReport; + public final fun copy (ZLjava/lang/String;ZLorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore;Ljava/io/File;Ljava/lang/String;Ljava/lang/String;ZLorg/jetbrains/kotlin/gradle/targets/js/yarn/YarnLockMismatchReport;ZZLjava/util/List;)Lorg/jetbrains/kotlin/gradle/targets/js/yarn/YarnEnv; + public static synthetic fun copy$default (Lorg/jetbrains/kotlin/gradle/targets/js/yarn/YarnEnv;ZLjava/lang/String;ZLorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore;Ljava/io/File;Ljava/lang/String;Ljava/lang/String;ZLorg/jetbrains/kotlin/gradle/targets/js/yarn/YarnLockMismatchReport;ZZLjava/util/List;ILjava/lang/Object;)Lorg/jetbrains/kotlin/gradle/targets/js/yarn/YarnEnv; public fun equals (Ljava/lang/Object;)Z + public fun getAllowInsecureProtocol ()Z public fun getCleanableStore ()Lorg/jetbrains/kotlin/gradle/tasks/internal/CleanableStore; public fun getDir ()Ljava/io/File; public fun getDownload ()Z diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/AbstractEnv.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/AbstractEnv.kt index bc5675dda52be..6d3613534ce97 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/AbstractEnv.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/AbstractEnv.kt @@ -9,6 +9,8 @@ interface AbstractEnv { val downloadBaseUrl: String? + val allowInsecureProtocol: Boolean + val ivyDependency: String val dir: File diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/AbstractEnvSpec.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/AbstractEnvSpec.kt index cb8f55a3d18ae..bf7b0254e1e45 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/AbstractEnvSpec.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/AbstractEnvSpec.kt @@ -3,8 +3,6 @@ package org.jetbrains.kotlin.gradle.targets.js import org.gradle.api.file.DirectoryProperty import org.gradle.api.provider.Property import org.gradle.api.provider.Provider -import org.gradle.api.provider.ProviderFactory -import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnEnv /** * Instance which describes specific runtimes for JS and Wasm targets @@ -26,6 +24,14 @@ abstract class EnvSpec { */ abstract val downloadBaseUrl: Property + /** + * Indicates whether the use of an insecure protocol is allowable for downloading the tool. + * + * This property determines if insecure protocols (such as HTTP instead of HTTPS) can be permitted + * for downloading the required tool. + */ + abstract val allowInsecureProtocol: Property + /** * Specify where the tool is installed */ diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/AbstractSetupTask.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/AbstractSetupTask.kt index 71a86a108b052..2c2753dd95978 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/AbstractSetupTask.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/AbstractSetupTask.kt @@ -63,6 +63,11 @@ abstract class AbstractSetupTask>( it.downloadBaseUrl } + @get:Input + val allowInsecureProtocol: Provider = env.map { + it.allowInsecureProtocol + } + @Deprecated("Use downloadBaseUrlProvider instead. It uses Gradle Provider API.") val downloadBaseUrl: String? @Internal @@ -144,6 +149,8 @@ abstract class AbstractSetupTask>( repo.name = "Distributions at ${it}" repo.url = URI(it) + repo.isAllowInsecureProtocol = allowInsecureProtocol.get() + repo.patternLayout { it.artifact(artifactPattern) } diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/binaryen/BinaryenEnv.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/binaryen/BinaryenEnv.kt index d48c21ccf7a6b..c86ffb5b31c9d 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/binaryen/BinaryenEnv.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/binaryen/BinaryenEnv.kt @@ -7,6 +7,7 @@ import java.io.File data class BinaryenEnv( override val download: Boolean, override val downloadBaseUrl: String?, + override val allowInsecureProtocol: Boolean, override val ivyDependency: String, override val executable: String, override val dir: File, diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/binaryen/BinaryenRootEnvSpec.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/binaryen/BinaryenRootEnvSpec.kt index 3966a2dd60178..7e066eb45ceff 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/binaryen/BinaryenRootEnvSpec.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/binaryen/BinaryenRootEnvSpec.kt @@ -53,6 +53,7 @@ abstract class BinaryenRootEnvSpec : EnvSpec() { BinaryenEnv( download = downloadValue, downloadBaseUrl = downloadBaseUrl.orNull, + allowInsecureProtocol = allowInsecureProtocol.get(), ivyDependency = "com.github.webassembly:binaryen:$versionValue:${platformValue.platform}@tar.gz", executable = getExecutable("wasm-opt", command.get(), "exe"), dir = targetPath, diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/binaryen/BinaryenRootPlugin.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/binaryen/BinaryenRootPlugin.kt index 258be91a90b03..4958b625202db 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/binaryen/BinaryenRootPlugin.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/binaryen/BinaryenRootPlugin.kt @@ -71,6 +71,7 @@ open class BinaryenRootPlugin : Plugin { ) { download.convention(rootBinaryen.downloadProperty) downloadBaseUrl.convention(rootBinaryen.downloadBaseUrlProperty) + allowInsecureProtocol.convention(false) installationDirectory.convention(rootBinaryen.installationDirectory) version.convention(rootBinaryen.versionProperty) command.convention(rootBinaryen.commandProperty) diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/d8/D8Env.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/d8/D8Env.kt index 8e456aa52eefc..11d124fd9f075 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/d8/D8Env.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/d8/D8Env.kt @@ -7,6 +7,7 @@ import java.io.File data class D8Env( override val download: Boolean, override val downloadBaseUrl: String?, + override val allowInsecureProtocol: Boolean, override val ivyDependency: String, override val executable: String, override val dir: File, diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/d8/D8EnvSpec.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/d8/D8EnvSpec.kt index 604e92e46685d..ed1fc79ed557d 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/d8/D8EnvSpec.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/d8/D8EnvSpec.kt @@ -73,6 +73,7 @@ abstract class D8EnvSpec : EnvSpec() { D8Env( download = downloadValue, downloadBaseUrl = downloadBaseUrl.orNull, + allowInsecureProtocol = allowInsecureProtocol.get(), ivyDependency = "google.d8:v8:$requiredVersion@zip", executable = getExecutable("d8", command.get(), "exe"), dir = targetPath, diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/d8/D8Plugin.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/d8/D8Plugin.kt index c17d25065fa61..4119deeaa79c1 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/d8/D8Plugin.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/d8/D8Plugin.kt @@ -67,6 +67,7 @@ open class D8Plugin : Plugin { ) { download.convention(d8.downloadProperty) downloadBaseUrl.convention(d8.downloadBaseUrlProperty) + allowInsecureProtocol.convention(false) installationDirectory.convention(d8.installationDirectory) version.convention(d8.versionProperty) edition.convention(d8.edition) diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsEnv.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsEnv.kt index 3f3859baaf618..de1ea500ee54a 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsEnv.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsEnv.kt @@ -15,6 +15,7 @@ data class NodeJsEnv( val architectureName: String, override val ivyDependency: String, override val downloadBaseUrl: String?, + override val allowInsecureProtocol: Boolean, ) : AbstractEnv { val isWindows: Boolean get() = platformName == "win" diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsEnvSpec.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsEnvSpec.kt index 6a5eb767f4fa6..731cc19425087 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsEnvSpec.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsEnvSpec.kt @@ -62,6 +62,7 @@ abstract class NodeJsEnvSpec : EnvSpec() { architectureName = architecture, ivyDependency = getIvyDependency(), downloadBaseUrl = downloadBaseUrl.orNull, + allowInsecureProtocol = allowInsecureProtocol.get(), ) } } diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsPlugin.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsPlugin.kt index 3b7b7675d9102..5397b6ef2904a 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsPlugin.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsPlugin.kt @@ -52,6 +52,7 @@ open class NodeJsPlugin : Plugin { download.convention(objects.providerWithLazyConvention { nodeJsConstructor().download }) // set instead of convention because it is possible to have null value downloadBaseUrl.set(objects.providerWithLazyConvention { nodeJsConstructor().downloadBaseUrl }) + allowInsecureProtocol.convention(false) version.convention(objects.providerWithLazyConvention { nodeJsConstructor().version }) command.convention(objects.providerWithLazyConvention { nodeJsConstructor().command }) diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/yarn/YarnEnv.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/yarn/YarnEnv.kt index 4c88f20644517..8c56d2d78209d 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/yarn/YarnEnv.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/yarn/YarnEnv.kt @@ -12,6 +12,7 @@ import java.io.File data class YarnEnv( override val download: Boolean, override val downloadBaseUrl: String?, + override val allowInsecureProtocol: Boolean, override val cleanableStore: CleanableStore, override val dir: File, override val executable: String, diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/yarn/YarnPlugin.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/yarn/YarnPlugin.kt index 5fc0ce0455230..4a8117bf590f8 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/yarn/YarnPlugin.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/yarn/YarnPlugin.kt @@ -137,6 +137,7 @@ open class YarnPlugin : Plugin { ) { download.convention(yarnRootExtension.downloadProperty) downloadBaseUrl.convention(yarnRootExtension.downloadBaseUrlProperty) + allowInsecureProtocol.convention(false) installationDirectory.convention(yarnRootExtension.installationDirectory) version.convention(yarnRootExtension.versionProperty) command.convention(yarnRootExtension.commandProperty) diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/yarn/YarnRootEnvSpec.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/yarn/YarnRootEnvSpec.kt index 6ba88eb96d355..49f713b3c0c8b 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/yarn/YarnRootEnvSpec.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/yarn/YarnRootEnvSpec.kt @@ -91,6 +91,7 @@ abstract class YarnRootEnvSpec : EnvSpec() { YarnEnv( download = downloadValue, downloadBaseUrl = downloadBaseUrl.orNull, + allowInsecureProtocol = allowInsecureProtocol.get(), cleanableStore = cleanableStore, dir = home, executable = getExecutable("yarn", command.get(), "cmd"),