How to build a gradle jar from a github library

BayanR

I have attempted to rebuild the jar for https://github.com/square/okhttp library. However, this is the error I get after first cloning it and then calling "gradle assemble". Is there something incorrect about my method?

FAILURE: Build failed with an exception.

  • Where: Build file '/Users/test/okhttptest/okhttp/build.gradle' line: 75

  • What went wrong: Plugin [id: 'ru.vyarus.animalsniffer', version: '1.5.1'] was not found in any of the following sources:

  • Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
  • Plugin Repositories (could not resolve plugin artifact 'ru.vyarus.animalsniffer:ru.vyarus.animalsniffer.gradle.plugin:1.5.1') Searched in the following repositories: Gradle Central Plugin Repository
  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 617ms

Bernd Farka

You problem is that you are using a locally installed gradle version since your call is "gradle assemble". your gradle version is propably too old so you it can't handle the plugin.

This repository has a gradle-wrapper (gradlew) checked in.

https://docs.gradle.org/current/userguide/gradle_wrapper.html

change your call into ./gradlew assemble and the wrapper will handle the download of the required gradle version and will handle all the dependencies for you.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to build jar library with dependencies with gradle?

In an Android Gradle build, how to exclude dependencies from an included jar file?

How to include only specific jar from libs into gradle build?

How to build sources jar with gradle

How to build jar on windows with gradle

How to add a github library to gradle

How to read a library's versionName from build.gradle?

Creating a library .jar from Github in Netbeans

Locating jar from gradle build in Mac

How to make this (github) source into a library/jar?

Including subproject gradle build outputs in JAR file and runtime library path

gradle: modify build of library from project

Spring Boot + Gradle: how to build executable jar

How to exclude a jar from gradle

How to exclude a jar from gradle

How to specify admob library in build.gradle?

How to build an android library with Android Studio and gradle?

How to build and install a cloned GitHub library?

How to import a library from github?

How to build an maven executable jar with external jar library?

[Jar][Android P] How to build a jar library into /vendor/framework

How to translate gradle jar config in build.gradle into plugin code

How to build valid JAR file with gradle from Ktor Kotlin/Java app

Gradle: how do I include a local jar from a dependent java project in an Android build?

How to create a codepipeline to build jar file from java code stored at github and deploy it to lambda function?

Multimodule gradle build jar

Build jar library with Xamarin

How to exclude library from all dependencies in Kotlin DSL build.gradle?

Bazel C++ how to include a library that needs to be cloned from github then build before it can be linked?