{"action":"created","issue":{"url":"https://api.github.com/repos/novoda/bintray-release/issues/73","labels_url":"https://api.github.com/repos/novoda/bintray-release/issues/73/labels{/name}","comments_url":"https://api.github.com/repos/novoda/bintray-release/issues/73/comments","events_url":"https://api.github.com/repos/novoda/bintray-release/issues/73/events","html_url":"https://github.com/novoda/bintray-release/issues/73","id":128338347,"number":73,"title":"Support for multi flavor libraries","user":{"login":"remcomokveld","id":8101494,"avatar_url":"https://avatars.githubusercontent.com/u/8101494?v=3","gravatar_id":"","url":"https://api.github.com/users/remcomokveld","html_url":"https://github.com/remcomokveld","followers_url":"https://api.github.com/users/remcomokveld/followers","following_url":"https://api.github.com/users/remcomokveld/following{/other_user}","gists_url":"https://api.github.com/users/remcomokveld/gists{/gist_id}","starred_url":"https://api.github.com/users/remcomokveld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remcomokveld/subscriptions","organizations_url":"https://api.github.com/users/remcomokveld/orgs","repos_url":"https://api.github.com/users/remcomokveld/repos","events_url":"https://api.github.com/users/remcomokveld/events{/privacy}","received_events_url":"https://api.github.com/users/remcomokveld/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-01-23T16:53:22Z","updated_at":"2016-01-28T09:29:52Z","closed_at":"2016-01-28T09:29:52Z","body":"I have a library which comes in multiple product flavors. I see in the code that there is a TODO in de AndroidArtifacts class when it comes to selecting the right output aar. The following code at the end of my build.gradle now allows me to publish various flavors of the library. Maybe you can use the same concept for automatically creating publish tasks for all product flavors in a library\r\n\r\n```\r\nproject.afterEvaluate {\r\n\r\n    project.android.libraryVariants.each { variant ->\r\n        if (variant.buildType.name == \"debug\") return;\r\n        Artifacts artifacts = project.plugins.hasPlugin('com.android.library') ? new AndroidArtifacts() : new JavaArtifacts()\r\n\r\n        project.publishing.publications.create(variant.name, MavenPublication) {\r\n            groupId project.publish.groupId\r\n            artifactId project.publish.artifactId+\"-\"+variant.productFlavors.collect { it.name }.join(\"-\")\r\n            version = project.publish.publishVersion\r\n\r\n            artifacts.all(it.name, project).each {\r\n                if (it instanceof CharSequence) {\r\n                    delegate.artifact \"${project.buildDir}/outputs/aar/${project.name}-${variant.baseName}.aar\"\r\n                } else {\r\n                    delegate.artifact it\r\n                }\r\n            }\r\n            from artifacts.from(project)\r\n        }\r\n    }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/novoda/bintray-release/issues/comments/176081351","html_url":"https://github.com/novoda/bintray-release/issues/73#issuecomment-176081351","issue_url":"https://api.github.com/repos/novoda/bintray-release/issues/73","id":176081351,"user":{"login":"xrigau","id":1626673,"avatar_url":"https://avatars.githubusercontent.com/u/1626673?v=3","gravatar_id":"","url":"https://api.github.com/users/xrigau","html_url":"https://github.com/xrigau","followers_url":"https://api.github.com/users/xrigau/followers","following_url":"https://api.github.com/users/xrigau/following{/other_user}","gists_url":"https://api.github.com/users/xrigau/gists{/gist_id}","starred_url":"https://api.github.com/users/xrigau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xrigau/subscriptions","organizations_url":"https://api.github.com/users/xrigau/orgs","repos_url":"https://api.github.com/users/xrigau/repos","events_url":"https://api.github.com/users/xrigau/events{/privacy}","received_events_url":"https://api.github.com/users/xrigau/received_events","type":"User","site_admin":false},"created_at":"2016-01-28T09:29:52Z","updated_at":"2016-01-28T09:29:52Z","body":"Fixed in #74 "}}