diff --git a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/dependencies/DependenciesTracker.kt b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/dependencies/DependenciesTracker.kt index 13246f49c..9ebf85e2f 100644 --- a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/dependencies/DependenciesTracker.kt +++ b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/dependencies/DependenciesTracker.kt @@ -10,6 +10,7 @@ import de.fayard.refreshVersions.core.internal.forNpm import de.fayard.refreshVersions.core.internal.withGlobalRepos import de.fayard.refreshVersions.core.internal.withPluginsRepos import okhttp3.OkHttpClient +import org.gradle.api.InvalidUserCodeException import org.gradle.api.Project import org.gradle.api.artifacts.ConfigurationContainer import org.gradle.api.artifacts.Dependency @@ -35,7 +36,11 @@ internal class DependenciesTracker { // and https://yarnpkg.com/getting-started/migration#update-your-configuration-to-the-new-settings // and also https://yarnpkg.com/configuration/yarnrc#npmRegistryServer rootProject.allprojects { - afterEvaluate { + try { + afterEvaluate { + recordBuildscriptAndRegularDependencies(npmRegistries) + } + } catch (e: InvalidUserCodeException) { recordBuildscriptAndRegularDependencies(npmRegistries) } }