I have made an android library and uploaded to Github. (https://github.com/Shekhar23/TxtLogSdk)
Now I want to add to jitpack.io. But I get an error!
How can I upload to jitpack.io?
Build log : https://jitpack.io/com/github/Shekhar23/TxtLogSdk/2.1/build.log
A problem occurred evaluating project ':app'.
Failed to apply plugin [id 'com.android.internal.version-check'] Minimum supported Gradle version is 6.1.1. Current version is 4.8.1. If using the gradle wrapper, try editing the distributionUrl in /home/jitpack/build/gradle/wrapper/gradle-wrapper.properties to gradle-6.1.1-all.zip
Initially I also had this error with Gradle 4.8.1, which was for sure confusing:
Found gradle
Gradle build script
WARNING: gradle/wrapper/gradle-wrapper.jar does not exist! Needs to be committed.
ERROR: Gradle wrapper not found. Please add. Using default gradle to build.
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
Welcome to Gradle 4.8.1!
See build.log for details.
What I actually missed, is including ./gradlew
and ./gradle/wrapper/gradle-wrapper.jar
into the git repository. Yes! You should upload these files to github!
After that you can use the latest gradle version, which is awesome! Here is the build log:
Found gradle
Gradle build script
Found gradle version: 6.5.
Using gradle wrapper
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
Downloading https://services.gradle.org/distributions/gradle-6.5-all.zip
...
------------------------------------------------------------
Gradle 6.5
See build.log for details.
P.S. Plugin com.github.dcendents.android-maven
should be included to two build.gradle
-files as described in the manual.