Maven将缺少的工件发布到存储库

时间:2020-11-09 05:12:25

标签: kotlin gradle maven-2 lib maven-publish

我正在尝试发布我的库,但是与它的发布有关。

我正在使用此库https://github.com/vanniktech/gradle-maven-publish-plugin在maven Central(oss)上发布我的项目,但是由于某些原因,只有-sources.jar-javadoc.jar.module是被推送到存储库,但是file-butler-0.1.4-SNAPSHOT.jar丢失了:(

有人有什么主意吗?

image presenting the files that were published to maven repository

build.gradle(模块)

plugins {
    id 'java-library'
    id 'kotlin'
    id 'kotlin-kapt'
}
dependencies {
    def gson = "com.google.code.gson:gson:2.8.6"
    def moshi = "com.squareup.moshi:moshi:1.11.0"
    def moshCodeGen = "com.squareup.moshi:moshi-kotlin-codegen:1.11.0"

    implementation(Deps.core.kotlin)
    implementation(gson)
    implementation(moshi)
    kapt(moshCodeGen)

    testImplementation(Deps.testing.truth)
    testImplementation(Deps.testing.jUnit)
    kaptTest(moshCodeGen)
}
sourceSets {
    main.kotlin.srcDirs += 'src/main/kotlin'
    main.java.srcDirs += 'src/main/java'
}
apply plugin: "com.vanniktech.maven.publish"

build.gradle.kts(项目)

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        mavenCentral()
        google()
        jcenter()
    }
    dependencies {
        classpath("com.android.tools.build:gradle:4.1.0")
        classpath(kotlin("gradle-plugin", "1.4.10"))
        classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.4.10")
        classpath("com.vanniktech:gradle-maven-publish-plugin:0.13.0")

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}



allprojects {
    repositories {
        mavenCentral()
        google()
        jcenter()
    }
}

task<Delete>("clean") {
    delete(rootProject.buildDir)
}

ps:publishToMavenLocal将预期的jar发布到我的本地存储库。

0 个答案:

没有答案