No build artifacts found when publishing on Jitpack

103 views Asked by At

I have published my sdk to Jitpack, it was published susccessfully, but now I updated some of my dependencies, due to these I had to update my Gradle version and Java version. Now my Java version is 17 and gradle version is 8.2.1. When I am making aar file of it, it is building it perfectly, but when I am pushing to jitpack it is saying "Build Successful" but also saying that "No artifacts found". I am sharing my gradle files:
App level gradle:

plugins {
    id 'com.android.application'
}

android {
    namespace 'com.facia.faciademo'
    compileSdk 34

    defaultConfig {
        applicationId "com.facia.faciademo"
        minSdk 21
        targetSdk 34
        versionCode 6
        versionName "1.0.3"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }

    buildFeatures {
        viewBinding true
    }
}
dependencies {
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.11.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

    // dependency for facia SDK
    implementation project(path: ':Facia')

    // Retrofit
    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.9.0'

    implementation 'com.kaopiz:kprogresshud:1.2.0'

    //to update app
    implementation 'com.google.android.play:core:1.10.3'

    implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0"))
}

SDK level gradle:

plugins {
    id 'com.android.library'
    id 'maven-publish'
}

android {
    namespace 'com.facia.faciasdk'
    compileSdk 34

    defaultConfig {
        minSdk 21
        targetSdk 34

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        consumerProguardFiles "consumer-rules.pro"
    }

    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }

    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }

    buildFeatures {
        viewBinding true
    }
}

dependencies {
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.11.0'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

    // CameraX dependencies
    def camerax_version = "1.3.1"
    implementation "androidx.camera:camera-camera2:${camerax_version}"
    implementation "androidx.camera:camera-lifecycle:${camerax_version}"
    implementation "androidx.camera:camera-view:${camerax_version}"
    implementation "androidx.camera:camera-video:${camerax_version}"

    // Retrofit for API calling
    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.9.0'

    // Google mMLKit to detect faces (unbundled)
    implementation 'com.google.android.gms:play-services-mlkit-face-detection:17.1.0'

    // Tf lite dependencies to run model (using for the card detection)
    implementation 'org.tensorflow:tensorflow-lite:2.14.0'
    implementation 'org.tensorflow:tensorflow-lite-support:0.4.4'
}

Project level gradle:

plugins {
    id 'com.android.application' version '8.2.1' apply false
    id 'com.android.library' version '7.2.1' apply false
    id 'com.github.dcendents.android-maven' version '2.1' apply false
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

I pushed this to Jitpack, but No artifacts found, sdk is not published.

Jitpack complete report is:

    Build starting...
Start: Thu Jan 25 08:09:01 UTC 2024 e81701ae6c22
Git:
4.0.0-0-g9c279b0
commit 9c279b0305ab9044efbd9a16ea7a612c25612387
Author: FaciaMobile 
Date:   Thu Jan 25 13:07:58 2024 +0500

    local


Init SDKMan
Running before_install command:
sdk install java 17.0.9-oracle;sdk use java 17.0.9-oracle
[1;33mWe periodically need to update the local cache. Please run:[0m

  $ sdk update

[1;36mBroadcasts discontinued. Please follow @sdkman_ on Twitter for announcements.[0m

Downloading: java 17.0.9-oracle

In progress...


###                                                                        4.8%
#######                                                                   11.0%
############                                                              17.3%
################                                                          23.6%
#####################                                                     29.8%
#########################                                                 35.9%
##############################                                            42.1%
##################################                                        48.2%
#######################################                                   54.2%
###########################################                               60.4%
###############################################                           66.5%
####################################################                      72.6%
########################################################                  78.7%
#############################################################             84.8%
#################################################################         91.0%
#####################################################################     97.1%
######################################################################## 100.0%

Repackaging Java 17.0.9-oracle...

Done repackaging...

[1;32mInstalling: java 17.0.9-oracle[0m
[1;32mDone installing![0m


[1;32mSetting java 17.0.9-oracle as default.[0m
[1;33mWe periodically need to update the local cache. Please run:[0m

  $ sdk update


[1;32mUsing java version 17.0.9-oracle in this shell.[0m
Found gradle
Gradle build script
Found gradle version: 8.2.
Using gradle wrapper
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
Downloading https://services.gradle.org/distributions/gradle-8.2-bin.zip
.10%.20%.30%.40%.50%.60%.70%.80%.90%.100%

------------------------------------------------------------
Gradle 8.2
------------------------------------------------------------

Build time:   2023-06-30 18:02:30 UTC
Revision:     5f4a070a62a31a17438ac998c2b849f4f6892877

Kotlin:       1.8.20
Groovy:       3.0.17
Ant:          Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM:          17.0.9 (Oracle Corporation 17.0.9+11-LTS-201)
OS:           Linux 4.10.0-28-generic amd64

0m3.688s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
java version "17.0.9" 2023-10-17 LTS
Java(TM) SE Runtime Environment (build 17.0.9+11-LTS-201)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.9+11-LTS-201, mixed mode, sharing)
Getting tasks: ./gradlew tasks --all
Tasks: publishToMavenLocal,
Running: ./gradlew clean -Pgroup=com.github.clickupp-mobileapp -Pversion=4.0.0 -xtest -xlint assemble publishToMavenLocal
Checking the license for package Android SDK Build-Tools 34 in /opt/android-sdk-linux/licenses
License for package Android SDK Build-Tools 34 accepted.
Preparing "Install Android SDK Build-Tools 34 v.34.0.0".
"Install Android SDK Build-Tools 34 v.34.0.0" ready.
Installing Android SDK Build-Tools 34 in /opt/android-sdk-linux/build-tools/34.0.0
"Install Android SDK Build-Tools 34 v.34.0.0" complete.
"Install Android SDK Build-Tools 34 v.34.0.0" finished.
Checking the license for package Android SDK Platform 34 in /opt/android-sdk-linux/licenses
License for package Android SDK Platform 34 accepted.
Preparing "Install Android SDK Platform 34 (revision 2)".
"Install Android SDK Platform 34 (revision 2)" ready.
Installing Android SDK Platform 34 in /opt/android-sdk-linux/platforms/android-34
"Install Android SDK Platform 34 (revision 2)" complete.
"Install Android SDK Platform 34 (revision 2)" finished.
> Task :clean UP-TO-DATE
> Task :app:clean UP-TO-DATE
> Task :Facia:clean UP-TO-DATE
> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:mergeDebugNativeDebugMetadata NO-SOURCE
> Task :app:generateDebugResValues
> Task :app:generateDebugResources
> Task :Facia:preBuild UP-TO-DATE
> Task :Facia:preDebugBuild UP-TO-DATE
> Task :app:dataBindingMergeDependencyArtifactsDebug
> Task :Facia:generateDebugResValues
> Task :Facia:generateDebugResources
> Task :Facia:packageDebugResources
> Task :app:packageDebugResources
> Task :app:parseDebugLocalResources
> Task :Facia:dataBindingMergeDependencyArtifactsDebug
> Task :app:mergeDebugResources
> Task :app:javaPreCompileDebug
> Task :Facia:writeDebugAarMetadata
> Task :app:mapDebugSourceSetPaths
> Task :Facia:parseDebugLocalResources

> Task :Facia:processDebugManifest
package="com.facia.faciasdk" found in source AndroidManifest.xml: /home/jitpack/build/Facia/src/main/AndroidManifest.xml.
Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported, and the value is ignored.
Recommendation: remove package="com.facia.faciasdk" from the source AndroidManifest.xml: /home/jitpack/build/Facia/src/main/AndroidManifest.xml.

> Task :app:checkDebugAarMetadata
> Task :Facia:dataBindingGenBaseClassesDebug
> Task :app:createDebugCompatibleScreenManifests
> Task :app:extractDeepLinksDebug
> Task :Facia:extractDeepLinksDebug
> Task :Facia:generateDebugRFile

> Task :app:processDebugMainManifest
package="com.facia.faciademo" found in source AndroidManifest.xml: /home/jitpack/build/app/src/main/AndroidManifest.xml.
Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported, and the value is ignored.
Recommendation: remove package="com.facia.faciademo" from the source AndroidManifest.xml: /home/jitpack/build/app/src/main/AndroidManifest.xml.
[org.tensorflow:tensorflow-lite:2.14.0] /home/jitpack/.gradle/caches/transforms-3/8d850e6bd251edb98f4a787c09ed7ab9/transformed/tensorflow-lite-2.14.0/AndroidManifest.xml Warning:
    Namespace 'org.tensorflow.lite' is used in multiple modules and/or libraries: org.tensorflow:tensorflow-lite:2.14.0, org.tensorflow:tensorflow-lite-api:2.14.0. Please ensure that all modules and libraries have a unique namespace. For more information, See https://developer.android.com/studio/build/configure-app-module#set-namespace
[org.tensorflow:tensorflow-lite-support:0.4.4] /home/jitpack/.gradle/caches/transforms-3/d346d0ec40dfcf3b3310dfa0c8a01c49/transformed/tensorflow-lite-support-0.4.4/AndroidManifest.xml Warning:
    Namespace 'org.tensorflow.lite.support' is used in multiple modules and/or libraries: org.tensorflow:tensorflow-lite-support:0.4.4, org.tensorflow:tensorflow-lite-support-api:0.4.4. Please ensure that all modules and libraries have a unique namespace. For more information, See https://developer.android.com/studio/build/configure-app-module#set-namespace

> Task :app:dataBindingGenBaseClassesDebug
> Task :app:processDebugManifest
> Task :Facia:javaPreCompileDebug
> Task :app:mergeDebugShaders
> Task :Facia:compileDebugLibraryResources

> Task :Facia:compileDebugJavaWithJavac

> Task :app:compileDebugShaders NO-SOURCE
> Task :app:generateDebugAssets UP-TO-DATE
> Task :Facia:mergeDebugShaders
> Task :Facia:compileDebugShaders NO-SOURCE
> Task :Facia:generateDebugAssets UP-TO-DATE
> Task :Facia:bundleLibCompileToJarDebug
> Task :Facia:packageDebugAssets
> Task :app:mergeDebugAssets
> Task :Facia:bundleLibRuntimeToJarDebug
> Task :app:compressDebugAssets
> Task :app:desugarDebugFileDependencies
> Task :app:processDebugJavaRes NO-SOURCE
> Task :Facia:processDebugJavaRes NO-SOURCE
> Task :app:mergeDebugJniLibFolders
> Task :Facia:mergeDebugJniLibFolders
> Task :Facia:mergeDebugNativeLibs NO-SOURCE
> Task :Facia:copyDebugJniLibsProjectOnly
> Task :app:checkDebugDuplicateClasses
> Task :app:mergeDebugJavaResource
> Task :app:validateSigningDebug
> Task :app:processDebugManifestForPackage
> Task :app:mergeLibDexDebug
> Task :app:writeDebugAppMetadata
> Task :app:writeDebugSigningConfigVersions
> Task :app:preReleaseBuild UP-TO-DATE
> Task :app:dataBindingMergeDependencyArtifactsRelease
> Task :app:generateReleaseResValues
> Task :app:generateReleaseResources
> Task :Facia:preReleaseBuild UP-TO-DATE
> Task :Facia:generateReleaseResValues
> Task :Facia:generateReleaseResources
> Task :app:mergeDebugNativeLibs
> Task :Facia:packageReleaseResources

> Task :app:stripDebugDebugSymbols
Unable to strip the following libraries, packaging them as they are: libimage_processing_util_jni.so, libtensorflowlite_jni.so.

> Task :app:processDebugResources
> Task :app:mergeReleaseResources

> Task :app:compileDebugJavaWithJavac

> Task :app:dexBuilderDebug
> Task :app:mergeDebugGlobalSynthetics
> Task :app:packageReleaseResources
> Task :app:parseReleaseLocalResources
> Task :Facia:dataBindingMergeDependencyArtifactsRelease
> Task :Facia:writeReleaseAarMetadata
> Task :app:javaPreCompileRelease
> Task :app:mapReleaseSourceSetPaths
> Task :app:checkReleaseAarMetadata

> Task :Facia:processReleaseManifest
package="com.facia.faciasdk" found in source AndroidManifest.xml: /home/jitpack/build/Facia/src/main/AndroidManifest.xml.
Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported, and the value is ignored.
Recommendation: remove package="com.facia.faciasdk" from the source AndroidManifest.xml: /home/jitpack/build/Facia/src/main/AndroidManifest.xml.

> Task :app:createReleaseCompatibleScreenManifests
> Task :app:extractDeepLinksRelease
> Task :Facia:extractDeepLinksRelease
> Task :Facia:parseReleaseLocalResources
> Task :app:mergeProjectDexDebug

> Task :app:processReleaseMainManifest
package="com.facia.faciademo" found in source AndroidManifest.xml: /home/jitpack/build/app/src/main/AndroidManifest.xml.
Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported, and the value is ignored.
Recommendation: remove package="com.facia.faciademo" from the source AndroidManifest.xml: /home/jitpack/build/app/src/main/AndroidManifest.xml.
[org.tensorflow:tensorflow-lite:2.14.0] /home/jitpack/.gradle/caches/transforms-3/8d850e6bd251edb98f4a787c09ed7ab9/transformed/tensorflow-lite-2.14.0/AndroidManifest.xml Warning:
    Namespace 'org.tensorflow.lite' is used in multiple modules and/or libraries: org.tensorflow:tensorflow-lite:2.14.0, org.tensorflow:tensorflow-lite-api:2.14.0. Please ensure that all modules and libraries have a unique namespace. For more information, See https://developer.android.com/studio/build/configure-app-module#set-namespace
[org.tensorflow:tensorflow-lite-support:0.4.4] /home/jitpack/.gradle/caches/transforms-3/d346d0ec40dfcf3b3310dfa0c8a01c49/transformed/tensorflow-lite-support-0.4.4/AndroidManifest.xml Warning:
    Namespace 'org.tensorflow.lite.support' is used in multiple modules and/or libraries: org.tensorflow:tensorflow-lite-support:0.4.4, org.tensorflow:tensorflow-lite-support-api:0.4.4. Please ensure that all modules and libraries have a unique namespace. For more information, See https://developer.android.com/studio/build/configure-app-module#set-namespace

> Task :Facia:dataBindingGenBaseClassesRelease
> Task :Facia:generateReleaseRFile
> Task :app:processReleaseManifest
> Task :app:dataBindingGenBaseClassesRelease
> Task :app:extractProguardFiles
> Task :Facia:processReleaseJavaRes NO-SOURCE
> Task :Facia:javaPreCompileRelease
> Task :Facia:mergeReleaseJniLibFolders
> Task :app:mergeExtDexDebug

> Task :Facia:compileReleaseJavaWithJavac

> Task :Facia:mergeReleaseNativeLibs NO-SOURCE
> Task :Facia:stripReleaseDebugSymbols NO-SOURCE
> Task :Facia:bundleLibCompileToJarRelease
> Task :Facia:copyReleaseJniLibsProjectAndLocalJars
> Task :Facia:extractDeepLinksForAarRelease UP-TO-DATE
> Task :Facia:bundleLibRuntimeToJarRelease
> Task :Facia:compileReleaseLibraryResources
> Task :Facia:extractReleaseAnnotations
> Task :Facia:createFullJarRelease
> Task :Facia:mergeReleaseGeneratedProguardFiles UP-TO-DATE
> Task :Facia:mergeReleaseConsumerProguardFiles
> Task :Facia:mergeReleaseShaders
> Task :Facia:compileReleaseShaders NO-SOURCE
> Task :Facia:generateReleaseAssets UP-TO-DATE
> Task :Facia:packageReleaseAssets
> Task :Facia:prepareLintJarForPublish UP-TO-DATE
> Task :Facia:prepareReleaseArtProfile UP-TO-DATE
> Task :app:packageDebug
> Task :app:createDebugApkListingFileRedirect
> Task :app:assembleDebug
> Task :Facia:extractProguardFiles
> Task :Facia:mergeReleaseJavaResource
> Task :Facia:writeReleaseLintModelMetadata
> Task :Facia:generateReleaseLibraryProguardRules
> Task :Facia:generateReleaseLintVitalModel
> Task :app:processReleaseManifestForPackage
> Task :app:mergeReleaseJniLibFolders
> Task :Facia:copyReleaseJniLibsProjectOnly
> Task :app:desugarReleaseFileDependencies
> Task :app:checkReleaseDuplicateClasses
> Task :app:mergeReleaseNativeLibs
> Task :app:mergeReleaseArtProfile
> Task :app:processReleaseResources
> Task :Facia:minifyReleaseWithR8
> Task :Facia:lintVitalAnalyzeRelease

> Task :app:stripReleaseDebugSymbols
Unable to strip the following libraries, packaging them as they are: libimage_processing_util_jni.so, libtensorflowlite_jni.so.

> Task :app:compileReleaseJavaWithJavac

> Task :Facia:syncReleaseLibJars
> Task :Facia:bundleReleaseLocalLintAar
> Task :app:extractReleaseNativeSymbolTables
> Task :app:dexBuilderRelease
> Task :Facia:generateReleaseLintModel
> Task :app:generateReleaseLintVitalReportModel
> Task :app:mergeReleaseNativeDebugMetadata NO-SOURCE
> Task :app:mergeReleaseShaders
> Task :app:compileReleaseShaders NO-SOURCE
> Task :app:generateReleaseAssets UP-TO-DATE
> Task :app:mergeReleaseGlobalSynthetics
> Task :app:mergeReleaseAssets
> Task :app:processReleaseJavaRes NO-SOURCE
> Task :app:compressReleaseAssets
> Task :app:collectReleaseDependencies
> Task :app:sdkReleaseDependencyData
> Task :app:writeReleaseAppMetadata
> Task :app:writeReleaseSigningConfigVersions
> Task :Facia:stripDebugDebugSymbols NO-SOURCE
> Task :Facia:copyDebugJniLibsProjectAndLocalJars
> Task :Facia:extractDebugAnnotations
> Task :Facia:extractDeepLinksForAarDebug UP-TO-DATE
> Task :Facia:mergeDebugGeneratedProguardFiles UP-TO-DATE
> Task :Facia:mergeDebugConsumerProguardFiles
> Task :Facia:prepareDebugArtProfile UP-TO-DATE
> Task :Facia:mergeDebugJavaResource
> Task :app:mergeReleaseJavaResource
> Task :Facia:bundleReleaseAar
> Task :Facia:syncDebugLibJars
> Task :app:lintVitalAnalyzeRelease
> Task :Facia:bundleDebugAar
> Task :Facia:assembleDebug
> Task :Facia:mapReleaseSourceSetPaths
> Task :app:lintVitalReportRelease
> Task :app:mergeExtDexRelease
> Task :Facia:mergeReleaseResources
> Task :app:lintVitalRelease
> Task :Facia:publishToMavenLocal UP-TO-DATE
> Task :app:optimizeReleaseResources
> Task :Facia:verifyReleaseResources
> Task :Facia:assembleRelease
> Task :Facia:assemble
> Task :app:mergeDexRelease
> Task :app:compileReleaseArtProfile
> Task :app:packageRelease
> Task :app:createReleaseApkListingFileRedirect
> Task :app:assembleRelease
> Task :app:assemble

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 1m 25s
149 actionable tasks: 139 executed, 10 up-to-date
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2

Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2

Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2

Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
Build tool exit code: 0
Looking for artifacts...
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
Looking for pom.xml in build directory and ~/.m2
[Fatal Error] lint-resources.xml:1:1: Content is not allowed in prolog.
2024-01-25T08:11:19.608069558Z
Exit code: 0

⚠️ ERROR: No build artifacts found
1

There are 1 answers

2
nil On

You would have to declare a publication in order for JitPack to create a local Maven artefact.

Refer this: https://developer.android.com/build/publish-library/upload-library#create-pub

Declare this in your SDK level build.gradle

publishing {
  publications {
    release(MavenPublication) {
      groupId = 'com.my-company'
      artifactId = 'my-library'
      version = '1.0'

      afterEvaluate {
        from components.release
      }
    }
  }
}