How to solve Jitpack "ERROR: No build artifacts found"?

raury

Jitpack builds my project with this logs. As you can see there is an error: "ERROR: No build artifacts found".

What i do wrong?

Here is my gradle.build:

plugins {
    id 'java'
    id 'maven-publish'
}

group 'com.github.azzztec'
version '1.0.0-SNAPSHOT'

repositories {
    mavenCentral()
}

dependencies {
    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
}

test {
    useJUnitPlatform()
}

wrapper {
    gradleVersion = "7.0.2"
    distributionType = Wrapper.DistributionType.ALL
}
Huka

I got the same issue with you, then I fixed it by follow these steps:

  1. Add publish plugin
id 'maven-publish'
  1. Custom publishing
publishing {
    publications {
        mavenJava(MavenPublication) {
            groupId = 'org.gradle.sample'
            artifactId = 'library'
            version = '1.1'

            from components.java
        }
    }
}

You can see the full example here: https://github.com/hukacode/huka-common/blob/main/build.gradle

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related