I just added the App Engine module to my app and upon syncing, gradle started downloading the App Engine zip from maven. App Engine\'s zip file is about 150mb+ and using mav
Another solution, SOLVED!
Set the path of app engine SDK in file called gradle.properties:
systemProp.appengine.sdk.root=C:/<PATH UNTIL BEFORE OF THE FOLDER APP_ENGINE_SDK>/appengine-java-sdk-1.9.40
Example:
systemProp.appengine.sdk.root=C:/Users/programmer/StudioProjects/MyApplication/.gradle/appengine-java-sdk-1.9.40
Edit the build.gradle file and change to false the following line:
appengine {
downloadSdk = false
}
The templates for appengine that ship with android studio download the appengine sdk by default... so if you are using those templates, you have to do the following.
edit the build.gradle file and remove
dependencies {
appengineSdk "com.google.appengine:appengine-java-sdk:X.X.X" <--- remove
...
}
and
appengine {
downloadSdk = true <--- remove this line as it tells it to dl the sdk
}
Then you can reference a downloaded sdk using a system property. Create a file in the same directory as your build.gradle file in your appengine module
gradle.properties
systemProp.appengine.sdk.root = "path to appengine sdk"
There are other ways to specify the location of the sdk (like using an environment variable) that might work better for you, check https://github.com/GoogleCloudPlatform/gradle-appengine-plugin
A completely different approach would be be to create a local maven repository for the appengine sdk and reference that directly and leave everything else intact.
repositories {
maven {
url 'file://path/to/myCustomRepo'
}
mavenCentral()
}
So this method is easiest if you grab the appengine sdk directly from maven.org because it will be named correctly. (http://search.maven.org/#artifactdetails|com.google.appengine|appengine-java-sdk|1.9.6|zip) but chose the version you are referencing in your build file.
About the maven repo, you need to set it up correctly.
If your downloaded zip is in /path/to/myCustomRepo
you need to actually put the zip in the correct location : /path/to/myCustomRepo/com/google/appengine/appengine-java-sdk/1.9.6
depending on the version number you're using.
If you only have the zip file in the repository directory you need to modify the downloadSdk
line to indicate all that is available is the "zip" with the @zip modifier.
downloadSdk "com.google.appengine:appengine-java-sdk:1.9.6@zip"
If you don't want to use the @zip you can add a simple .pom file (next to the .zip) so the system can correctly determine the reference
appengine-java-sdk-1.9.6.pom
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-java-sdk</artifactId>
<packaging>zip</packaging>
<version>1.9.6</version>
</project>