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

[Question] Elaborate on the usage of Kotlin scripting #13

Open
esafirm opened this issue Nov 20, 2022 · 1 comment
Open

[Question] Elaborate on the usage of Kotlin scripting #13

esafirm opened this issue Nov 20, 2022 · 1 comment

Comments

@esafirm
Copy link

esafirm commented Nov 20, 2022

Can you elaborate on how we can execute the scripting mentioned in the readme?

Because running kotlin <something>.main.kts not working for me

$ kotlin sample.main.kts
:: problems summary ::
:::: WARNINGS
		module not found: com.github.DevSrSouza#svg-to-compose;0.8.1

	==== central: tried

	  https://repo1.maven.org/maven2/com/github/DevSrSouza/svg-to-compose/0.8.1/svg-to-compose-0.8.1.pom

	  -- artifact com.github.DevSrSouza#svg-to-compose;0.8.1!svg-to-compose.jar:

	  https://repo1.maven.org/maven2/com/github/DevSrSouza/svg-to-compose/0.8.1/svg-to-compose-0.8.1.jar

error: cannot access script base class 'org.jetbrains.kotlin.mainKts.MainKtsScript'. Check your module classpath for missing or conflicting dependencies (sample.main.kts:1:1)
error: unresolved reference: Repository (sample.main.kts:1:7)
error: unresolved reference: Repository (sample.main.kts:2:7)
error: unresolved reference: Repository (sample.main.kts:3:7)
error: unresolved reference: DependsOn (sample.main.kts:5:7)
error: unresolved reference: DependsOn (sample.main.kts:6:7)
...
@c5inco
Copy link
Contributor

c5inco commented Jul 4, 2023

You might have to add #!/usr/bin/env kotlin to the top of the file. At least that is how I got it to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants