I'm using Gradle 7.4 and see this error when tryin...
# configuration-cache
t
I'm using Gradle 7.4 and see this error when trying to use the configuration cache on a project with maven-publish
Copy code
field repository of org.gradle.api.publish.maven.tasks.PublishToMavenRepository$RepositorySpec$UnsupportedRepositorySpec
It looks like it's referring to this field:
Copy code
public class PublishToMavenRepository extends AbstractPublishToMaven {
  private final Var<MavenArtifactRepository> repository = Transient.varOf();
but I'm not sure. I still have some trouble reading these CC issue reports
โœ… 1
r
Hey Tony, weโ€™re definitely missing better reporting but a
UnsupportedRepositorySpec
there means the repository is not
file://
based.
t
is it this section and, if so, can you tell me how to fix it?
Copy code
ext.isSnapshot = version.toString().endsWith('-SNAPSHOT')

publishing {
  repositories {
    maven {
      name = artifactoryRepoName

      def releasesUrl = 'https://<<square>>/artifactory/releases/'
      def snapshotsUrl = 'https://<<square>>/artifactory/snapshots/'
      url = isSnapshot ? snapshotsUrl : releasesUrl
r
Iโ€™m afraid publishing to remote repositories is not yet supported by the configuration cache :/
t
ohhhh got it. I'll mark all those tasks as incompatible, then
r
๐Ÿ‘
t
the CC report should link to that issue ๐Ÿ™‚
๐Ÿ™‚ 1
also thank you
r
youโ€™re welcome!
t
shouldn't this work?
Copy code
tasks.withType(PublishToMavenRepository).configureEach {
  notCompatibleWithConfigurationCache('See <https://github.com/gradle/gradle/issues/13468>')
}
I get the same error report, though.
r
But does the build still fail?
reports are still generated for
notCompatibleWCC
tasks
t
oh derp. The issue was that I had another CC issue that I'd fixed in a separate PR, so it was failing on that. Serves me right for trying to do focused PRs, one issue at a time ๐Ÿ˜…
๐Ÿ˜‚ 1
tl;dr all good now, thanks again
r
great ๐Ÿ‘