Gradle Android Maven Plugin doesn't create the pom file automatically

Hello everybody,

I would like to know how i can create a pom file with “Gradle Android Maven Plugin”. I followed the steps on (chapter “Convention Methods”). I also created the directory “buildDir” and get no errors. The App was build successfully but nevertheless the pom file was not created. I am using Android Studio IDE.

Edit: Is it possible that the newpom.xml file only exists on runtime and does not exist in my project folder buildDir after runtime? Maybe I am looking for something which can’t be found.

My app/build.gradle looks like this:

apply plugin: 'android'
  android {
    compileSdkVersion 19
    buildToolsVersion "19.1.0"
      defaultConfig {
        minSdkVersion 16
        targetSdkVersion 19
      buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
  apply plugin: 'maven'
  task writeNewPom << {
    pom {
        project {
            inceptionYear '2008'
            licenses {
                license {
                    name 'The Apache Software License, Version 2.0'
                    url ''
                    distribution 'repo'
  dependencies {
    compile ''
    compile ''
    compile ''
    compile files('libs/retrofit-1.5.1.jar')

Can someone tell me if I missed something? :slight_smile:

Best Regards, Philip