DevSrSouza / svg-to-compose

Converts SVG and Android Vector Drawable in Compose Multiplatform source code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Question] Elaborate on the usage of Kotlin scripting

esafirm opened this issue · comments

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)
...

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.