I have a Gradle project consisting of an Android module (the com.android.library plugin is applied in the build.gradle file) and a Java module (the java plugin is applied in the build.gradle file). Within the build.gradle file of the Java module I was previously specifying the source and target compatibility as follows: I’ve just updated the project’s “Android Plugin for Gradle”
Tag: build.gradle
How to exclude all files under a directory in Gradle?
For example, this one will exclude 1 file. But how to exclude all file under a directory? like: org/apache/commons/codec/language/bm/ folder? . does not work 🙂 Answer wild card can be used to enforce action to multiple file in directory. See this:- You can also exclude a file/directory with out specifying the full path this way:- Note: this will exclude any
Error:Execution failed for task ‘:app:mergeDebugResources’. > Some file crunching failed, see logs for details build gradle issues
currently I am using Android Studio 2.1 when I run my App it shows me some error in Message Gradle Build saying the following I tried cleaning and rebuilding it but it didn’t work. The answer for this question didn’t work also. Any help would be appreciated, thanks. Updated: Here is the log output Answer All problem was a crashed
Gradle – add directory to classpath
My application requires that a config directory be available on the classpath when it looks for configurations files under the directory. I currently have dependencies configured like so, though this is probably not the correct way to make a directory available to my application: I am using the application plugin to create a standalone zip for my project. If my
Add provided dependency to test classpath using Gradle
I’ve provided dependency scope configured like below. My problem is, the provided dependencies are not visible during runtime in tests. How can I configure this to keep the dependencies provided but available on the test classpath? One solution is to add the dependency like the joda-time library with testCompile scope, but I don’t want to duplicate any entries. I’m sure
How to add local .jar file dependency to build.gradle file?
I have tried to add my local .jar file dependency to my build.gradle file: And you can see that I added the .jar files into the referencedLibraries folder here: https://github.com/WalnutiQ/wAlnut/tree/version-2.3.1/referencedLibraries But the problem is that when I run the command: gradle build on the command line I get the following error: Here is my entire repo: https://github.com/WalnutiQ/wAlnut/tree/version-2.3.1 Answer If you
Is it possible to declare a variable in Gradle usable in Java?
Is it possible to declare a variable in Gradle usable in Java ? Basically I would like to declare some vars in the build.gradle and then getting it (obviously) at build time. Just like a pre-processor macros in C/C++… An example of declaration would be something like that … : Is there a way to do something like that ?