Is it possible to repackage external Gradle dependencies using proguard?
why?
I wanna repackage all external dependencies in our SDK because I don't wanna have a problem with dependency conflicts later when we will use this SDK in many different projects.
Related
Is there a way to use fallback dependency in gradle.
For example, there is dependency com.example.module:artifact:version.
How can I "ask" gradle do not crash building if no this artifact found on any of specified repositories, but try to use com.example.fallback_module:vallback_artifact:fallback_version instead?
I am new to Maven and have a quick question. I am using the JBoss IDE and have my Maven project set up. I have several jar files in my Maven Dependencies build path that need to be updated to a newer version. I have tried adding the external jars manually, but they do not go within the Maven Dependencies library and the outdated jar remains within that library.
What is the best way to update the jars with the Maven Dependencies library?
We have a dependency dep which was originally compiled in Java 8. The project requiring this dependency is compiled and run with Java 6. This results ``bad major version'' error.
We have the sources available in our central repository for dep and looking for a way that the sources are downloaded in build.gradle:
compile('dep_group:dep_artifact:version:sources')
and then recompile in JDK 6 to produce the required jar file.
Is it possible? Or any suggestions?
Alternatively, we have to download the code of dep offline, recompile with JDK 6, publish the jar file and finally add it as a dependency. But we are looking to avoid this long route. This is just for testing purposes and we do not want to publish a new version compiled with an older version of Java.
Without original build file (POM / build.gradle / ant.xml) you cannot recompile library. If it is a rather simple library - possible option is to include its sources as additional module in multi-module Gradle project:
Download sources
Create folder for them in your project
Create additional module as described in Gradle docs: https://docs.gradle.org/current/userguide/multi_project_builds.html
Apply java plugin for module
Set dependency on this project in format: compile(project(':dep'))
Finally, when you build your project Gradle will compile this module and use it as dependency for your main module.
Do not forget to check library license, e.g. Apache License 2 permits such a simple usage of sources.
I added gral-core Maven dependency to my project as it is explained here
http://trac.erichseifert.de/gral/wiki/Download
Problem is that I also need to add gral-examples.jar in Maven dependencies, but I cannot find the code for it. I need this to work because I share this project with few other people via EGit plugin for Eclipse, so I can't just add this library to build path, I need it to be Maven dependency.
I want to include Astyanax into my project. I checkout the code from github and compiled it with "gradlew build". I am not familiar with gradle.
I include the Astyanx jar files manually into my project. When I run it, it complains about missing Jar.
I wonder, where I can download all the dependencies bundle for Astyanax?
Java library projects often don't provide a single download location for their dependencies. Instead, you would typically use a build tool that supports Maven repositories (e.g. Maven or Gradle) for your own project, which would then automatically download required dependencies behind the scenes.
If you do want to get hold of all dependencies for the Astyanax project, try to add the following to its build.gradle:
task copyLibs(type: Copy) {
from configurations.runtime
into "libs"
}
Running gradlew copyLibs should then copy all (compile and runtime) dependencies into the libs directory.