Skip to content

Commit

Permalink
Configuration.getObservedState(): check for ConfigurationInternal.Int…
Browse files Browse the repository at this point in the history
…ernalState.UNRESOLVED only
  • Loading branch information
rpalcolea committed Oct 2, 2023
1 parent 623bbbc commit 5a5ef2d
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@ fun Configuration.getObservedState(): Configuration.State {
val f: Field = this::class.java.findDeclaredField("observedState")
f.isAccessible = true
val resolvedState = f.get(this) as ConfigurationInternal.InternalState
if (resolvedState != ConfigurationInternal.InternalState.ARTIFACTS_RESOLVED && resolvedState != ConfigurationInternal.InternalState.GRAPH_RESOLVED) {
return Configuration.State.UNRESOLVED
} else
//whether resolution contained error is not handled
return Configuration.State.RESOLVED
return if(resolvedState != ConfigurationInternal.InternalState.UNRESOLVED)
Configuration.State.RESOLVED else Configuration.State.UNRESOLVED
}

0 comments on commit 5a5ef2d

Please sign in to comment.