jlleitschuh
09/07/2017, 12:06 AMjlleitschuh
09/07/2017, 1:34 AMjlleitschuh
09/07/2017, 2:24 AMjlleitschuh
09/07/2017, 3:34 AM[main] ERROR main - Error: Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath:
class api.GradleProject, unresolved supertypes: Object
Exception in thread "main" java.lang.IllegalStateException: Internal error: unable to compile script, see log for details
at compiler.KotlinCompilerKt.compileKotlinScriptToDirectory(KotlinCompiler.kt:49)
at compiler.Main.main(Main.kt:45)
Object
should be on the classpath?!
class Resolver : DependenciesResolver {
override fun resolve(scriptContents: ScriptContents, environment: Environment): DependenciesResolver.ResolveResult =
DependenciesResolver.ResolveResult.Success(
ScriptDependencies(classpath = classPath, imports = listOf("api.*", "compiler.*")))
private
val classPath: List<File>
get() {
println("Getting Classpath")
val classPath = listOf(
api.Action::class,
kotlin.PublishedApi::class,
kotlin.reflect.KClass::class,
Resolver::class
).map {
it.java.protectionDomain.codeSource.location.toURI()
}.map {
File(it)
} + PathUtil.getJdkClassesRootsFromCurrentJre()
println("Got classpath: $classPath")
return classPath
}
}
jlleitschuh
09/07/2017, 3:37 AMudalov
ilya.chernikov
09/07/2017, 5:02 PMSola
09/11/2017, 4:27 AMhow to suppress this warning?▾
user
09/11/2017, 4:25 PMhttps://kotlinlang.slack.com/files/U12EBH64C/F71RDBNK0/pasted_image_at_2017_09_11_12_27_pm.png▾
user
09/11/2017, 5:16 PMhttps://kotlinlang.slack.com/files/U12EBH64C/F71RDBNK0/pasted_image_at_2017_09_11_12_27_pm.png▾
egoscio
09/16/2017, 6:39 PMWARN: [kts] kotlin.script.experimental.dependencies.DependenciesResolver.NoDependencies must have a constructor without required parameters
1 reply
Hi there. Have you found the solution to this problem? I'm encountering it as well.egoscio
09/17/2017, 3:58 AMuser
09/18/2017, 7:04 PMuser
09/18/2017, 7:26 PMuser
09/18/2017, 7:28 PMuser
09/18/2017, 9:29 PMGary Tierney
09/19/2017, 12:17 PMGary Tierney
09/19/2017, 12:19 PM@ScriptTemplateDefinition(
scriptFilePattern = ".*\\.plugin\\.kts"
)
class B {}
and would like IDEA to recognize that the class compiled from test.plugin.kts
should be class Test_plugin : B {}
jlleitschuh
09/19/2017, 5:54 PMGary Tierney
09/19/2017, 6:35 PMGary Tierney
09/19/2017, 9:47 PMGary Tierney
09/19/2017, 10:00 PMjlleitschuh
09/20/2017, 4:12 PMjlleitschuh
09/20/2017, 4:13 PMGary Tierney
09/20/2017, 4:31 PMjlleitschuh
09/20/2017, 5:30 PMGary Tierney
09/20/2017, 5:48 PMmkobit
09/20/2017, 5:55 PMGary Tierney
09/20/2017, 6:01 PMmkobit
09/20/2017, 6:03 PM