build.gradle
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
Gradle warning: variant.getOutputFile() and variant.setOutputFile() are deprecated
Building on the answer from Larry Schiefer you can change the script to something like this: android { applicationVariants.all { variant -> variant.outputs.each { output -> def outputFile = output.outputFile if (outputFile != null && outputFile.name.endsWith(‘.apk’)) { def fileName = outputFile.name.replace(‘.apk’, “-${versionName}.apk”) output.outputFile = new File(outputFile.parent, fileName) } } } }
Android Studio 2.2 Stuck at Building Gradle Project Info on importing existing project
There is downloading of Gradle going on at the background. Just wait for it to finish.
Boolean properties in gradle.properties file is read as string
I had the same problem, but I just converted it to boolean like this: if (enableGradleApp.toBoolean()) { …. }
Android Studio – How to make modules inside a subdirectory?
You can do it: root build.gradle settings.gradle modules mod1 build.gradle mod2 build.gradle mod3 build.gradle In your settings.gradle include ‘:modules:mod1’ , ‘:modules:mod2’, ‘:modules:mod3’
Spring Boot 2 – Change Jar Name
archiveFileName is the new hotness. Everything else is deprecated. bootJar { archiveFileName = “${archiveBaseName.get()}.${archiveExtension.get()}” } or the Kotlin DSL equivalent: tasks.getByName<org.springframework.boot.gradle.tasks.bundling.BootJar>(“bootJar”) { this.archiveFileName.set(“${archiveBaseName.get()}.${archiveExtension.get()}”) } See: https://docs.gradle.org/current/dsl/org.gradle.api.tasks.bundling.Jar.html#org.gradle.api.tasks.bundling.Jar:archiveName https://docs.gradle.org/current/userguide/lazy_configuration.html
Jacoco with Gradle 0.10.0: Remote object doesn’t exist
Try This One… buildscript { repositories { mavenCentral() } dependencies { classpath ‘com.android.tools.build:gradle:0.13.0’ } } repositories { mavenCentral() } apply plugin: ‘com.android.application’ apply plugin: ‘jacoco’ android { compileSdkVersion 21 buildToolsVersion “21.1.1” // Must Require defaultConfig { applicationId “com.packagename” <Change it> minSdkVersion 11 targetSdkVersion 21 versionCode 1 versionName “1.0” } packagingOptions { exclude ‘META-INF/DEPENDENCIES’ exclude ‘META-INF/LICENSE’ … Read more