Removed unnecessary afterEvaluate for compatibility with gradle 7.0

This commit is contained in:
Alexander Nozik 2021-04-10 15:11:39 +03:00
parent 470c79637d
commit 6d324b6e0d
4 changed files with 15 additions and 16 deletions

View File

@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Removed
### Fixed
- Removed unnecessary `afterEvaluate` for compatibility with gradle 7.0
### Security

View File

@ -8,7 +8,7 @@ plugins {
}
group = "ru.mipt.npm"
version = "0.9.4"
version = "0.9.5-dev"
description = "Build tools for DataForge and kscience projects"

View File

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

View File

@ -26,14 +26,13 @@ internal fun RepositoryHandler.applyRepos(): Unit {
maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-js-wrappers")
}
internal fun Copy.fromJsDependencies(configurationName: String) = project.afterEvaluate {
internal fun Copy.fromJsDependencies(configurationName: String) = project.run {
val configuration = configurations[configurationName]
?: error("Configuration with name $configurationName could not be resolved.")
val projectDeps = configuration.allDependencies.filterIsInstance<ProjectDependency>().map {
it.dependencyProject
}
projectDeps.forEach { dep ->
dep.afterEvaluate {
dep.pluginManager.withPlugin("org.jetbrains.kotlin.multiplatform") {
dep.tasks.findByName("jsProcessResources")?.let { task ->
dependsOn(task)
@ -48,7 +47,6 @@ internal fun Copy.fromJsDependencies(configurationName: String) = project.afterE
}
}
}
}
//