Skip to content

Commit

Permalink
Workaround Gradle exception when the project was apparently already e…
Browse files Browse the repository at this point in the history
…valuated
  • Loading branch information
LouisCAD committed Sep 27, 2023
1 parent 9342a31 commit ac75e67
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
}
}
Expand Down

0 comments on commit ac75e67

Please sign in to comment.