Fix repositories handling

This commit is contained in:
Alexander Nozik 2023-02-26 21:00:42 +03:00
parent 185b5514c3
commit a6755e33f5
3 changed files with 9 additions and 8 deletions

View File

@ -1,5 +1,5 @@
[versions] [versions]
tools = "0.14.2-kotlin-1.8.10" tools = "0.14.3-kotlin-1.8.10"
kotlin = "1.8.10" kotlin = "1.8.10"
atomicfu = "0.19.0" atomicfu = "0.19.0"
binary-compatibility-validator = "0.12.1" binary-compatibility-validator = "0.12.1"

View File

@ -102,6 +102,14 @@ public open class KScienceProjectPlugin : Plugin<Project> {
apply<DokkaPlugin>() apply<DokkaPlugin>()
apply<BinaryCompatibilityValidatorPlugin>() apply<BinaryCompatibilityValidatorPlugin>()
allprojects{
repositories{
mavenCentral()
maven("https://repo.kotlin.link")
maven("https://maven.pkg.jetbrains.space/spc/p/sci/dev")
}
}
afterEvaluate { afterEvaluate {
if (isInDevelopment) { if (isInDevelopment) {
configure<ApiValidationExtension> { configure<ApiValidationExtension> {

View File

@ -1,10 +1,8 @@
package space.kscience.gradle.internal package space.kscience.gradle.internal
import org.gradle.api.artifacts.ProjectDependency import org.gradle.api.artifacts.ProjectDependency
import org.gradle.api.artifacts.dsl.RepositoryHandler
import org.gradle.api.tasks.Copy import org.gradle.api.tasks.Copy
import org.gradle.kotlin.dsl.get import org.gradle.kotlin.dsl.get
import org.gradle.kotlin.dsl.maven
import org.jetbrains.kotlin.gradle.plugin.LanguageSettingsBuilder import org.jetbrains.kotlin.gradle.plugin.LanguageSettingsBuilder
import space.kscience.gradle.KScienceVersions import space.kscience.gradle.KScienceVersions
@ -33,11 +31,6 @@ internal fun LanguageSettingsBuilder.applySettings(
optIn("kotlin.js.ExperimentalJsExport") optIn("kotlin.js.ExperimentalJsExport")
} }
internal fun RepositoryHandler.applyRepos() {
mavenCentral()
maven("https://repo.kotlin.link")
}
internal fun Copy.fromJsDependencies(configurationName: String) = project.run { internal fun Copy.fromJsDependencies(configurationName: String) = project.run {
val configuration = configurations[configurationName] val configuration = configurations[configurationName]
?: error("Configuration with name $configurationName could not be resolved.") ?: error("Configuration with name $configurationName could not be resolved.")