refreshVersions icon indicating copy to clipboard operation
refreshVersions copied to clipboard

Migration for Kotlin/JS dependencies

Open CLOVIS-AI opened this issue 4 years ago • 2 comments
trafficstars

⚠️ Is your feature request related to a problem? Please describe

After running ./gradlew refreshVersionsMigrate, a typical Kotlin/JS project might look like this:

dependencies {
	testImplementation(kotlin("test-js"))

	implementation(project(":client"))

	// Simplified by refreshVersions
	implementation(KotlinX.coroutines.coreJs)

	// Omitted version thanks to refreshVersions
	implementation("org.jetbrains.kotlin-wrappers:kotlin-react:_")
	implementation("org.jetbrains.kotlin-wrappers:kotlin-react-dom:_")

	// refreshVersions is currently unable to manage NPM dependencies
	implementation(npm("react", "17.0.2"))
	implementation(npm("react-dom", "17.0.2"))
}

💡 Describe the solution you'd like

From the comments in https://github.com/jmfayard/refreshVersions/issues/457, it seems like refreshVersions already supports the _ notation for NPM dependencies. However, the refreshVersionsMigrate isn't able to implement it itself.

🤚 Do you want to develop this feature yourself?

  • [ ] Yes
  • [x] No

I currently have very little time and have never written Gradle plugins previously, however if it's a few simple changes I can find some time to do it. I don't have the knowledge for anything more involved, though.

CLOVIS-AI avatar Nov 15 '21 19:11 CLOVIS-AI

Hello, if you want, we can look at this together in a pair-programming session so you'll get to understand how refreshVersions works, at least for the automatic migration system.

LouisCAD avatar Dec 18 '21 23:12 LouisCAD

Hi, I'd be interested by that, but sadly I won't have the time for it until February at the soonest.

CLOVIS-AI avatar Dec 20 '21 12:12 CLOVIS-AI

Hello @CLOVIS-AI

Good news is that it's a valid issue so anyone is free to work on that.

On the other hand, realistically we won't have the time and energy to work on this rather than other things. I prefer to be honest about it and close the issue.

jmfayard avatar Sep 13 '22 21:09 jmfayard

As an added note if anyone else needs this, if you write implementation(npm("whatever", "_")), then run refreshVersions (not refreshVersionsMigrate), it will automatically fill in the latest version in versions.properties with the correct syntax.

It's not really a fix for this feature, but my issue really was finding out what the syntax was so it's a good workaround for me in the meantime.

CLOVIS-AI avatar Sep 14 '22 09:09 CLOVIS-AI