Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Kotlin scripts #582

Open
jmfayard opened this issue Sep 5, 2022 · 0 comments
Open

Support for Kotlin scripts #582

jmfayard opened this issue Sep 5, 2022 · 0 comments
Labels
needs-feedback not enough feedback to start working on this

Comments

@jmfayard
Copy link
Member

jmfayard commented Sep 5, 2022

I propose we add first-class support for Kotlin scripts because life is too short for Bash programming.

FeatureFlag

KOTLIN_SCRIPTS, disabled by default

see pr #583

refreshVersions

./gradlew refreshVersions --enable KOTLIN_SCRIPTS should show updates
Initial:

#!/usr/bin/env kotlin  
  
@file:Repository("https://jitpack.io")  
@file:DependsOn("io.rsocket.kotlin:rsocket-core-jvm:0.13.0-SNAPSHOT")  
@file:DependsOn("io.ktor:ktor-client-okhttp:1.5.2")  
@file:DependsOn("com.squareup.wire:wire-moshi-adapter:3.4.0")  
@file:CompilerOptions("-jvm-target", "17")
  • mavenCentral() should be supported by default
  • @file:Repository(..) should be supported if present

Expected:

#!/usr/bin/env kotlin  
  
@file:Repository("https://jitpack.io")  
@file:DependsOn("io.rsocket.kotlin:rsocket-core-jvm:0.13.0-SNAPSHOT")  
////                                    # available:0.15.0")  
////                                    # available:0.16.0")  
@file:DependsOn("io.ktor:ktor-client-okhttp:1.5.2")  
////                            # available:1.6.0")  
////                            # available:1.7.0")  
@file:DependsOn("com.squareup.wire:wire-moshi-adapter:3.4.0")  
@file:CompilerOptions("-jvm-target", "17")

refreshVersionsCleanUp

./gradlew refreshVersionsCleanUp --enable KOTLIN_SCRIPTS should remove the comments

Initial:

#!/usr/bin/env kotlin  
  
@file:Repository("https://jcenter.bintray.com")  
//// somme comment
@file:DependsOn("io.rsocket.kotlin:rsocket-core-jvm:0.13.0-SNAPSHOT")  
////                                    # available:0.14.0")  
////                                    # available:0.15.0")  
@file:DependsOn("io.ktor:ktor-client-okhttp:1.5.2")  

Expected:

#!/usr/bin/env kotlin  
  
@file:Repository("https://jcenter.bintray.com")  
@file:DependsOn("io.rsocket.kotlin:rsocket-core-jvm:0.13.0-SNAPSHOT")  
@file:DependsOn("io.ktor:ktor-client-okhttp:1.5.2")  

Old PR

See #517

jmfayard added a commit that referenced this issue Sep 5, 2022
@jmfayard jmfayard added not-for-this-release needs-feedback not enough feedback to start working on this and removed not-for-this-release labels Sep 6, 2022
LouisCAD added a commit that referenced this issue Oct 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-feedback not enough feedback to start working on this
Projects
None yet
Development

No branches or pull requests

1 participant