Gradle – download dependencies, lock versions and update dependencies manually

My solution works for Gradle configuration using java or android plugins. java plugin defines compile and testCompile configurations. compile is for dependencies that are required to compile the production source of the project. testCompile is for dependencies that are required to compile the test source of the project. Let’s define our own configurations in build.gradle: … Read more

How can I manage client-side JavaScript dependencies? [closed]

RequireJS does everything you need. My answer to this question may help you. Example: Client app project hierarchy: sampleapp |___ main.js |___ cs.js |___ require.js main.js is where you initialize your client application and configure RequireJS: require.config({ baseUrl: “/sampleapp”, paths: { jquery: “libs/jquery”, // Local underscore: “http://underscorejs.org/underscore-min.js”, // Remote backbone: “https://github.com/documentcloud/backbone/blob/master/backbone-min.js” // Remote on GitHub … Read more

Create an AAR with multiple AARs/JARs

I haven’t seen a definitive response that enables me to create an AAR that includes 1 or more AARs or JARs. Yes, I think because this topic is not limited to AAR or JAR, but how Maven manage dependency. https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html while I was able to generate one AAR file that I can use in my … Read more

Correct way to check Java version from BASH script

Perhaps something like: if type -p java; then echo found java executable in PATH _java=java elif [[ -n “$JAVA_HOME” ]] && [[ -x “$JAVA_HOME/bin/java” ]]; then echo found java executable in JAVA_HOME _java=”$JAVA_HOME/bin/java” else echo “no java” fi if [[ “$_java” ]]; then version=$(“$_java” -version 2>&1 | awk -F ‘”‘ ‘/version/ {print $2}’) echo version … Read more

How to find/remove unused dependencies in Gradle

UPDATE for Kotlin Users: 17 December 2021: Detects missing or superfluous build dependencies in Kotlin projects : Version 1.0.9 (latest) I have added 2 types of configuration for Kotlin users. Using the plugins DSL Using legacy plugin application Using the plugins DSL: plugins { id(“com.faire.gradle.analyze”) version “1.0.9” } Using legacy plugin application: buildscript { repositories … Read more

What do square brackets mean in pip install?

The syntax that you are using is: pip install “project[extra]” In your case, you are installing the splinter package which has the added support for django. The square brackets ([]) are not specific syntax, just convention. Really, you are installing the package named: “splinter[django]”. An explanation from @chetner: The command pip install splinter django would … Read more

In Gradle, how do I declare common dependencies in a single place?

You can declare common dependencies in a parent script: ext.libraries = [ // Groovy map literal spring_core: “org.springframework:spring-core:3.1”, junit: “junit:junit:4.10” ] From a child script, you can then use the dependency declarations like so: dependencies { compile libraries.spring_core testCompile libraries.junit } To share dependency declarations with advanced configuration options, you can use DependencyHandler.create: libraries = … Read more