Skip to content

Comments

Fix build.gradle to allow JAR generation on Jetpack.io#1

Open
arielson wants to merge 1 commit intoExCiteS:masterfrom
arielson:master
Open

Fix build.gradle to allow JAR generation on Jetpack.io#1
arielson wants to merge 1 commit intoExCiteS:masterfrom
arielson:master

Conversation

@arielson
Copy link

This update in build.gradle fixes an issue where the JAR file was not being generated when building the project on Jetpack.io.

The problem was caused by [brief reason if known, e.g., a missing apply plugin or misconfigured tasks], which prevented Jetpack from completing the build successfully.

After this change, the project builds properly on Jetpack.io and produces the expected .jar output.

Please consider merging this fix. Let me know if any adjustments are needed.

@divyameher
Copy link

divyameher commented Jun 23, 2025

Any update on the expected timeline for this to be reviewed or merged? This appears to address the same issue I encountered, which led me to open a GitHub issue earlier.

@davideramoaxa
Copy link

@mstevens83 please!

@davideramoaxa
Copy link

@prickles @michalis-vitos please!

@davideramoaxa
Copy link

@arielson it doesn't seem to publish to jitpack actually

Build starting...
Build image: default
Start: Tue Jun 24 14:10:29 UTC 2025 9e8bdbb08269
Git:
v1.11-0-g4ad6ef9
commit 4ad6ef94d0b2901b36293b12a44d6d5b7521c928
Author: Arielson Ferreira 
Date:   Tue Jun 17 10:47:42 2025 -0300

    Update build.gradle


Init SDKMan
Found gradle
Gradle build script
Gradle wrapper found
Init SDKMan
Found gradle version: 4.5.1.
Using gradle wrapper
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
Downloading https://services.gradle.org/distributions/gradle-4.5.1-all.zip
.
Unzipping /home/jitpack/.gradle/wrapper/dists/gradle-4.5.1-all/87kuriyahurjjkki3zii366f2/gradle-4.5.1-all.zip to /home/jitpack/.gradle/wrapper/dists/gradle-4.5.1-all/87kuriyahurjjkki3zii366f2
Set executable permissions for: /home/jitpack/.gradle/wrapper/dists/gradle-4.5.1-all/87kuriyahurjjkki3zii366f2/gradle-4.5.1/bin/gradle

------------------------------------------------------------
Gradle 4.5.1
------------------------------------------------------------

Build time:   2018-02-05 13:22:49 UTC
Revision:     37007e1c012001ff09973e0bd095139239ecd3b3

Groovy:       2.4.12
Ant:          Apache Ant(TM) version 1.9.9 compiled on February 2 2017
JVM:          1.8.0_292 (Private Build 25.292-b10)
OS:           Linux 4.14.63-xxxx-std-ipv6-64 amd64

0m4.003s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
openjdk version "1.8.0_292"
OpenJDK Runtime Environment (build 1.8.0_292-8u292-b10-0ubuntu1~16.04.1-b10)
OpenJDK 64-Bit Server VM (build 25.292-b10, mixed mode)
Getting tasks: ./gradlew tasks --all
Found tasks
Tasks: publishToMavenLocal,
Found javadoc task

Running: ./gradlew clean -Pgroup=com.github.arielson -Pversion=v1.11 -xtest assemble publishToMavenLocal

:clean UP-TO-DATE
:compileJava NO-SOURCE
:processResources NO-SOURCE
:classes UP-TO-DATE
:jar
:assemble
:generatePomFileForShadowPublication
:shadowJar
Download https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.11/commons-codec-1.11.pom
Download https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/42/commons-parent-42.pom
Download https://repo.maven.apache.org/maven2/org/apache/apache/18/apache-18.pom
Download https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.11/commons-codec-1.11.jar
:publishShadowPublicationToMavenLocal
:publishToMavenLocal

BUILD SUCCESSFUL in 2s
5 actionable tasks: 4 executed, 1 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
Archive: :build:unspecified
Build tool exit code: 0
Looking for artifacts...
Looking for pom.xml in build directory and ~/.m2
Found artifact: commons-codec:commons-codec-shaded:1.11
Found artifact: :build:unspecified
2025-06-24T14:10:47.80780617Z
Exit code: 0

No build artifacts found
Expected artifacts in: $HOME/.m2/repository/commons-codec/commons-codec-shaded/1.11

Copy link

@davideramoaxa davideramoaxa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem to publish properly

@divyameher
Copy link

Any update on this?

@davideramoaxa
Copy link

@divyameher I don't know your dev toolchain, I'm working with Ionic/Capacitor/React.
I've patched my npm dependency to point to my jitpack artefact.
If you can switch dependency, in the meanwhile, you can use this:
https://jitpack.io/#axa-ch-mobile-app/apache-commons-codec-shaded
I've published the same original 1.11 version under 1.11.1
The github repo is: https://github.com/axa-ch-mobile-app/apache-commons-codec-shaded

Hope this helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants