You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The readme should have a warning, or the implementation be adjusted.
Currently if there is a Git repository, there is a grgit accessor generated for the Kotlin DSL.
But if there is no Git repository, the accessor is not generated as it is only generated as you only add an extra property in that case.
So if you usually have a Git repository and use the accessor, and then export the project to an archive without the GIt repository, the build is broken in there, as the build script will not compile anymore due to the missing accessor.
To mitigate that, you need to use some ugly construct like
val grgit =if (extra.has("grgit")) nullelse the<Grgit>()
The text was updated successfully, but these errors were encountered:
The existing behavior was kind of a hack a few years back, because it really shouldn't have been a direct project.grgit property, but it was kept around that way for compatibility. The switch to using an extension to get around a different issue required the ext workaround to set it to null if the repo didn't exist.
My gut is that I'll want to work out a solution for #362 and then try to wean people off the org.ajoberstar.grgit approach over to the service plugin.
The readme should have a warning, or the implementation be adjusted.
Currently if there is a Git repository, there is a
grgit
accessor generated for the Kotlin DSL.But if there is no Git repository, the accessor is not generated as it is only generated as you only add an extra property in that case.
So if you usually have a Git repository and use the accessor, and then export the project to an archive without the GIt repository, the build is broken in there, as the build script will not compile anymore due to the missing accessor.
To mitigate that, you need to use some ugly construct like
The text was updated successfully, but these errors were encountered: