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

com.android.builder.testing.ConnectedDevice > hasTests[test(AVD) – 5.0] FAILED

Updated response: VM images already include fixed android-wait-for-emulator script and android SDK tools version 24.0.0 by default solving other issues. Build Environment Updates – 2014-12-09 Brief response: Bugged script causes your emulator don’t be ready for your tests and your app is not installed due a timeout, so there are no tests performed and the … Read more

java 9 module reads package X from A and B

Excluding the transitive dependency made it work and adjusting the module-info.java too!!! compile(“org.springframework.boot:spring-boot-starter:1.5.3.RELEASE”) { exclude group: ‘commons-logging’, module: ‘commons-logging’ } compile(“org.springframework.boot:spring-boot-starter-web:1.5.3.RELEASE”){ exclude group: ‘commons-logging’, module: ‘commons-logging’ }

While Android Studio Updated to v3.3 getting API ‘variant.getAssemble()’ is obsolete and has been replaced with ‘variant.getAssembleProvider()’

variant.assemble has been deprecated and replaced by a new provider API. If for example you are using it as next: variant.outputs.all { output -> variant.assemble.doLast { …. } } } Then replace it the new provider API: variant.outputs.all { output -> variant.getAssembleProvider().configure() { it.doLast { …. } } }

Android library dependencies missing from POM with Gradle

This is the solution that worked for me in the end: publishing { publications { sdk(MavenPublication) { artifactId libName artifact “${project.buildDir}/outputs/aar/${libName}-${project.version}.aar” //The publication doesn’t know about our dependencies, so we have to manually add them to the pom pom.withXml { // for dependencies and exclusions def dependenciesNode = asNode().appendNode(‘dependencies’) configurations.implementation.allDependencies.withType(ModuleDepend‌​ency) { ModuleDependency dp -> def … Read more

IntelliJ IDEA: Run java with args from external file

UPDATE: This feature is now available for some Run/Debug configurations. At the moment supported types for Java-based run configurations are: Application, Java Scratch, JUnit, JarApplication. Use the Redirect input from option: Original answer from 2017 with the workaround: IntelliJ IDEA doesn’t support it at the moment: IDEA-88717 No way to configure STDIN reading from a … Read more