ReactiveCircus / app-versioning

A Gradle Plugin for lazily generating Android app's versionCode & versionName from Git tags.
Apache License 2.0
205 stars 3 forks source link

Error when running generate #19

Closed bbetter closed 3 years ago

bbetter commented 3 years ago

зображення

Can anyone point me in the direction of how to fix this error?

ychescale9 commented 3 years ago

Which version or jdk are you using? Can you run with --stacktrace and share the errors?

bbetter commented 3 years ago

Sorry , I seem to figure that out Just to confirm I had android gradle plugin 4.2.0 Gradle version 6.7.1 it started working when I swtiched gradle version (in wrapper properties) to 7.0.2 should that be an issue?

ychescale9 commented 3 years ago

So looks like a Gradle issue. Can you try Gradle 6.9?

bbetter commented 3 years ago

I'll try it tomorrow and give an update here, for me the issue looks closedm it's just not clear from the description that plugin is not working with specific gradle versions.

ychescale9 commented 3 years ago

Thanks. I also don't expect the plugin to not work with some Gradle versions, as long as it's higher than the minimum version required by AGP 4.2 which is enforced by AGP.

tasomaniac commented 3 years ago

I can see that this plugin depends on Kotlin 1.5. That could be the reason. Can you try to explicitly add Kotlin 1.5 to your build scripts' dependencies?

ychescale9 commented 3 years ago

@tasomaniac I'm using this in a project that uses Kotlin 1.4.32 in buildscript and it works fine. It might be a small bug in Gradle but it shouldn't require Gradle 7.

tasomaniac commented 3 years ago

What about 1.3? I'm asking because I remember listBuilder was introduced in newer versions of Kotlin.

ychescale9 commented 3 years ago

Interesting! I'll have a look and see if it's worth changing the builder to something else. Thanks!

ychescale9 commented 3 years ago

I confirmed that the min Gradle version required is 6.8 which bumped the embedded kotlin version to 1.4.

I'll add a check to require Gradle 6.8 which I think is quite reasonable given minimum AGP required is 4.2.1.