Compile-time dependencies are not loaded

I am starting and I’ve tried to google that, but found nothing.
I am declaring dependencies at build.gradle

repositories {

dependencies {
    compile 'org.nanohttpd:nanohttpd:2.3.0'
    compile ''

but when i am trying to compile it with gradle/gradlew build/run i am getting list of errors ‘cannot find symbol’

/home/justicecurcian/Documents/cutoff-gui-server/src/name/justicecurcian/ error:cannot find symbol
Gson gson = new Gson();
symbol:   class Gson
location: class Server

what should i do here?