From a6755e33f5c2c8e6bec4e9f08db4bc0117d729d8 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Sun, 26 Feb 2023 21:00:42 +0300 Subject: [PATCH] Fix repositories handling --- gradle/libs.versions.toml | 2 +- .../kotlin/space/kscience/gradle/KScienceProjectPlugin.kt | 8 ++++++++ src/main/kotlin/space/kscience/gradle/internal/common.kt | 7 ------- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7186436..efe2f8c 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -tools = "0.14.2-kotlin-1.8.10" +tools = "0.14.3-kotlin-1.8.10" kotlin = "1.8.10" atomicfu = "0.19.0" binary-compatibility-validator = "0.12.1" diff --git a/src/main/kotlin/space/kscience/gradle/KScienceProjectPlugin.kt b/src/main/kotlin/space/kscience/gradle/KScienceProjectPlugin.kt index c6b135f..4918dab 100644 --- a/src/main/kotlin/space/kscience/gradle/KScienceProjectPlugin.kt +++ b/src/main/kotlin/space/kscience/gradle/KScienceProjectPlugin.kt @@ -102,6 +102,14 @@ public open class KScienceProjectPlugin : Plugin { apply() apply() + allprojects{ + repositories{ + mavenCentral() + maven("https://repo.kotlin.link") + maven("https://maven.pkg.jetbrains.space/spc/p/sci/dev") + } + } + afterEvaluate { if (isInDevelopment) { configure { diff --git a/src/main/kotlin/space/kscience/gradle/internal/common.kt b/src/main/kotlin/space/kscience/gradle/internal/common.kt index f1f2df4..0979bd2 100644 --- a/src/main/kotlin/space/kscience/gradle/internal/common.kt +++ b/src/main/kotlin/space/kscience/gradle/internal/common.kt @@ -1,10 +1,8 @@ package space.kscience.gradle.internal import org.gradle.api.artifacts.ProjectDependency -import org.gradle.api.artifacts.dsl.RepositoryHandler import org.gradle.api.tasks.Copy import org.gradle.kotlin.dsl.get -import org.gradle.kotlin.dsl.maven import org.jetbrains.kotlin.gradle.plugin.LanguageSettingsBuilder import space.kscience.gradle.KScienceVersions @@ -33,11 +31,6 @@ internal fun LanguageSettingsBuilder.applySettings( optIn("kotlin.js.ExperimentalJsExport") } -internal fun RepositoryHandler.applyRepos() { - mavenCentral() - maven("https://repo.kotlin.link") -} - internal fun Copy.fromJsDependencies(configurationName: String) = project.run { val configuration = configurations[configurationName] ?: error("Configuration with name $configurationName could not be resolved.")