Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Fix obsolete api waring [#260] issue to support android project #296

Closed
wants to merge 1 commit into from

Conversation

KaelLuo
Copy link

@KaelLuo KaelLuo commented Oct 10, 2019

No description provided.

@hal9002
Copy link

hal9002 commented Oct 10, 2019

Can one of the admins review this PR?

@StefMa
Copy link
Contributor

StefMa commented Oct 10, 2019 via email

@KaelLuo
Copy link
Author

KaelLuo commented Oct 10, 2019

Hey StefMa, thanks for the quick review.
variant is not a task, it's actually passed from "ReleasePlugin#attachArtifacts" function within this code

project.android.libraryVariants.all { variant ->
                String publicationName = variant.name
                MavenPublication publication = createPublication(publicationName, project, extension)
                new AndroidAttachments(publicationName, project, variant).attachTo(publication)
            }

In some other popular library, they also fix this kind of issue in same way, a similar fix discuss attached here:
google/protobuf-gradle-plugin#295

Copy link
Contributor

@mr-archano mr-archano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @KaelLuo for providing this. Just left a small remark.

javadoc.source = variant.javaCompiler.source
javadoc.classpath = variant.javaCompiler.classpath
if(variant.hasProperty('javaCompileProvider')) {
javadoc.source = variant.javaCompileProvider.get().source
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to extract a little method where to put this if statement (like we have already done in another plugin) so we can remove some duplication

@KaelLuo
Copy link
Author

KaelLuo commented Feb 11, 2022 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants