Невозможно загрузить или обновить зависимость моментального снимка, размещенную в реестре пакетов Github, с помощью gradle - PullRequest
0 голосов
/ 01 апреля 2020

У меня проблема с Github Package Registry, когда я пытаюсь загрузить sh или загрузить SNAPSHOT-версии ny gradle plugin . Когда я впервые отправляю publi sh мой пакет, все работает нормально, но затем, когда я пытаюсь установить или обновить этот пакет, я получаю следующие ошибки: publish error install error

Использование исправленной версии (без моментального снимка), кажется, работает (хотя обновление не работает, но это может быть сделано специально, так как это ошибка 422).

Вот моя сборка. Файл gradle.kts, если он помогает.

group = "com.github.imflog"
version = "0.10.0-SNAPSHOT"

plugins {
    kotlin("jvm").version("1.3.71")
    id("java-gradle-plugin")
    id("com.gradle.plugin-publish") version "0.11.0"
    id("maven-publish")
    id("com.github.ben-manes.versions") version "0.28.0"
}

repositories {
    jcenter()
    mavenCentral()
    maven("http://packages.confluent.io/maven/")
}

java {
    withSourcesJar()
}

// Dependencies versions
val confluentVersion = "5.4.1"
val avroVersion = "1.8.2"
dependencies {
    implementation(gradleApi())
    implementation(kotlin("stdlib"))
    implementation("io.confluent", "kafka-schema-registry", confluentVersion) {
        exclude("org.slf4j", "slf4j-log4j12")
    }
}

// Test versions
val junitVersion = "5.6.1"
val mockkVersion = "1.9.3"
val wiremockVersion = "2.26.3"
val assertJVersion = "3.15.0"
dependencies {
    testImplementation(gradleTestKit())
    testImplementation("org.junit.jupiter", "junit-jupiter-api", junitVersion)
    testImplementation("org.junit.jupiter", "junit-jupiter-engine", junitVersion)
    testImplementation("org.assertj", "assertj-core", assertJVersion)
    testImplementation("io.mockk", "mockk", mockkVersion)
    testImplementation("com.github.tomakehurst", "wiremock-jre8", wiremockVersion)
}

tasks.withType<Test> {
    useJUnitPlatform()
}

publishing {
    repositories {
        maven {
            name = "GitHubPackages"
            url = uri("https://maven.pkg.github.com/ImFlog/schema-registry-plugin")
            credentials {
                username = System.getenv("GITHUB_USERNAME")
                password = System.getenv("GITHUB_TOKEN")
            }
        }
    }
}

val registryPluginName = "com.github.imflog.kafka-schema-registry-gradle-plugin"
gradlePlugin {
    plugins {
        create("schema-registry") {
            id = registryPluginName
            description = "A plugin to download, register and test schemas from a Kafka Schema Registry"
            displayName = "Kafka schema registry gradle plugin"
            version = version

            implementationClass = "com.github.imflog.schema.registry.SchemaRegistryPlugin"
        }
    }
}

pluginBundle {
    website = "https://github.com/ImFlog/schema-registry-plugin"
    vcsUrl = "https://github.com/ImFlog/schema-registry-plugin.git"
    tags = listOf("schema", "registry", "schema-registry", "kafka")
}

Спасибо!

...