Questions tagged [gradle-dependencies]

to manage the versions of all compile and runtime dependencies of a project, including resolution rules for transitive dependencies with conflicting versions.

206 questions
4
votes
1 answer

Create dependencies.gradle in android studio

How can I create dependencies.gradle in android studio like bellow: And:
jo jo
  • 1,758
  • 3
  • 20
  • 34
4
votes
0 answers

Why do I get error after changing "compile" to "implementation" in gradle.build?

This is my gradle.build file in one of the modules in the project now: apply plugin: 'com.android.library' android { compileSdkVersion 27 buildToolsVersion "27.0.3" defaultConfig { minSdkVersion 16 targetSdkVersion 25 …
PIXP
  • 2,382
  • 3
  • 19
  • 28
4
votes
0 answers

Difference between 'api' and 'implementation' in android studio 3.0 gradle dependencies

Since android studio 3.0 when I build a project a new syntax implementation is by default added in gradle dependency section like below: implementation 'com.android.support:appcompat-v7:26.1.0' We can also use api instead of implementation here…
0xAliHn
  • 18,390
  • 23
  • 91
  • 111
4
votes
3 answers

Android gradle: Sharing dependencies between product flavors

I have 3 product flavors (flavor1, flavor2, flavor3) in my app. flavor1 and flavor2 share some of the dependencies related to ads. Is there a way to bundle the ad related dependencies to a gradle dimension or configuration and add that to flavor1…
4
votes
1 answer

Javadoc generation "error package does not exist" in multi module project

I need to upload my libraries(multi-module project) into sonatype repository through Bintray. So that I need to generate the Javadoc individually for each module. First I faced the problems in these similar questions Android Studio Javadoc: Cannot…
Vignesh Sundaramoorthy
  • 1,827
  • 1
  • 25
  • 38
4
votes
0 answers

Android Studio - Create JAR file with dependencies for standard Java project

I'm building a standard java project, not an android project. It is using the Gson library from Google. Is there a way to create a JAR file for this project, while maintaining dependencies to the Gson library? Please correct me if I'm framing the…
3
votes
0 answers

Include a local library/ gradle project into Kotlin Multiplatform project

Hello everyone I have a Kotlin Multiplatform project with a Common Module and Web-App. I currently need Firebase Kotlin SDK as a dependency, but some features I had to modify. I forked the repository and published it locally (maven local) and…
3
votes
1 answer

What's the use of constraint in Gradle dependencies resolution?

There is a library i.e. io.github.elye:simplekotlinlibrary with version 1.0.0, 2.0.0 and 3.0.0. The io.github.elye:easyandroidlibrary:1.0.0 contain io.github.elye:simplekotlinlibrary:1.0.0 The io.github.elye:simpleandroidlibrary:2.0.0 contain…
Elye
  • 53,639
  • 54
  • 212
  • 474
3
votes
1 answer

make gradle dependency task to exclude test dependencies in its result

When i run ./gradlew dependencies i get whole dependency tree including prod/main and test. How can i get list of only production/main dependencies in result of dependencies task Official documentation…
Bharat Pahalwani
  • 1,404
  • 3
  • 25
  • 40
3
votes
1 answer

How do you exclude META-INF from a gradle project dependency?

I've got two sibling projects ProjectA and ProjectB that are both under Parent. Parent is basically only a folder, and has common build.gradle settings for both child projects. ProjectB depends on code in ProjectA at compile time, but ProjectA is…
Nahydrin
  • 13,197
  • 12
  • 59
  • 101
3
votes
1 answer

How to use custom task as artifact

I have a simple custom task in a project's (lets call it projectA) build script that creates a file. The task looks like this: task createFile() { def outputFile = rootProject.file("${buildDir}/tmp/outputFile.txt") outputs.file(outputFile) …
dpr
  • 10,591
  • 3
  • 41
  • 71
3
votes
0 answers

How to overwrite a project dependency's resource files at build time with gradle

I'm working in a multi-module Gradle application where Project B will depend on Project A, and are imported as dependencies as such: compile project(":modules:lib-module") Project A, let's call lib-module, in this case contains XML files for…
JNYRanger
  • 6,829
  • 12
  • 53
  • 81
3
votes
3 answers

Gradle module output configuration for test dependencies only

I have a Gradle project containing the two modules app and test, where test contains utilities for testing only. Now I'd like to setup this module, so it doesn't include any outputs into the main configuration of app; even not…
tynn
  • 38,113
  • 8
  • 108
  • 143
3
votes
1 answer

Gradle is not downloading .aar dependency properly (no files just manifest.mf)

When I was not able to resolve some of the classes located in external dependency I debugged and found that gradle is some how not downloading jars properly. I have checked on my peer computer that this play-services-tasks-15.0.1.aar is around 127…
3
votes
1 answer

after upgrading Android studio 3.0, dependency error occurred on externalNativeBuildRelease

on 2.3.3, the build works well, however, after upgrading 3.0.0 this problem occurred. Is there anyone who can help me? The reason is that libSDL2.so is not generated, however, I don't understand why SDLActivity module start to build before…
1 2
3
13 14