Add config params for specifying target annotations, import param renaming
This commit is contained in:
+1
-1
@@ -30,7 +30,7 @@ abstract class MyScriptWithMavenDeps {
|
|||||||
val myJvmConfigParams = jvmJavaHomeParams + with(ScriptCompileConfigurationProperties) {
|
val myJvmConfigParams = jvmJavaHomeParams + with(ScriptCompileConfigurationProperties) {
|
||||||
listOf(
|
listOf(
|
||||||
baseClass<MyScriptWithMavenDeps>(),
|
baseClass<MyScriptWithMavenDeps>(),
|
||||||
importedPackages(DependsOn::class.qualifiedName!!, Repository::class.qualifiedName!!),
|
defaultImports(DependsOn::class.qualifiedName!!, Repository::class.qualifiedName!!),
|
||||||
dependencies(
|
dependencies(
|
||||||
JvmDependency(
|
JvmDependency(
|
||||||
scriptCompilationClasspathFromContext(
|
scriptCompilationClasspathFromContext(
|
||||||
|
|||||||
+5
-1
@@ -23,7 +23,7 @@ object ScriptCompileConfigurationProperties {
|
|||||||
|
|
||||||
val contextVariables by typedKey<Map<String, KType>>() // external variables
|
val contextVariables by typedKey<Map<String, KType>>() // external variables
|
||||||
|
|
||||||
val importedPackages by typedKey<List<String>>()
|
val defaultImports by typedKey<List<String>>()
|
||||||
|
|
||||||
val restrictions by typedKey<List<ResolvingRestrictionRule>>()
|
val restrictions by typedKey<List<ResolvingRestrictionRule>>()
|
||||||
|
|
||||||
@@ -31,6 +31,10 @@ object ScriptCompileConfigurationProperties {
|
|||||||
|
|
||||||
val dependencies by typedKey<List<ScriptDependency>>()
|
val dependencies by typedKey<List<ScriptDependency>>()
|
||||||
|
|
||||||
|
val generatedClassAnnotations by typedKey<List<KClass<out Annotation>>>()
|
||||||
|
|
||||||
|
val generatedMethodAnnotations by typedKey<List<KClass<out Annotation>>>()
|
||||||
|
|
||||||
val compilerOptions by typedKey<List<String>>() // Q: CommonCompilerOptions instead?
|
val compilerOptions by typedKey<List<String>>() // Q: CommonCompilerOptions instead?
|
||||||
|
|
||||||
val refineBeforeParsing by typedKey<Boolean>() // default: false
|
val refineBeforeParsing by typedKey<Boolean>() // default: false
|
||||||
|
|||||||
+1
-1
@@ -66,7 +66,7 @@ class BridgeDependenciesResolver(
|
|||||||
DependenciesResolver.ResolveResult.Success(
|
DependenciesResolver.ResolveResult.Success(
|
||||||
ScriptDependencies(
|
ScriptDependencies(
|
||||||
classpath = newClasspath, // TODO: maybe it should return only increment from the initial config
|
classpath = newClasspath, // TODO: maybe it should return only increment from the initial config
|
||||||
imports = refinedConfiguration.getOrNull(ScriptCompileConfigurationProperties.importedPackages)?.toList()
|
imports = refinedConfiguration.getOrNull(ScriptCompileConfigurationProperties.defaultImports)?.toList()
|
||||||
?: emptyList()
|
?: emptyList()
|
||||||
),
|
),
|
||||||
diagnostics
|
diagnostics
|
||||||
|
|||||||
Reference in New Issue
Block a user