4

II'm trying to publish my lib but i'm having some problems related to its publication.

I'm using this library https://github.com/vanniktech/gradle-maven-publish-plugin to publish my project on maven central (oss), but, this for some reason only -sources.jar, -javadoc.jar and .module are being pushed to the repository, however file-butler-0.1.4-SNAPSHOT.jar is missing :(

Does someone have any idea?

image presenting the files that were published to maven repository

build.gradle(module)

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(project)

// 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 publish the expected jar to my local repository.

Thiago Souto
  • 761
  • 5
  • 13

0 Answers0