'import aws codeartifact into intellij with gradle

I am trying to import codeartifact aws library into intellij, my gradle snippet:

implementation platform('software.amazon.awssdk:bom:2.17.140')
  implementation (group: 'software.amazon.awssdk', name: 'codeartifact'){
    //Exclude transitive dependency
    exclude group: 'io.netty'
  }

I do see the dependency when i invoke the 'dependeincies' task of the module:

 ./gradlew :project:module:dependencies | findstr "codeartifact"
|    +--- software.amazon.awssdk:codeartifact:2.17.140 (c)
+--- software.amazon.awssdk:codeartifact -> 2.17.140
+--- software.amazon.awssdk:codeartifact (n)
|    +--- software.amazon.awssdk:codeartifact:2.17.140 (c)
+--- software.amazon.awssdk:codeartifact -> 2.17.140
|    +--- software.amazon.awssdk:codeartifact:2.17.140 (c)
+--- software.amazon.awssdk:codeartifact -> 2.17.140
|    +--- software.amazon.awssdk:codeartifact:2.17.140 (c)
+--- software.amazon.awssdk:codeartifact -> 2.17.140

But when i try to import the package into the code it complains: enter image description here
Any idea what i am doing wrong?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source