build.gradle
~/.gradle/gradle.properties file not being read
The problem was that I made an assumption that wasn’t true. If you look at section 14.2 of the gradle documentation, it says: You can place a gradle.properties file in the Gradle user home directory (defined by the “GRADLE_USER_HOME” environment variable, which if not set defaults to USER_HOME/.gradle) or in your project directory. My incorrect … Read more
How do I add default JVM arguments with Gradle
From the top of my head I can think of 2 options: Option1: Do what @Ethan said, it’ll likely work: package placeholder; //your imports public class Application{ static { System.getProperties().set(“javafx.embed.singleThread”, “true”); } // your code public static void main(String… args){ //your code } } Option 2: Use the application plugin + default jvm values build.gradle: … Read more
Gradle: What is the benefit if I switch from Groovy to Kotlin?
Kotlin is statically typed, whereas Groovy is not. Statically typed languages like Kotlin enable IDEs to support particular tasks much better: auto-completion and content assist quick documentation navigation to source refactoring and more This is a great advantage that Gradle sees and therefore started with Kotlin as an alternative to Groovy. There are also some … Read more
What is the difference between an app dependency and a module dependency/plugin?
Three things. There’s Gradle plugins, module dependencies, and build dependencies which are placed on the classpath of the build tool (Gradle daemon itself). A plugin is how Gradle knows what tasks to use. There are many plugins. For more info, see Gradle – Plugin Documentation A dependency is a library that is compiled with your … Read more
Android Studio: Failure [INSTALL_FAILED_USER_RESTRICTED]
I had the same issue. It happens only on Flyme due to Security App. To enable installation: Open Security Application. (it is one of preinstalled Flyme apps) Go to Permission Usb app installation. Turn off USB installation monitor. Have found the solution here: http://bbs.flyme.cn/thread-1106582-1-1.html using Google Translate.
Android studio, configure gradle project takes forever
If you are on Windows check C:\Users\YOUR_USER\.gradle\wrapper\dists whether the gradle 1.10-all is installed there or not inside the directory. Android Studio downloads the whole distribution first time which is around 60 MB so it takes some time. Check the distributionUrl in gradle/gradle-wrapper.properties and match the same in your dist directory if it is not available … Read more