How to enable downloaded from repositories libraries?

Hi everyone!
I’m new to Gradle and I have a question. Gradle allows us to use different libs, downloaded from various repositories. For example, I need android libs in java. I do the following: change my build.gradle file like:

apply plugin: ‘java-library’
apply plugin: ‘eclipse’

repositories {
maven { url “” }

dependencies {
compile fileTree(dir: ‘libs’, include: [’*.jar’])
testCompile ‘junit:junit:4.12’
compile ‘’
api ‘org.apache.commons:commons-math3:3.6.1’
implementation ‘’
testImplementation ‘junit:junit:4.12’

What should I do next? How can I now use these downloaded android functions? If I try to directly call them from the gradle project, they become underlined by a red line. If I build a gradle project to a jar file(“Gradle Tasks\projectName\build\build\Run Gradle Tasks”, build successful), I cannot call this android functions from that jar file (by import, called with added jar file to a build path of a project). So how can I use downloaded functions?