Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle: Plugin with id appengine not found

I m working on Mac, with Android Studio. I m trying to build a Android App with a Google App Engine BackEnd. I've installed Maven and Gradel and exported the M2_HOME et GRADLE_HOME

Whenever I run any of the Gradle commends I get this :

Error:(21, 0) Gradle: A problem occurred evaluating project ':backend'. Plugin with id 'appengine' not found.

the Build.gradle file :

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
    }
}

repositories {
    mavenCentral()
}

apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'appengine'

sourceCompatibility = 1.7
targetCompatibility = 1.7

dependencies {
    appengineSdk 'com.google.appengine:appengine-java-sdk:1.9.3'
    compile 'javax.servlet:servlet-api:2.5'
    compile 'com.googlecode.objectify:objectify:5.0.+'
    compile 'com.google.guava:guava:16.0.+'
}

appengine {
  downloadSdk = true
  appcfg {
    oauth2 = true
  }
}
like image 382
T.Chami Avatar asked Apr 25 '14 09:04

T.Chami


1 Answers

From description on plugin github page you need to define plugin JAR file in the classpath of your build script.

So here is how it can be done:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.google.appengine:gradle-appengine-plugin:1.9.3'
    }
}
....
like image 58
andrew Avatar answered Oct 27 '22 10:10

andrew