build-time-tracker-plugin icon indicating copy to clipboard operation
build-time-tracker-plugin copied to clipboard

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

Open asarkar opened this issue 8 years ago • 2 comments

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 avatar Aug 29 '17 23:08 asarkar

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?

passy avatar Aug 30 '17 09:08 passy

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.

asarkar avatar Aug 30 '17 16:08 asarkar