Commit fd26e2d 1 parent 6a5c0af commit fd26e2d Copy full SHA for fd26e2d
File tree 2 files changed +4
-4
lines changed
plugins/core/src/main/kotlin/de/fayard/refreshVersions/core
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -25,8 +25,9 @@ open class RefreshVersionsCorePlugin : Plugin<Project> {
25
25
group = " refreshVersions"
26
26
description = " Search for new dependencies versions and update $versionsFileName "
27
27
if (shouldUpdateVersionCatalogs) {
28
- this .defaultVersionCatalog = VersionsCatalogs .getDefault(project)
29
- this .defaultVersionCatalogFile = project.file(VersionsCatalogs .LIBS_VERSIONS_TOML )
28
+ this .defaultVersionCatalog = VersionsCatalogs .getDefault(project)?.also {
29
+ this .defaultVersionCatalogFile = project.file(VersionsCatalogs .LIBS_VERSIONS_TOML )
30
+ }
30
31
}
31
32
rootProjectSettingsFile = project.file(" settings.gradle.kts" ).let { kotlinDslSettings ->
32
33
if (kotlinDslSettings.exists()) kotlinDslSettings else {
Original file line number Diff line number Diff line change @@ -129,8 +129,7 @@ open class RefreshVersionsTask : DefaultTask() {
129
129
if (versionPropertiesUpdated) OutputFile .VERSIONS_PROPERTIES .logFileWasModified()
130
130
131
131
if (shouldUpdateVersionCatalogs) {
132
- val libsToml = defaultVersionCatalogFile!!
133
- if (libsToml.canRead()) {
132
+ defaultVersionCatalogFile?.let { libsToml ->
134
133
val updated = VersionsCatalogUpdater (
135
134
file = libsToml,
136
135
dependenciesUpdates = result.dependenciesUpdatesForVersionCatalog
You can’t perform that action at this time.
0 commit comments