Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename the plugin jar that's published to JCenter/Maven Central #82

Open
asarkar opened this issue Aug 29, 2017 · 2 comments
Open

Rename the plugin jar that's published to JCenter/Maven Central #82

asarkar opened this issue Aug 29, 2017 · 2 comments

Comments

@asarkar
Copy link

asarkar commented Aug 29, 2017

Currently the plugin jar is published as net.rdrei.android.buildtimetracker:gradle-plugin; the artifact name is too general to be useful. Perhaps it can be called build-time-tracker-plugin, same as the repo name.

@asarkar asarkar closed this as completed Aug 29, 2017
@asarkar asarkar reopened this Aug 29, 2017
@passy
Copy link
Owner

passy commented Aug 30, 2017

I remember taking this naming convention from some other plugin. I'm a bit hesitant as those changes are quite disruptive. Is this breaking anything in particular for you?

@asarkar
Copy link
Author

asarkar commented Aug 30, 2017

is this breaking

Matter of fact, it is. We use common build.gradle files that are included in various other builds. For backward compatibility, and since buildscript section is not included, but plugins are, we try to apply new plugins conditionally after checking the buildscript path. If a plugin is found on the path, we will apply it. The overly generic name of the build time tracker plugin is a problem because many other plugins also have the words gradle-plugin in their names, like the spring-boot-gradle-plugin for example, so it makes it impossible to determine whether the plugin is present on the path or not. Following is the snippet of code that I'm referring to:

def hasBuildTimeTrackerPlugin = project.buildscript.configurations.classpath
  .find { file(it).name.contains("gradle-plugin") }

For now, I'm using file(it).absolutePath.contains("buildtimetracker") to get around this problem, but I think pattern matching absolute path is taking it too far.

If the name changes with a new version, people updating their build files to pick up the new version should be able to update a few more characters to pick up the new name. It's not the end of the world.

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

No branches or pull requests

2 participants