Not able to consume Gradle Plugin Snapshot

Hello Gradle community,

I recently upgraded my project from Gradle 8.2 to 8.4, and I’m facing an issue with consuming snapshot dependencies from my Maven repository, where I have a Gradle plugin published. Everything was working fine with Gradle 8.2, but after the upgrade, I’m unable to resolve snapshot dependencies. Release publications do work though.

For better understanding, I’m trying to publish both the snapshots and release repositories in a local folder on my local machine.

I can consume the release publications without any issues, but not the snapshot ones.

In the project where I have hosted the Gradle plugin, I have a Gradle script called my-script.kts, with a content similar to the following one:

plugins {
    `maven-publish`
}

afterEvaluate {
    publishing {
        publications {
            named<MavenPublication>("pluginMaven") {
                groupId = project.properties[groupIdKey].toString()
                artifactId = project.properties[artifactIdKey].toString()
                version = version(project.properties[versionNameKey].toString())
            }
        }

        repositories {
            // Release Repository Definition
            maven {
                name = "release"
                url = uri("path-to-my-local-folder")
            }
            // Snapshot Repository Definition
            maven {
                name = "snapshot"
                url = uri("path-to-my-local-folder")
            }
        }
    }
}

Then, in the build.gradle of my Gradle plugin, I have:

plugins {
    `java-gradle-plugin`
    id(Kotlin.jvm)
    `kotlin-dsl`
    id("my-script")
}

version = version(project.properties[versionNameKey].toString())
group = project.properties[groupIdKey].toString()

gradlePlugin {
    plugins {
        create("myArtifactId") {
            id = "mydomain.myArtifactId"
            implementationClass = "com.mydomain.myClass"
        }
    }
}

Here’s the output after running the task

./gradlew publishAllPublicationsToSnapshotRepository

            ├── myArtifactId
                │   ├── 2.0.0-alpha-5558-SNAPSHOT
                │   │   ├── myArtifactId-2.0.0-alpha-5558-20240619.084912-1.jar
                │   │   ├── myArtifactId-2.0.0-alpha-5558-20240619.084912-1.jar.md5
                │   │   ├── myArtifactId-2.0.0-alpha-5558-20240619.084912-1.jar.sha1
                │   │   ├── myArtifactId-2.0.0-alpha-5558-20240619.084912-1.jar.sha256
                │   │   ├── myArtifactId-2.0.0-alpha-5558-20240619.084912-1.jar.sha512
                │   │   ├── myArtifactId-2.0.0-alpha-5558-20240619.084912-1.module
                │   │   ├── myArtifactId-2.0.0-alpha-5558-20240619.084912-1.module.md5
                │   │   ├── myArtifactId-2.0.0-alpha-5558-20240619.084912-1.module.sha1
                │   │   ├── myArtifactId-2.0.0-alpha-5558-20240619.084912-1.module.sha256
                │   │   ├── myArtifactId-2.0.0-alpha-5558-20240619.084912-1.module.sha512
                │   │   ├── myArtifactId-2.0.0-alpha-5558-20240619.084912-1.pom
                │   │   ├── myArtifactId-2.0.0-alpha-5558-20240619.084912-1.pom.md5
                │   │   ├── myArtifactId-2.0.0-alpha-5558-20240619.084912-1.pom.sha1
                │   │   ├── myArtifactId-2.0.0-alpha-5558-20240619.084912-1.pom.sha256
                │   │   ├── myArtifactId-2.0.0-alpha-5558-20240619.084912-1.pom.sha512
                │   │   ├── maven-metadata.xml
                │   │   ├── maven-metadata.xml.md5
                │   │   ├── maven-metadata.xml.sha1
                │   │   ├── maven-metadata.xml.sha256
                │   │   └── maven-metadata.xml.sha512
                │   ├── mydomain.myArtifactId.gradle.plugin
                │   │   ├── 2.0.0-alpha-5558-SNAPSHOT
                │   │   │   ├── mydomain.myArtifactId.gradle.plugin-2.0.0-alpha-5558-20240619.084912-1.pom
                │   │   │   ├── mydomain.myArtifactId.gradle.plugin-2.0.0-alpha-5558-20240619.084912-1.pom.md5
                │   │   │   ├── mydomain.myArtifactId.gradle.plugin-2.0.0-alpha-5558-20240619.084912-1.pom.sha1
                │   │   │   ├── mydomain.myArtifactId.gradle.plugin-2.0.0-alpha-5558-20240619.084912-1.pom.sha256
                │   │   │   ├── mydomain.myArtifactId.gradle.plugin-2.0.0-alpha-5558-20240619.084912-1.pom.sha512
                │   │   │   ├── maven-metadata.xml
                │   │   │   ├── maven-metadata.xml.md5
                │   │   │   ├── maven-metadata.xml.sha1
                │   │   │   ├── maven-metadata.xml.sha256
                │   │   │   └── maven-metadata.xml.sha512
                │   │   ├── maven-metadata.xml
                │   │   ├── maven-metadata.xml.md5
                │   │   ├── maven-metadata.xml.sha1
                │   │   ├── maven-metadata.xml.sha256
                │   │   └── maven-metadata.xml.sha512
                │   ├── maven-metadata.xml
                │   ├── maven-metadata.xml.md5
                │   ├── maven-metadata.xml.sha1
                │   ├── maven-metadata.xml.sha256
                │   └── maven-metadata.xml.sha512

From the build.gradle of the project where I’m consuming the plugin I’m using:

plugins {
    id("mydomain.myArtifactId") version "2.0.0-alpha-5558-SNAPSHOT"
}

But when I’m trying to consume the plugin in another project I get the following error:

  • Exception is:
    org.gradle.api.plugins.UnknownPluginException: Plugin [id: ‘mydomain.myArtifactId’, version: ‘2.0.0-alpha-5558-SNAPSHOT’] was not found in any of the following sources:

And between the sources there are of course the release and snapshot repository i.e.,

maven(file:/path-to-my-local-folder/snapshot)
maven2(file:/path-to-my-local-folder/release)

I would appreciate any guidance or suggestions on resolving this issue with consuming snapshot dependencies after upgrading to Gradle 8.4, since I’ve been reviewing the release notes from 8.3 and 8.4 and saw nothing relevant to this that could be affecting.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật