I am writing a java jar library. I just want to add play-services dependency for gradle's project. My gradle build script:
Properties local = new Properties()
local.load(project.file('local.properties').newDataInputStream())
ext {
gdxVersion = '1.9.2';
sdkPath = local.getProperty("sdk.dir")
}
repositories {
maven { url "$sdkPath\\extras\\google\\m2repository\\" }
maven { url "$sdkPath\\extras\\android\\m2repository\\" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
mavenCentral()
}
apply plugin: 'java'
apply plugin: 'idea'
buildDir = 'gen'
libsDirName = '../bin'
sourceCompatibility = 1.8
sourceSets {
main {
java {
srcDir 'src'
}
}
}
dependencies {
compile "com.google.android.gms:play-services-ads:9.0.2";
compile "com.google.android:android:4.1.1.4"
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
}
clean {
delete fileTree(project.libsDir)
}
Gradle sync completes good and android studio tells that all ok but when I try to build:
error: package com.google.android.gms.ads does not exist
Google support repository and library are installed.
Android studio gradle section: gradle screenshot
My gradle version 2.13. Also I used the latest gradle release candidate. Nothing.