If you run the "dependencies" task on your project you'll see that the
"archives" configuration probably doesn't declare any dependencies.

If you have a library project you'll see that "default" does. This is the
dependencies for the default artifact so you can use that instead.

If you have variants and want to publish those (rather one of those) you'll
need to use the associated configuration.
It will be named <flavor name><buildtype name>




On Mon, May 5, 2014 at 8:44 AM, Simon Vig Therkildsen <[email protected]>wrote:

> Hello,
>
> Since the maven install task is missing on android projects, I've been
> trying to implement that myself. I can get it to install to maven local
> with the following code, but the pom does not contain dependencies.
>
> task install(type: Upload, dependsOn: assemble) {
>   repositories.mavenInstaller {
>     configuration = configurations.archives
>
>     pom.groupId = GROUP
>     pom.artifactId = POM_ARTIFACT_ID
>     pom.version = VERSION_NAME
>
>     pom.project {
>       name POM_NAME
>       packaging POM_PACKAGING
>       description POM_DESCRIPTION
>       url POM_URL
>
>       scm {
>         url POM_SCM_URL
>         connection POM_SCM_CONNECTION
>         developerConnection POM_SCM_DEV_CONNECTION
>       }
>
>       licenses {
>         license {
>           name POM_LICENCE_NAME
>           url POM_LICENCE_URL
>           distribution POM_LICENCE_DIST
>         }
>       }
>
>       developers {
>         developer {
>           id POM_DEVELOPER_ID
>           name POM_DEVELOPER_NAME
>         }
>       }
>     }
>   }
> }
>
> I've made a sample project that contains both an android project and a
> regular java project:
> https://github.com/SimonVT/android-gradle-maveninstaller
> ./gradlew install will install both projects to maven local, but only the
> java project pom will contain dependencies.
> What am I missing to get it to correctly put dependencies in the pom?
>
> --
> You received this message because you are subscribed to the Google Groups
> "adt-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to