wupdigital / android-maven-publish

Modification of the standard Maven Publish plugin to be compatible with android-library projects (aar).
Apache License 2.0
326 stars 39 forks source link

Version 3.6.2 doesn't work with AGP 3.5 and Gradle 5.4.1 #39

Closed mauronra closed 5 years ago

mauronra commented 5 years ago

I recently upgraded Android Studio to 3.5 along with the Android Gradle Plugin to 3.5 and Gradle Wrapper to 5.4.1 and the libraries .aar files are no longer generated, only pom files remain

warnyul commented 5 years ago

I have tested on the sample project in this repo. I could not reproduce with these versions. Could you please send a maven-publish plugin configuration from your project?

mauronra commented 5 years ago

I've created a sample where the issue occurs, I don't know if its a problem with the plugin or its implementation within the project, it was working fine before the updates though.

Also, I've found a temporal workaround that alllows the .aar creation by wrapping the custom variants inside the blocks: mavenAar(MavenPublication) { afterEvaluate { ...custom variants stuff... } }

I don't know much about gradle, its not perfect but it works.

warnyul commented 5 years ago

Why do you apply android-maven-publish plugin on end of build.gradle files? You should do it before configure publishing. So, you have to replace apply plugin: 'maven-publish' to apply plugin: 'android-maven-publish', and remove apply plugin: 'android-maven-publish' from end of the file

mauronra commented 5 years ago

Thank you, very much