4

I need to use Apache Commons in my Gradle script, so where do I need to add the dependency to make it available to it?

(I don´t need it in my Android Project, but only in the gradle script)

1 Answer 1

6

You need to add the dependencies in buildscript section as follows:

buildscript {
    .
    .
    dependencies {
        classpath 'org.apache.commons:commons-*:<version>'
    }
    .
    .
}
Sign up to request clarification or add additional context in comments.

1 Comment

Adding repositories block would be also useful.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.