O
O
Oleg2021-08-24 17:55:57
Android
Oleg, 2021-08-24 17:55:57

Library via jitpack.io How to specify Java version 11?

Updated the studio to the polar fox. Accordingly, he advises switching to Gradle 7.0.
I have a library on github.
After upgrading to 7.0.1, gradle stopped building on jitpack

Getting tasks: ./gradlew tasks --all
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2

FAILURE: Build failed with an exception.

* Where:
Build file '/home/jitpack/build/api/build.gradle' line: 2

* What went wrong:
An exception occurred applying plugin request [id: 'com.android.library']
> Failed to apply plugin ' com.android.internal.library'.
> Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
- changing the IDE settings.
- changing the JAVA_HOME environment variable.
- changing `org.gradle.java.home` in `gradle.properties`.

From the advice that is offered here, in my opinion it should work
- changing `org.gradle.java.home` in `gradle.properties`.

how and what to slip him, so that the maven plugin would work on their server?

addition
In the official example closed isue
https://github.com/jitpack/android-example/issues/27
trying to comprehend.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Oleg, 2021-08-24
@402d

https://github.com/402d/RawbtAPI/blob/master/jitpa... Understood
the documentation. Cured by creating a file of 2 lines

D
Dmitry Roo, 2021-08-24
@xez

They tell you that you need java 11, but you have 8.
Install 11, and don't forget to check that JAVA_HOME points to the correct place (where 11 lies)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question