Kotlin / kotlinx-kover

Apache License 2.0
1.28k stars 48 forks source link

Add version catalog for dependency management #118

Closed jsoberg closed 2 years ago

jsoberg commented 2 years ago

Implemented gradle version catalogs for easier/safer dependency usage.

I also added local.properties to the .gitignore for those who use Android Studio.

Ran tests for verification, all 9 passed.

JavierSegoviaCordoba commented 2 years ago

I think Version Catalogs should be used instead of buildSrc approach which is not cache friendly.

jsoberg commented 2 years ago

I could add that in instead of this, however I don't think we could reference the Kotlin version from TOML when we set the 'kotlin("jvm")' plugin

JavierSegoviaCordoba commented 2 years ago

Version catalog supports plugin aliases too

jsoberg commented 2 years ago

Version catalog supports plugin aliases too

True I forgot about that option, I'd be happy to move this over to version catalogs if that's best. I wasn't aware that using buildSrc wasn't cache-friendly

jsoberg commented 2 years ago

Moved to using version catalogs instead of buildSrc dependencies. Only annoyance is having to suppress a few warnings for the time being due to the incubating API, and a false-positive in IntelliJ (referenced in code). All tests are passing.

jsoberg commented 2 years ago

Merged in main and resolved conflicts, I just needed to update to 1.6.10 in the version catalog to mirror that update.

jsoberg commented 2 years ago

Let me know if you'd like to add this functionality and I'll open up another PR

shanshin commented 2 years ago

Hi, thanks for the contribution. I propose to implement this feature when it is stabilized in Grade (it won't be a preview) and there will be full support in the IDE.

JavierSegoviaCordoba commented 2 years ago

Version catalogs are stable since Gradle 7.4

shanshin commented 2 years ago

@JavierSegoviaCordoba, does version 7.4 still require a enableFeaturePreview("VERSION_CATALOGS") call?

JavierSegoviaCordoba commented 2 years ago

@shanshin no, it can be removed