Smallville7123
04/12/2019, 2:27 AMA.A.kt so it can be imported in build.gradle.kts via import A.A so i can test if it actually compiled in gradle as to how it should be converted from gradle to a kotlinc-jvm compilable package)
A/A.kt
package A
import A.B.B
fun main() {
B().main()
}
A/B/B.kt
package A.B
class B {
fun main() {
println("hello")
}
}
$ kotlinc-jvm -include-runtime -d main.jar A/A.kt -classpath ./
A/A.kt:2:12: error: unresolved reference: B
import A.B.B
^
A/A.kt:6:9: error: unresolved reference: B
B().main()
^ilya.gorbunov
04/12/2019, 2:40 AMA class in your build.gradle.kts, compile it as a part of buildSrc special project in your project.ilya.gorbunov
04/12/2019, 2:40 AMbuildSrc here: https://docs.gradle.org/current/userguide/organizing_gradle_projects.html#sec:build_sourcesSmallville7123
04/12/2019, 3:08 AMilya.gorbunov
04/12/2019, 3:12 AMhow it should be converted from gradle to aAnd if you're looking for the options gradle startscompilable packagekotlinc-jvm
kotlinc with, you can pass -d option to gradle and then search for the compileKotlin taks execution in logs. But be prepared that the log will be huge.Smallville7123
04/12/2019, 3:26 AM